diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 0000000..8d3a1c8 --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,29 @@ +name: Deploy production branch to FTP +on: + push: + branches: [ production ] + +concurrency: + group: 'production' + cancel-in-progress: true + +jobs: + deploy: + environment: + name: production + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: production + fetch-depth: 2 + + - uses: SamKirkland/FTP-Deploy-Action@2.0.0 + env: + FTP_SERVER: ${{ vars.FTP_SERVER }} + FTP_USERNAME: ${{ secrets.FTP_USERNAME }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} + LOCAL_DIR: ./ + REMOTE_DIR: ${{ vars.REMOTE_PRODUCTION_DIR }} + ARGS: --exclude-glob=.git*/** + diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 0000000..04bb66e --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,29 @@ +name: Deploy staging branch to FTP +on: + push: + branches: [ staging ] + +concurrency: + group: 'staging' + cancel-in-progress: true + +jobs: + deploy: + environment: + name: staging + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: staging + fetch-depth: 2 + + - uses: SamKirkland/FTP-Deploy-Action@2.0.0 + env: + FTP_SERVER: ${{ vars.FTP_SERVER }} + FTP_USERNAME: ${{ secrets.FTP_USERNAME }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} + LOCAL_DIR: ./ + REMOTE_DIR: ${{ vars.REMOTE_STAGING_DIR }} + ARGS: --exclude-glob=.git*/** + diff --git a/assets/index-2a8eeb0a.js b/assets/index-2a8eeb0a.js new file mode 100644 index 0000000..a0d8785 --- /dev/null +++ b/assets/index-2a8eeb0a.js @@ -0,0 +1,230 @@ +var s9=Object.defineProperty;var i9=(n,e,t)=>e in n?s9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(i9(n,typeof e!="symbol"?e+"":e,t),t),Cb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Cb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Cb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Cb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function a9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let kb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),Ab=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}kb=t??"",e||(r[n]=kb),(e||o9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,kb)}};function l9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};wb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{Ab(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Ab(e,i)(t,n)}}function u9(n){return Array.isArray(n)?n:[n]}function hl(n,e){if(Array.isArray(n))return c9(n,e);if(n instanceof window.Element)return h9(n);if(n===null||typeof n!="object"||!n.vnode)return f9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return p9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return d9(n,t,e);if(n.isComponent)return AD(n,t,e)}function c9(n,e){n=u9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=S9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":O9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function E9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},C9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(C9);function w9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var mc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Uo=!1,wx=!1,kx,fi;function Lu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Uo?null:mc.requestAnimationFrame(Lu),Uo&&(Uo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function k9(n,e){Ax(qa,n,e)&&gc()}function A9(n,e){Ax(ja,n,e)&&gc()}function P9(n,e){Ax(Ki,n,e)&&WI()}function T9(n){Px(qa,n)&&gc()}function D9(n,e){Px(ja,n)&&gc()}function I9(n){Px(Ki,n)&&Tx()}function WI(n){Uo=!1,!xi&&(n=!!n,Ji=null,n?Lu():xi=mc.requestAnimationFrame(Lu))}function R9(){xi||(Uo=!0,Ji=null,xi=mc.requestAnimationFrame(Lu))}function Tx(){xi&&(mc.cancelAnimationFrame(xi),xi=null)}function F9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:P9,addAfter:A9,addBefore:k9,remove:I9,removeAfter:D9,removeBefore:T9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:R9,dispose:F9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Pb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Pb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Pb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Pb(this,e),e=e.next}},_9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends _9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Cu(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},B9=n=>Cu(n,e=>!e),L9="ui-backdrop-1l3kn107",N9={backdrop:L9,"loader-spin":"ui-loader-spin-1l3kn1"};class M9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[N9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const $9="ui-button-1urez107",j9="ui-button__label-1urez161",q9="ui-button__icon-1urez171",Tb={button:$9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:j9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const Q9="ui-input-ada4i107",U9="ui-input__icon-ada4i150",ko={input:Q9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:U9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const V9="ui-modal-1ng3s107",W9="ui-modal__header-1ng3s119",G9="ui-modal__title-1ng3s125",z9="ui-modal__content-1ng3s129",Po={modal:V9,modal__header:W9,modal__title:G9,modal__content:z9,"loader-spin":"ui-loader-spin-1ng3s1"},Z9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(M9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:Z9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const X9="ui-toolbar-1r0eh107",Y9={toolbar:X9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Lo extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[Y9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const H9=` + + +`,K9=` + + + +`,J9=` + + + +`,e4=` + + + +`,t4=` + + +`,r4=` + + + + + + +`,FD=` + + + + +`,n4=` + + + + +`,s4=` + + + + +`,_D=`export function setup () { + log('setup') +} + +export function draw () { + log(frameCount) +} +`,i4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nd4(m4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},eR={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])eR[`[object ${n}]`]=n.toLowerCase();function dr(n){return eR[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:yc,min:tR,max:rR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=yc*2,Db=yc/3,g4=yc/180,y4=180/yc;function nR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const b4="3.1.2",pr=(...n)=>new Ct(...n);pr.version=b4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,x4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,sR=n=>{if(n.match(v4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(x4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Hl}=Math,iR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Hl(e),t=Hl(t),r=Hl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Hl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=iR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return sR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},O4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=O4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Xo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=S4(e,t,r),[C,A,_]=aR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},S4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},aR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=oR(e,t,r),[A,_,B]=E4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function E4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const oR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const C4=(...n)=>new Ct(...n,"lab");Object.assign(pr,{lab:C4,getLabWhitePoint:Xo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:w4}=Math,k4=1e-7,A4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=A4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return P4(...this._rgb.slice(0,3))};const P4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:w4((n+.055)/1.055,2.4)),bn={},Ua=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Ua(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:T4,cos:D4}=Math,lR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*g4,[e,D4(r)*t,T4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=lR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},I4=(...n)=>{const e=nR(ur(n,"hcl"));return Fx(...e)},{sqrt:R4,atan2:F4,round:_4}=Math,uR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=R4(t*t+r*r);let l=(F4(r,t)*y4+360)%360;return _4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return nR(_x(this._rgb))};const B4=(...n)=>new Ct(...n,"lch"),L4=(...n)=>new Ct(...n,"hcl");Object.assign(pr,{lch:B4,hcl:L4});lr.format.lch=Fx;lr.format.hcl=I4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Ua(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Ua(this,"black",n,...e)};const N4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=N4;const{sqrt:_b,pow:Oa}=Math,M4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=M4;const $4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=$4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},cR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=cR;bn.hcl=cR;const j4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},q4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return q4(this._rgb)};const Q4=(...n)=>new Ct(...n,"num");Object.assign(pr,{num:Q4});lr.format.num=j4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const U4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=U4;const{floor:V4}=Math,W4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=V4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},G4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=tR(e,t,r),l=rR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return G4(this._rgb)};const z4=(...n)=>new Ct(...n,"hcg");pr.hcg=z4;lr.format.hcg=W4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const Z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=Z4;const{cos:Sa}=Math,X4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Y4,sqrt:H4,acos:K4}=Math,J4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Y4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=H4((e-t)*(e-t)+(e-r)*(t-r)),i=K4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return J4(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsi");pr.hsi=eQ;lr.format.hsi=X4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const tQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=tQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},fR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=tR(e,t,r),l=rR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return fR(this._rgb)};const rQ=(...n)=>new Ct(...n,"hsl");pr.hsl=rQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const nQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=nQ;const{floor:sQ}=Math,iQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=sQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:aQ,max:oQ}=Math,lQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=aQ(e,t,r),l=oQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return lQ(this._rgb)};const uQ=(...n)=>new Ct(...n,"hsv");pr.hsv=uQ;lr.format.hsv=iQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const cQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=cQ;function Nu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=fQ([e,t,r]),[A,_,B]=aR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Nu(t,n);return Nu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=oR(e,t,r);return[...pQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function pQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Nu(e,n);return Nu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const hQ=(...n)=>new Ct(...n,"oklab");Object.assign(pr,{oklab:hQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const dQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=dQ;const mQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=mQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:gQ}=Math,yQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return bQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},bQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:vQ}=Math;function Mu(n){let e="rgb",t=pr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&pr.brewer&&pr.brewer[Ye.toLowerCase()]&&(Ye=pr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=vQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=pr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=pr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=pr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Vr=20;for(;Math.abs(er)>.01&&Vr-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=xQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return pr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=pr(Ye),ot):t},ot}function xQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const OQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=OQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},EQ=n=>{const e=SQ(n);return e.scale=()=>Mu(e),e},{round:pR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(pR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:pR(e):e)};const CQ=(...n)=>new Ct(...n,"rgb");Object.assign(pr,{rgb:CQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=pr(t).rgb(),i=pr(e).rgb();return pr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},wQ=n=>n,kQ=(n,e)=>n*e/255,AQ=(n,e)=>n>e?e:n,PQ=(n,e)=>n>e?n:e,TQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),DQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),IQ=(n,e)=>255*(1-(1-e/255)/(n/255)),RQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(wQ));ms.multiply=Di(Ii(kQ));ms.screen=Di(Ii(TQ));ms.overlay=Di(Ii(DQ));ms.darken=Di(Ii(AQ));ms.lighten=Di(Ii(PQ));ms.dodge=Di(Ii(RQ));ms.burn=Di(Ii(IQ));const{pow:FQ,sin:_Q,cos:BQ}=Math;function LQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=FQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=BQ(_),me=_Q(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return pr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>pr.scale(C),C.hue(t),C}const NQ="0123456789abcdef",{floor:MQ,random:$Q}=Math,jQ=()=>{let n="#";for(let e=0;e<6;e++)n+=NQ.charAt(MQ($Q()*16));return new Ct(n,"hex")},{log:ND,pow:qQ,floor:QQ,abs:UQ}=Math;function hR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>dR(t,r,i),t}function dR(n,e="equal",t=7){dr(n)=="array"&&(n=hR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const VQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,WQ=5e-4,GQ=.1,$D=1.14,Kl=.022,jD=1.414,zQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Ua(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Kl?t:t+Math.pow(Kl-t,jD),l=r>=Kl?r:r+Math.pow(Kl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:ZQ,max:XQ,atan2:QD,abs:UD,cos:Jl,sin:VD,exp:YQ,PI:WD}=Math;function HQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=UD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Jl(h(Nt-30))+.24*Jl(h(2*Nt))+.32*Jl(h(3*Nt+6))-.2*Jl(h(4*Nt-63));let Yt=_t-It;Yt=UD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*VD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Vr=1+.045*ot,On=1+.015*ot*At,qr=30*YQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*VD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Vr),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Vr))*(Yt/(i*On)));return XQ(0,ZQ(100,hn))}function KQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const JQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},eU={cool(){return Mu([pr.hsl(180,1,.9),pr.hsl(250,.7,.4)])},hot(){return Mu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},mR=Object.keys(vv),GD=new Map(mR.map(n=>[n.toLowerCase(),n])),tU=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(mR)}}):vv,rU=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,nU=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return nU(this._rgb)};const sU=(...n)=>new Ct(...n,"cmyk");Object.assign(pr,{cmyk:sU});lr.format.cmyk=rU;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const iU=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},aU=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},oU=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},lU=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},gR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},uU=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,cU=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return iU(fR(e),t);if(t.substr(0,3)==="lab"){const r=Xo();Ks("d50");const i=aU(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Xo();Ks("d50");const i=oU(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?lU(Lx(e)):t.substr(0,5)==="oklch"?uU(gR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},yR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=lR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$u=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,bc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,bR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),vR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),xR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),OR=new RegExp("^hsla?\\("+rs+[bc,$u,$u].join(eo)+to+"\\)$"),SR=new RegExp("^hsl?\\("+rs+[bc,$u,$u].join(Nx)+rs+"\\)$"),ER=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,CR=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),wR=new RegExp("^lch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),kR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),AR=new RegExp("^oklch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),{round:PR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(PR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(bR))||(e=n.match(vR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(xR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(OR))||(e=n.match(SR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(ER)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=PR(r[i]);return r[3]=+e[4],r}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Xo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Xo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(AR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(yR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>bR.test(n)||OR.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||AR.test(n)||vR.test(n)||xR.test(n)||SR.test(n)||ER.test(n)||n==="transparent";Ct.prototype.css=function(n){return cU(this._rgb,n)};const fU=(...n)=>new Ct(...n,"css");pr.css=fU;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const pU=(...n)=>new Ct(...n,"gl");pr.gl=pU;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return iR(this._rgb,n)};const hU=(...n)=>new Ct(...n,"hex");pr.hex=hU;lr.format.hex=sR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:eu}=Math,TR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*eu(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*eu(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*eu(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*eu(r),i=255),[t,r,i,1]},{round:dU}=Math,mU=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=TR(C);A[2]/A[0]>=r/t?l=C:i=C}return dU(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return mU(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(pr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=TR;Ct.prototype.oklch=function(){return gR(this._rgb)};const gU=(...n)=>new Ct(...n,"oklch");Object.assign(pr,{oklch:gU});lr.format.oklch=yR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(pr,{analyze:hR,average:yQ,bezier:EQ,blend:ms,brewer:tU,Color:Ct,colors:Qa,contrast:VQ,contrastAPCA:zQ,cubehelix:LQ,deltaE:HQ,distance:KQ,input:lr,interpolate:Ua,limits:dR,mix:Ua,random:jQ,scale:Mu,scales:eU,valid:JQ});class yU{constructor(){or(this,"PROPERTIES",{...h4,...console,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:pr,rgb:(e=0,t=e,r=t=e)=>pr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>pr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");e=Math.round(e),!(e<0||e>this.leds.length)&&(this.leds[e]=t._rgb)},line:(e,t,r)=>{const i=[e,t].sort((l,h)=>l-h);for(let l=i[0];l{this.line(0,this.ledCount,e)},gradient:(e,t,r=this.rgb(),i=r,l="rgb")=>{if(!r||!r._rgb)throw new Error("Unexpected color value");if(!i||!i._rgb)throw new Error("Unexpected color value");const h=[e,t].sort();for(let C=h[0];C"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(vU);const xU=xv;var ea={},OU={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Va(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Va(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new DR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new IR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=CU(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new wU(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=wu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Va(this,e,t);let i=wu(this.text,wu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Va(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function CU(n){let e=-1;for(let t of n)e+=t.length+1;return e}function wu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class DR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class IR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=IR.prototype[Symbol.iterator]=function(){return this});class wU{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Va(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?RR:AU)(n,e,r)}function RR(n,e,t){if(e==n.length)return e;e&&FR(n.charCodeAt(e))&&_R(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function AU(n,e,t){for(;e>0;){let r=RR(n,e-2,t);if(r=56320&&n<57344}function _R(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!_R(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return FR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Yo(n),C=new Yo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Yo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function LR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new ku([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class ku{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=qu(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new NR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class NR{constructor(e,t){this.inner=e,this.prec=t}}class vc{of(e){return new wv(this,e)}reconfigure(e){return vc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class ju{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of TU(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>PU($e,me,ie))}}let q=_.map(Y=>Y(C));return new ju(e,h,q,C,A,l)}}function TU(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof NR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof ku)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Wo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function qu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const MR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),$R=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),jR=$t.define(),qR=$t.define(),QR=$t.define(),UR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new DU}}class DU{of(e){return new ri(this,e)}}class IU{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new IU(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&LR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function RU(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=WR(e,Ia(l),!1)}return n}function _U(n){let e=n.startState,t=e.facet(QR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const BU=[];function Ia(n){return n==null?BU:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const LU=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NU(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||LU.test(t)))return!0}return!1}function MU(n){return e=>{if(!/\S/.test(e))return Br.Space;if(NU(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=ju.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ju.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return LR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(UR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(MR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return MU(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=$R;Sr.readOnly=UR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=MR;Sr.changeFilter=jR;Sr.transactionFilter=qR;Sr.transactionExtender=QR;vc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class GR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new GR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new zR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ho.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ho.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?$U(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function $U(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new zR(h,t,r,l));return i.length==1?i[0]:new Ho(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ho.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){tu(this.active,e),tu(this.activeTo,e),tu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;ru(this.active,t,r),ru(this.activeTo,t,i),ru(this.activeRank,t,l),e&&ru(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&tu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new jU(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class jU{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qU=typeof navigator<"u"&&/Mac/.test(navigator.platform),QU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ko[un]=String.fromCharCode(un);for(var qb in ki)Ko.hasOwnProperty(qb)||(Ko[qb]=ki[qb]);function UU(n){var e=qU&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||QU&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ko:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Jo(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Au(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function el(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Go(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function xc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function VU(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ZR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function WU(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=VU(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=ZR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class zU{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function XR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!Qu(t))r=oa(t),t=t.parentNode;else return null}}function JR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Ux){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function tF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:Oc,ie_version:nF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:sF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YU=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>YU||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return HU(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(YR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return iF(this,e)}coordsAt(e,t){return oF(this,e,t)}}function HU(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?xc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Ux;function iF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?aF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function oF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function JU(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=lF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new ml(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class dl extends Ht{constructor(e){let{start:t,end:r}=lF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof dl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Uu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}dl.prototype.point=!1;class ml extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ml&&this.spec.class==e.spec.class&&Uu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ml.prototype.mapMode=cn.TrackBefore;ml.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&eV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function lF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function eV(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),rF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Uu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){aF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return iF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(YR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=el(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=oF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class zo{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nu(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(nu(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(nu(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(nu(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new zo(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function nu(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Vx=Rr.RTL;function uF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function fF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function aV(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Vv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Vv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function pF(n){return[new vi(0,n,0)]}let hF="";function lV(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),hF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),OF=$t.define({combine:n=>n.some(e=>e)}),SF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const su=sr.define({map:(n,e)=>n.map(e)}),EF=sr.define();function Tn(n,e,t){let r=n.facet(yF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let cV=0;const No=$t.define();class Ur{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Ur(cV++,e,r,i,C=>{let A=[No.of(C)];return h&&A.push(tl.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Ur.define(r=>new e(r),t)}}class Ub{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const CF=$t.define(),zx=$t.define(),tl=$t.define(),wF=$t.define(),Zx=$t.define(),kF=$t.define();function p2(n,e){let t=n.state.facet(kF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=uV(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const AF=$t.define();function PF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(AF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Mo=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Vu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Vu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!yV(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?pV(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=mV(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=zo.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=zo.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=zo.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);tF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(EF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&Au(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&fV(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Go(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Go(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&gV(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Jo(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=hV(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?KR:JR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Go(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Jo(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?el(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=el(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new eF(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(tl).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(wF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=PF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;WU(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function bV(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function xV(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vb(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=el(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Vb(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=vV(e,Qe),ct=xV(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Vb(B,Qe)?B=m2(B,Qe.bottom):q&&Vb(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function DF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&OV(Qe,Je,B)||Qt.chrome&&SV(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function OV(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function SV(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function EV(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=lV(i,l,h,C,t),B=hF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function CV(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function wV(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=DF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(AV(e,r.node,r.offset)?t:0))}}function AV(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class PV{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:IV(e),A=new kV(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=RV(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=TV(n,e,t));return n.state.facet(bF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function TV(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&TF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function DV(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function IV(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function RV(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class FV{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&XV(e.contentDOM.ownerDocument)}handleEvent(e){!qV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_V(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&FF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=RF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BV.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function _V(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const RF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BV="dthko",FF=[16,17,18,20,91,92,224,225],iu=6;function au(n){return Math.max(0,n)*.7+8}function LV(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class NV{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=GU(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&MV(e,t),this.dragging=jV(e,t)&&LF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LV(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=PF(this.view);e.clientX-A.left<=i+iu?t=-au(i-e.clientX):e.clientX+A.right>=h-iu&&(t=au(e.clientX-h)),e.clientY-A.top<=l+iu?r=-au(l-e.clientY):e.clientY+A.bottom>=C-iu&&(r=au(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MV(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function $V(n,e){let t=n.state.facet(mF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function jV(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Jo(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function qV(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),_F=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function QV(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),BF(n,t.value)},50)}function Sc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function BF(n,e){e=Sc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(gF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=WV(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new NV(n,e,t,r)),r&&n.observer.ignore(()=>{XR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return bV(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function UV(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:UV(n,t,e.clientX,e.clientY)}}const VV=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function LF(n){if(!VV)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function WV(n,e){let t=E2(n,e),r=LF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=GV(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function GV(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Sc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Sc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&$V(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=_F?null:e.clipboardData;return t?(BF(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(QV(n),!1)};function zV(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function ZV(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Sc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=ZV(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=_F?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(zV(n,t),!1)};const NF=ri.define();function MF(n,e){let t=[];for(let r of n.facet(vF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:NF.of(!0)}):null}function $F(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=MF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),$F(n)};ns.blur=n=>{n.observer.clearSelectionRange(),$F(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=RF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function XV(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class YV{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Tu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Vn extends jF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Vn||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Vn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Tu&&(A=-2);let Y=new Vn(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Tu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Tu)&&(za=!0),Wu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class KV extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Wu(this.left,e),this.right=Wu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const JV=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Vn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Vn(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=JV)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Vn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vn)return e;let t=new Vn(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vn)&&!this.isCovered?this.nodes.push(new Vn(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function n7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new YV(t),this.stateDeco=e.facet(tl).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new ou(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(jo(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(tl).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,e7(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(OF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=ZR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=HR(e.scrollDOM);let me=(this.printing?n7:r7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new HV(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new ou(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||jo(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||jo(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return jo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ou{constructor(e,t){this.from=e,this.to=t}}function i7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function uu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function a7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function jo(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>jo(i,e)):n._content)}const cu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),qF=wi.newName(),QF=wi.newName(),UF={"&light":"."+qF,"&dark":"."+QF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const o7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},UF),l7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class u7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zU,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new f7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!Au(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Go(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jo(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&c7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Au(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Au(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new PV(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=IF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Go(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function c7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class f7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:EF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Jo(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZU(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(su)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(No).map(i=>new Ub(i));for(let i of this.plugins)i.update(this);this.observer=new u7(this),this.inputState=new FV(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(NF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=MF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Vu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(su)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Gu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Mo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(cu)!=i.state.facet(cu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!IF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(No).map(r=>new Ub(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(No),r=e.state.facet(No);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Ub(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(HR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Vu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?QF:qF)+" "+this.state.facet(cu)}updateAttrs(){let e=N2(this,CF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Mo);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(o7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>CV(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return EV(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,wV(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),DF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return xc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(xF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p7)return pF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||fF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=oV(e.text,t,r);return this.bidiCache.push(new Gu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{XR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return su.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return su.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ur.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ur.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[cu.of(r),Mo.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(Mo.of(Kv("."+Hv,e,UF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=Mo;Mt.inputHandler=bF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=SF;Mt.focusChangeEffect=vF;Mt.perLineTextDirection=xF;Mt.exceptionSink=yF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=gF;Mt.dragMovesSelection=mF;Mt.clickAddsSelectionRange=dF;Mt.decorations=tl;Mt.outerDecorations=wF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=kF;Mt.scrollMargins=AF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=CF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const p7=4096,L2={};class Gu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const h7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function d7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function g7(n,e,t){return WF(VF(n.state),e,n,t)}let gi=null;const y7=4e3;function b7(n,e=h7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>d7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},y7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function WF(n,e,t,r){Jv=e;let i=UU(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",FF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+fu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+fu(me,e,!0)])||e.shiftKey&&(_e=Ko[e.keyCode])!=i&&_e!=me&&Y(ie[C+fu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+fu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class yl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=GF(e);return[new yl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return v7(e,t,r)}}function GF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function v7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=GF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Vr.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function x7(n,e){return n.constructor==e.constructor&&n.eq(e)}class O7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t!x7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=$t.define();function zF(n){return[Ur.define(e=>new O7(e,n)),Du.of(n)]}const ZF=!Qt.ios,rl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function S7(n={}){return[rl.of(n),E7,C7,w7,OF.of(!0)]}function XF(n){return n.startState.facet(rl)!=n.state.facet(rl)}const E7=zF({above:!0,markers(n){let{state:e}=n,t=e.facet(rl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||ZF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of yl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=XF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(rl).cursorBlinkRate+"ms"}const C7=zF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:yl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||XF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};ZF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const w7=Ri.highest(Mt.theme(ex)),YF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),qo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(YF)?r.value:t,n)}}),k7=Ur.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(qo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(qo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(qo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(qo)!=n&&this.view.dispatch({effects:YF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function A7(){return[qo,k7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function P7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class T7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of P7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",D7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),I7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function R7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Iu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:D7,addSpecialChars:null});return(e.replaceTabs=!R7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function F7(n={}){return[Iu.of(n),_7()]}let Q2=null;function _7(){return Q2||(Q2=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Iu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new T7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new M7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new N7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Iu);n.startState.facet(Iu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const B7="•";function L7(n){return n>=32?B7:n==10?"␤":String.fromCharCode(9216+n)}class N7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=L7(this.code),r=e.state.phrase("Control character")+" "+(I7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class M7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $7(){return q7}const j7=Ht.line({class:"cm-activeLine"}),q7=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(j7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function Q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function U7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function U2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?U7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function V7(n,e){let t=U2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=U2(n,i);if(!C)return r;let A=Q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function W7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?V7(t,r):null)}const G7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},z7={style:"cursor: crosshair"};function Z7(n={}){let[e,t]=G7[n.key||"Alt"],r=Ur.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?z7:null})]}const Io="-10000px";class HF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function X7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||X7}}}),V2=new WeakMap,Kx=Ur.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new HF(n,Ec,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=V2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||H7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Y7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),H7={x:0,y:0},Ec=$t.define({enables:[Kx,Y7]}),zu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Cc{static create(e){return new Cc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new HF(e,zu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K7=Ec.compute([zu],n=>{let e=n.facet(zu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Cc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class J7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Cc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!eW(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!tW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pu=4;function eW(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-pu&&e.clientX<=r+pu&&e.clientY>=i-pu&&e.clientY<=l+pu}function tW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function rW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(nW)&&(i=[]);return i},provide:i=>zu.from(i)});return{active:r,extension:[r,Ur.define(i=>new J7(i,n,r,t,e.hoverTime||300)),K7]}}function KF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const nW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function nl(n,e){let t=n.plugin(JF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const JF=Ur.fromClass(class{constructor(n){this.input=n.state.facet(sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new hu(n,!0,e.topContainer),this.bottom=new hu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new hu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new hu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(sl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class hu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const sl=$t.define({enables:JF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Ru=$t.define(),sW=$t.define(),iW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Zo=$t.define();function e_(n){return[t_(),Zo.of(Object.assign(Object.assign({},iW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function t_(n){let e=[aW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const aW=Ur.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Ru),this.view.viewport.from),r=[],i=this.gutters.map(l=>new oW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Zo),t=n.state.facet(Zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Ru),n.state.facet(Ru),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new r_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(sW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new r_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class r_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const fW=Zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(uW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function pW(n={}){return[Aa.of(n),t_(),fW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hW.range(i)))}return gr.of(e)});function mW(){return dW}const n_=1024;let gW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=gW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const yW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):yW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return OW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function il(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(s_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new bW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class bW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends i_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function a_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(il(C,e,t,!1))}}return i?a_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function OW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=n_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Vr=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Us=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Us>=0&&C.id==Us&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Us,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Us,_t+1);if(Us>=0&&si>0&&si-1&&si>0){let Cl=ie(Vr,$r);On=rO(Vr,hn,dn,0,hn.length,0,Yt-At,Cl,Cl)}else On=_e(Vr,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Vr=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Vr,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Fu(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Fu(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class SW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class EW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let CW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=CW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Xu(e);return r=>r.modified.indexOf(t)>-1?r:Xu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let wW=0;class Xu{constructor(e){this.name=e,this.instances=[],this.id=wW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&kW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=AW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Xu.get(C,A));return l}}function kW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function AW(n){let e=[[]];for(let t=0;tr.length-t.length)}function l_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Yu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return u_.add(e)}const u_=new mr;class Yu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function PW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function TW(n,e,t,r=0,i=n.length){let l=new DW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class DW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=IW(e)||Yu.empty,q=PW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function IW(n){let e=n.type.prop(u_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,mu=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),gu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),yu=Ft(),re={comment:mu,lineComment:Ft(mu),blockComment:Ft(mu),docComment:Ft(mu),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:gu,docString:Ft(gu),character:Ft(gu),attributeValue:Ft(gu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:yu,documentMeta:Ft(yu),annotation:Ft(yu),processingInstruction:Ft(yu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}c_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function f_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class RW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Ku{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Ku(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends o_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Ku.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let p_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(p_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,FW=Ur.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=p_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,FW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class _W{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const BW=$t.define(),wc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ju(n){let e=n.facet(wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function al(n,e){let t="",r=n.tabSize,i=n.facet(wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?LW(n,t,e):null}class kc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ju(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const h_=new mr;function LW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return d_(r,n,t)}function d_(n,e,t){for(let r=n;r;r=r.next){let i=MW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function NW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function MW(n){let e=n.type.prop(h_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>m_(h,!0,1,void 0,l&&!NW(h)?i.from:void 0)}return n.parent==null?$W:null}function $W(){return 0}class iO extends kc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return d_(this.context.next,this.base,this.pos)}}function jW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function qW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function QW({closing:n,align:e=!0,units:t=1}){return r=>m_(r,e,t,n)}function m_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?qW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const UW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const VW=200;function WW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+VW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=al(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const GW=$t.define(),g_=new mr;function zW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function XW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function ec(n,e,t){for(let r of n.facet(GW)){let i=r(n,e,t);if(i)return i}return ZW(n,e,t)}function y_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ac=sr.define({map:y_}),bl=sr.define({map:y_});function b_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Ac)&&!YW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new nG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(bl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function YW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function v_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(O_()))}const HW=n=>{for(let e of b_(n)){let t=ec(n.state,e.from,e.to);if(t)return n.dispatch({effects:v_(n.state,[Ac.of(t),x_(n,t)])}),!0}return!1},KW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of b_(n)){let r=tc(n.state,t.from,t.to);r&&e.push(bl.of(r),x_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function x_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(bl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:HW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KW},{key:"Ctrl-Alt-[",run:JW},{key:"Ctrl-Alt-]",run:eG}],rG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,rG)}});function O_(n){let e=[ca,aG];return n&&e.push(aO.of(n)),e}function S_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=tc(n.state,C.from,C.to);A&&n.dispatch({effects:bl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return S_(n,null)}}});class nG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return S_(e,this.value)}}const sG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iG(n={}){let e=Object.assign(Object.assign({},sG),n),t=new nv(e,!0),r=new nv(e,!1),i=Ur.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=tc(h.state,A.from,A.to)?r:ec(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,e_({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=tc(h.state,C.from,C.to);if(_)return h.dispatch({effects:bl.of(_)}),!0;let B=ec(h.state,C.from,C.to);return B?(h.dispatch({effects:Ac.of(B)}),!0):!1}})}),O_()]}const aG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=c_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new vl(e,t||{})}}const lx=$t.define(),E_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(E_)}function C_(n,e){let t=[lG],r;return n instanceof vl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(E_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class oG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)TW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const lG=Ri.high(Ur.fromClass(oG,{decorations:n=>n.decorations})),uG=vl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),cG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),w_=1e4,k_="()[]{}",A_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:k_,maxScanDistance:w_,renderMatch:hG})}}),fG=Ht.mark({class:"cm-matchingBracket"}),pG=Ht.mark({class:"cm-nonmatchingBracket"});function hG(n){let e=[],t=n.matched?fG:pG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const dG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(A_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),mG=[dG,cG];function gG(n={}){return[A_.of(n),mG]}const yG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(yG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||w_,l=r.brackets||k_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return bG(n,e,t,A,B,_,l)}}return vG(n,e,t,h,C.type,i,l)}function bG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const xG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),OG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OG[n]=SG(xG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function SG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[l_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const EG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?CG(n):r.block?kG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const CG=oO(TG,0),wG=oO(P_,0),kG=oO((n,e)=>P_(n,e,PG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function AG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function PG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function P_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>AG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),DG=ri.define(),IG=$t.define(),T_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),D_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(T_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=rc(B,B.length,t.minDepth,A):B=F_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(DG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function RG(n={}){return[D_,T_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?I_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Pc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(D_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const I_=Pc(0,!1),px=Pc(1,!1),FG=Pc(0,!0),_G=Pc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(IG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function rc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function BG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function LG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function R_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],NG=200;function F_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-NG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),rc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function MG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=$G(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function $G(n,e,t){let r=R_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const jG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||jG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const B_=n=>__(n,!vn(n)),L_=n=>__(n,vn(n));function N_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Tc(t,e))}const QG=n=>N_(n,!vn(n)),UG=n=>N_(n,vn(n));function VG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;VG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const WG=n=>vs(n,e=>Dc(n.state,e,!vn(n))),GG=n=>vs(n,e=>Dc(n.state,e,vn(n)));function M_(n,e){return vs(n,t=>{if(!t.empty)return Tc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const $_=n=>M_(n,!1),j_=n=>M_(n,!0);function q_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Tc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>Q_(n,!1),hx=n=>Q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const zG=n=>vs(n,e=>Fi(n,e,!0)),ZG=n=>vs(n,e=>Fi(n,e,!1)),XG=n=>vs(n,e=>Fi(n,e,!vn(n))),YG=n=>vs(n,e=>Fi(n,e,vn(n))),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),KG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function JG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headJG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function U_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>U_(n,!vn(n)),W_=n=>U_(n,vn(n));function G_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const tz=n=>G_(n,!vn(n)),rz=n=>G_(n,vn(n)),nz=n=>ss(n,e=>Dc(n.state,e,!vn(n))),sz=n=>ss(n,e=>Dc(n.state,e,vn(n)));function z_(n,e){return ss(n,t=>n.moveVertically(t,e))}const Z_=n=>z_(n,!1),X_=n=>z_(n,!0);function Y_(n,e){return ss(n,t=>n.moveVertically(t,e,q_(n).height))}const lI=n=>Y_(n,!1),uI=n=>Y_(n,!0),iz=n=>ss(n,e=>Fi(n,e,!0)),az=n=>ss(n,e=>Fi(n,e,!1)),oz=n=>ss(n,e=>Fi(n,e,!vn(n))),lz=n=>ss(n,e=>Fi(n,e,vn(n))),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),cz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),pz=({state:n,dispatch:e})=>{let t=Ic(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},hz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},dz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function xl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=bu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=bu(n,h,!1),C=bu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const H_=(n,e,t)=>xl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iH_(n,!1,!0),K_=n=>H_(n,!0,!1),J_=(n,e)=>xl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),eB=n=>J_(n,!1),mz=n=>J_(n,!0),gz=n=>xl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headxl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bz=n=>xl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},xz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ic(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function tB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Ic(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Oz=({state:n,dispatch:e})=>tB(n,e,!1),Sz=({state:n,dispatch:e})=>tB(n,e,!0);function rB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Ic(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ez=({state:n,dispatch:e})=>rB(n,e,!1),Cz=({state:n,dispatch:e})=>rB(n,e,!0),wz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ic(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function kz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=nB(!1),Az=nB(!0);function nB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&kz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new kc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Pz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new kc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=al(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(wc)})}),{userEvent:"input.indent"})),!0),iB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=al(n,Math.max(0,l-Ju(n)));for(;h(n.setTabFocusMode(),!0),Dz=[{key:"Ctrl-b",run:B_,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:L_,shift:W_},{key:"Ctrl-p",run:$_,shift:Z_},{key:"Ctrl-n",run:j_,shift:X_},{key:"Ctrl-a",run:HG,shift:uz},{key:"Ctrl-e",run:KG,shift:cz},{key:"Ctrl-d",run:K_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:gz},{key:"Ctrl-Alt-h",run:eB},{key:"Ctrl-o",run:vz},{key:"Ctrl-t",run:xz},{key:"Ctrl-v",run:hx}],Iz=[{key:"ArrowLeft",run:B_,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:XG,shift:oz,preventDefault:!0},{key:"ArrowRight",run:L_,shift:W_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:UG,shift:rz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:YG,shift:lz,preventDefault:!0},{key:"ArrowUp",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:j_,shift:X_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:ZG,shift:az,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:zG,shift:iz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:fz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:K_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:eB},{key:"Mod-Delete",mac:"Alt-Delete",run:mz},{mac:"Mod-Backspace",run:yz},{mac:"Mod-Delete",run:bz}].concat(Dz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:WG,shift:nz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GG,shift:sz},{key:"Alt-ArrowUp",run:Oz},{key:"Shift-Alt-ArrowUp",run:Ez},{key:"Alt-ArrowDown",run:Sz},{key:"Shift-Alt-ArrowDown",run:Cz},{key:"Escape",run:dz},{key:"Mod-Enter",run:Az},{key:"Alt-l",mac:"Ctrl-l",run:pz},{key:"Mod-i",run:hz,preventDefault:!0},{key:"Mod-[",run:iB},{key:"Mod-]",run:sB},{key:"Mod-Alt-\\",run:Pz},{key:"Shift-Mod-k",run:wz},{key:"Shift-Mod-\\",run:ez},{key:"Mod-/",run:EG},{key:"Alt-A",run:wG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Tz}].concat(Iz),Fz={key:"Tab",run:sB,shift:iB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=nc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=nc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(lB.prototype[Symbol.iterator]=uB.prototype[Symbol.iterator]=function(){return this});function _z(n){try{return new RegExp(n,cO),!0}catch{return!1}}function nc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:sc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[sc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const sc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sc)&&(n=t.value);return n},provide:n=>sl.from(n,e=>e?mx:null)}),Bz=n=>{let e=nl(n,mx);if(!e){let t=[sc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Lz])),n.dispatch({effects:t}),e=nl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Lz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Nz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cB=$t.define({combine(n){return bs(n,Nz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mz(n){let e=[Uz,Qz];return n&&e.push(cB.of(n)),e}const $z=Ht.mark({class:"cm-selectionMatch"}),jz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function qz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const Qz=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(cB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&qz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(jz.range(B,q)):(B>=i.to||q<=i.from)&&C.push($z.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Uz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Wz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Gz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Vz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Wz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class fB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||_z(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Yz(this):new Zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class pB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?zz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function zz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new lB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Xz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function ic(n,e){return n.slice(pn(n,e,!1),e)}function ac(n,e){return n.slice(e,pn(n,e))}function Xz(n){return(e,t,r)=>!r[0].length||(n(ic(r.input,r.index))!=Br.Word||n(ac(r.input,r.index))!=Br.Word)&&(n(ac(r.input,r.index+r[0].length))!=Br.Word||n(ic(r.input,r.index+r[0].length))!=Br.Word)}class Yz extends pB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const ol=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ol)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>sl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Hz=Ht.mark({class:"cm-searchMatch"}),Kz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jz=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Kz:Hz)})}return r.finish()}},{decorations:n=>n.decorations});function Ol(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):mB(e)}}const oc=Ol((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),dB(n),!0}),lc=Ol((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),dB(n),!0}),eZ=Ol((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),tZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=Ol((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),rZ=Ol((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new fB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function hB(n){let e=nl(n,pO);return e&&e.dom.querySelector("[main-field]")}function dB(n){let e=hB(n);e&&e==n.root.activeElement&&e.select()}const mB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=hB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:ol.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?ol.of(gx(n.state,e.query.spec)):sr.appendConfig.of(aZ)]});return!0},gB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=nl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},nZ=[{key:"Mod-f",run:mB,scope:"editor search-panel"},{key:"F3",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tZ},{key:"Mod-Alt-g",run:Bz},{key:"Mod-d",run:Gz,preventDefault:!0}];class sZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>oc(e),[Qn(e,"next")]),r("prev",()=>lc(e),[Qn(e,"previous")]),r("select",()=>eZ(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>rZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>gB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new fB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ol.of(e)}))}keydown(e){g7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?lc:oc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(ol)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const vu=30,xu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-vu),h=Math.min(i,t+vu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-vu;A--)if(!xu.test(C[A-1])&&xu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const iZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aZ=[Oi,Ri.low(Jz),iZ];class yB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(vB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function oZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:oZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function lZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function vB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function uZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function cZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=bB(n)),e}const uc=sr.define(),ll=sr.define();class fZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class pZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function hZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function dZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class mZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=dZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ll.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&yZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew mZ(t,n,e)}function yZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new pZ(q):new fZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=bZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:CZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new cc(SZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(cZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!vZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(SB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new cc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xZ:OZ}}function vZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SZ=[];function xB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=xB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(uc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ll))i=new Wn(i.source,0);else if(l.is(OB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new yB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function EZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):vB(n,!0).test(i)}const OB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),SB=sr.define(),Bn=Hr.define({create(){return cc.start()},update(n,e){return n.update(e)},provide:n=>[Ec.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},uZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const CZ=gZ(Bn,mO);function Ou(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:SB.of(C)}),!0}}const wZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:uc.of(!0)}),!0):!1,kZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ll.of(null)}),!0)};class AZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const PZ=50,TZ=1e3,DZ=Ur.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=xB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lPZ&&Date.now()-h.time>TZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(uc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new yB(e,t,n.explicitPos==t,this.view),i=new AZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ll.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:OB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&KF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ll.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uc.of(!1)}),20),this.composing=0}}}),IZ=typeof navigator=="object"&&/Win/.test(navigator.platform),RZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(IZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),EB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new FZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let _Z=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),BZ=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?_Z:BZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Sl=sr.define({map(n,e){return n&&n.map(e)}}),LZ=sr.define(),ul=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Sl))return t.value;if(t.is(LZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function NZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Sl.of(_)];t.state.field(ul,!1)===void 0&&B.push(sr.appendConfig.of([ul,QZ,UZ,EB]))}t.dispatch(t.state.update(A))}}function CB(n){return({state:e,dispatch:t})=>{let r=e.field(ul,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Sl.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const MZ=({state:n,dispatch:e})=>n.field(ul,!1)?(e(n.update({effects:Sl.of(null)})),!0):!1,$Z=CB(1),jZ=CB(-1),qZ=[{key:"Tab",run:$Z,shift:jZ},{key:"Escape",run:MZ}],kI=$t.define({combine(n){return n.length?n[0]:qZ}}),QZ=Ri.highest(gl.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:NZ(n)})}const UZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ul,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Sl.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const wB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function VZ(){return[GZ,wB]}const cv="()[]{}<>";function kB(n){for(let e=0;e{if((WZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=XZ(n.state,r);return l?(n.dispatch(l),!0):!1}),zZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=AB(n,n.selection.main.head).brackets||cl.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=YZ(n.doc,h.head);for(let A of r)if(A==C&&Rc(n.doc,h.head)==kB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},ZZ=[{key:"Backspace",run:zZ}];function XZ(n,e){let t=AB(n,n.selection.main.head),r=t.brackets||cl.brackets;for(let i of r){let l=kB(ln(i,0));if(e==i)return l==i?JZ(n,i,r.indexOf(i+i+i)>-1,t):HZ(n,i,l,t.before||cl.before);if(e==l&&PB(n,n.selection.main.from))return KZ(n,i,l)}return null}function PB(n,e){let t=!1;return n.field(wB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Rc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function YZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function HZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Rc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Rc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function JZ(n,e,t,r){let i=r.stringPrefixes||cl.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Rc(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(PB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!eX(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function eX(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function tX(n={}){return[RZ,Bn,fn.of(n),DZ,rX,EB]}const TB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:kZ},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:wZ}],rX=Ri.highest(gl.computeN([fn],n=>n.facet(fn).defaultKeymap?[TB]:[]));class nX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new hX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new nX(i,l,h.diagnostic),!1}),r}function DB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Fc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function IB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(MB))}function sX(n,e){return{effects:IB(n,[Fc.of(e)])}}const Fc=sr.define(),xO=sr.define(),RB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Fc)){let r=e.state.facet(Ls).autoPanel?t.value.length?fl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?fl.open:null,n.selected):t.is(RB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[sl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),iX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function aX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).toBB(n,t,!1)))}const oX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:IB(n.state,[xO.of(!0)])});let t=nl(n,fl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},lX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uX=[{key:"Mod-Shift-m",run:oX,preventDefault:!0},{key:"F8",run:lX}],cX=Ur.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(sX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function fX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function pX(n,e={}){return[Ls.of({source:n,config:e}),cX,MB]}function _B(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function BB(n,e,t){var r;let i=t?_B(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class hX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=BB(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=_B(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:RB.of(r)})}static open(e){return new fl(e)}}function _u(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Su(n){return _u(``,'width="6" height="3"')}const dX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class LB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)gX(e,t,r)),t}}function mX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mX(n,e)}let{hoverTime:i}=n.state.facet(_c),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function yX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new LB(t[i]).range(+i));return gr.of(r,!0)}const bX=e_({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new LB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(_c).markerFilter;for(let r of e.effects)if(r.is(Fc)){let i=r.value;t&&(i=t(i||[],e.state)),n=yX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),NB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=DB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Ec.from(n)}),vX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:_u('')},".cm-lint-marker-warning":{content:_u('')},".cm-lint-marker-error":{content:_u('')}}),MB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([iX.range(e.from,e.to)])}),rW(aX,{hideOn:DB}),dX],_c=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function xX(n={}){return[_c.of(n),yx,bX,vX,NB]}const OX=(()=>[pW(),mW(),F7(),RG(),iG(),S7(),A7(),Sr.allowMultipleSelections.of(!0),WW(),C_(uG,{fallback:!0}),gG(),VZ(),tX(),W7(),Z7(),$7(),Mz(),gl.of([...ZZ,...Rz,...nZ,...qG,...tG,...TB,...uX])])();class fc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new fc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new fc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class SX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class pc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pc(this.stack,this.pos,this.index)}}function Qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new Bu;class EX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;$B(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if($B(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class El{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function $B(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||CX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function CX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class wX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class kX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Bu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Bu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Bu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new wX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&DX(i);if(h)return Un&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Un&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Un&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Un&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Un&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Un&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Un&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Un&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Un&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Un&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class TX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class hc extends o_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=n_;let h=Qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new AX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(hc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const IX=312,RX=313,MI=1,FX=2,_X=3,BX=4,LX=314,NX=316,MX=317,$X=5,jX=6,qX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],jB=125,QX=59,xx=47,UX=42,VX=43,WX=45,GX=60,zX=44,ZX=63,XX=46,YX=91,HX=new TX({start:!1,shift(n,e){return e==$X||e==jX||e==NX?n:e==MX},strict:!1}),KX=new El((n,e)=>{let{next:t}=n;(t==jB||t==-1||e.context)&&n.acceptToken(LX)},{contextual:!0,fallback:!0}),JX=new El((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==UX)||t!=jB&&t!=QX&&t!=-1&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new El((n,e)=>{n.next==YX&&!e.context&&n.acceptToken(RX)},{contextual:!0}),tY=new El((n,e)=>{let{next:t}=n;if(t==VX||t==WX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:FX)}}else t==ZX&&n.peek(1)==XX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(_X))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const rY=new El((n,e)=>{if(n.next!=GX||!e.dialectEnabled(qX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(BX,-t)}),nY=l_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),sY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},iY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aY={__proto__:null,"<":187},oY=hc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:HX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[nY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[JX,eY,tY,rY,2,3,4,5,6,7,8,9,10,11,12,13,14,KX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>sY[n]||-1},{term:339,get:n=>iY[n]||-1},{term:92,get:n=>aY[n]||-1}],tokenPrec:15004}),qB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lY=qB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new SW,QB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const uY=["FunctionDeclaration"],cY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(uY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function UB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=cY[h.name];if(C&&C(h,l)||QB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of UB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function fY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)QB.has(i.name)&&(r=r.concat(UB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Hu.define({name:"javascript",parser:oY.configure({props:[h_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:UW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:QW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),g_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),WB={test:n=>/^JSX/.test(n.name),facet:f_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pY=Ei.configure({dialect:"ts"},"typescript"),hY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[WB]:void 0)]}),dY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[WB]:void 0)]},"typescript");let GB=n=>({label:n,type:"keyword"});const zB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(GB),mY=zB.concat(["declare","implements","private","protected","public"].map(GB));function gY(n={}){let e=n.jsx?n.typescript?dY:hY:n.typescript?pY:Ei,t=n.typescript?lY.concat(mY):qB.concat(zB);return new _W(e,[Ei.data.of({autocomplete:lZ(VB,bB(t))}),Ei.data.of({autocomplete:fY}),n.jsx?vY:[]])}function yY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vY=Mt.inputHandler.of((n,e,t,r,i)=>{if((bY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=yY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function xY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(OY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function OY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},SY={get exports(){return Ox},set exports(n){Ox=n}};const EY={define:!1,require:!1},CY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},wY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},kY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},AY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},PY={assert:!0,expect:!0,should:!0},TY={exports:!0,global:!1,module:!1,require:!1},DY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},IY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},RY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},UY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},GY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},ZY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},XY={$:!1,jQuery:!1},YY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},HY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},KY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},JY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},eH={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},rH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},nH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},sH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},iH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},aH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},oH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},lH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},uH={browser:!1,chrome:!1,opr:!1},cH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},fH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},pH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},hH={amd:EY,applescript:CY,atomtest:wY,browser:kY,builtin:AY,chai:PY,commonjs:TY,couch:DY,devtools:IY,embertest:RY,es2015:FY,es2016:_Y,es2017:BY,es2018:LY,es2019:NY,es2020:MY,es2021:$Y,es2022:jY,es2023:qY,es2024:QY,es2025:UY,es3:VY,es5:WY,greasemonkey:GY,jasmine:zY,jest:ZY,jquery:XY,meteor:YY,mocha:HY,mongo:KY,nashorn:JY,node:eH,nodeBuiltin:tH,phantomjs:rH,prototypejs:nH,protractor:sH,qunit:iH,rhino:aH,serviceworker:oH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:lH,webextensions:uH,worker:cH,wsh:fH,yui:pH};(function(n){n.exports=hH})(SY);const dH=E9(Ox);var dc={},mH={get exports(){return dc},set exports(n){dc=n}},dv,UI;function gH(){return UI||(UI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var KB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bc=function(c){return KB.exec(c).slice(1)};function wl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Mc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Lc(c){var s=Nc(c),u=eL(c,-1)==="/";return c=SO(Mc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Nc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Lc(Mc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=wl(c).substr(1),s=wl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function U(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,U=G.type||j.wrap,te=this.__keys[U],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+U+".");for(W=te.length;(W-=1)>=0;)if($=te[W],V=G[$],!!V){if(Array.isArray(V)){for(K=V.length;(K-=1)>=0;)if(V[K]&&!E(L,V[K])){if(S(U,te[W]))j=new g(V[K],[$,K],"Property",null);else if(b(V[K]))j=new g(V[K],[$,K],null,null);else continue;I.push(j)}}else if(b(V)){if(E(L,V))continue;I.push(new g(V,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,U;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(U,1)):U+=1;if(U===I.length)return a.Break;if(I[U].extendedRange[0]>Q.range[1])return a.Skip}}),U=0,k(F,{leave:function(Q){for(var $;UQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}($c)),$c}var oo={},rL="esrecurse",nL="ECMAScript AST recursive visitor",sL="https://github.com/estools/esrecurse",iL="esrecurse.js",aL="4.3.0",oL={node:">=4.0"},lL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],uL={type:"git",url:"https://github.com/estools/esrecurse.git"},cL={estraverse:"^5.2.0"},fL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},pL="BSD-2-Clause",hL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},dL={presets:["es2015"]},mL={name:rL,description:nL,homepage:sL,main:iL,version:aL,engines:oL,maintainers:lL,repository:uL,dependencies:cL,devDependencies:fL,license:pL,scripts:hL,babel:dL},RO;function gL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class U extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:V}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===V.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===V.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===V.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===V.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===V.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===V.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===V.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===V.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===V.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Ut=256,tr=Re|Se|Ut;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ve=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Vt=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Vt.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Ut)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Ut))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ut)>0},Vt.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,U.lastIndex=w,w+=U.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var hr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var w=U.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){U.lastIndex=this.pos;var tt=U.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new hr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ue=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ue&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Ut|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Vt.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new hr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Vt.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Ui(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Ui(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Vi(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Vi(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Uc}var NO;function bL(){return NO||(NO=1,function(c){const s=yL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(qc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||qc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(Qc)),Qc.exports}var uo={},MO;function vL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Pl(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=qc(),s=bL(),u=vL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var V=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,V.get?V:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],V=W.at(-1),ae={type:o.Template,value:K.slice(te.start,V.end)};return te.loc&&(ae.loc={start:te.loc.start,end:V.loc.end}),te.range&&(ae.start=te.range[0],ae.end=V.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,V=this._acornTokTypes;if(te===V.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===V.privateId)W.type=o.PrivateIdentifier;else if(te===V.semi||te===V.comma||te===V.parenL||te===V.parenR||te===V.braceL||te===V.braceR||te===V.dot||te===V.bracketL||te===V.colon||te===V.question||te===V.bracketR||te===V.ellipsis||te===V.arrow||te===V.jsxTagStart||te===V.incDec||te===V.starstar||te===V.jsxTagEnd||te===V.prefix||te===V.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===V.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===V.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===V.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===V.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===V.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,V=K.tokens,ae=this._tokens,z=()=>{V.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),V.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),V=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:V,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,V,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=V,ce.range=[te,V]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(V,ae){(typeof V!="object"||V===null)&&(V={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=V.sourceType,ue=E(V),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const V=this[k],ae=V.tokens;return V.comments&&(ae.comments=V.comments),ae}finishNode(...V){const ae=super.finishNode(...V);return this[D](ae)}finishNodeAt(...V){const ae=super.finishNodeAt(...V);return this[D](ae)}parse(){const V=this[k],ae=super.parse();if(ae.sourceType=V.originalSourceType,V.comments&&(ae.comments=V.comments),V.tokens&&(ae.tokens=V.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return V.lastToken&&(ae.range&&(ae.range[1]=V.lastToken.range[1]),ae.loc&&(ae.loc.end=V.lastToken.loc.end),ae.end=V.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(V){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(V)}raise(V,ae){const z=W.acorn.getLineInfo(this.input,V),ue=new SyntaxError(ae);throw ue.index=V,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(V,ae){this.raise(V,ae)}unexpected(V){let ae="Unexpected token";if(V!=null){if(this.pos=V,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(V){const ae=super.jsx_readString(V);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](V){return V.type==="TemplateElement"&&this[k].templateElements.push(V),V.type.includes("Function")&&!V.generator&&(V.generator=!1),V}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),U=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=U,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function xL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",U="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",V="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[U]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[V]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ue||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Vt}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var OL="eslint",SL="9.12.0",EL="Nicholas C. Zakas ",CL="An AST-based pattern checker for JavaScript.",wL={eslint:"./bin/eslint.js"},kL="./lib/api.js",AL="./lib/types/index.d.ts",PL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},TL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},DL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},IL={"pre-commit":"lint-staged"},RL=["LICENSE","README.md","bin","conf","lib","messages"],FL="eslint/eslint",_L="https://eslint.org/donate",BL="https://eslint.org",LL="https://github.com/eslint/eslint/issues/",NL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},ML={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},$L={jiti:"*"},jL={jiti:{optional:!0}},qL=["ast","lint","javascript","ecmascript","espree"],QL="MIT",UL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:OL,version:SL,author:EL,description:CL,bin:wL,main:kL,types:AL,exports:PL,typesVersions:TL,scripts:DL,gitHooks:IL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:RL,repository:FL,funding:_L,homepage:BL,bugs:LL,dependencies:NL,devDependencies:ML,peerDependencies:$L,peerDependenciesMeta:jL,keywords:qL,license:QL,engines:UL},Tl={},xs=[],Zn=[],WL=typeof Uint8Array<"u"?Uint8Array:Array,Vc=!1;function qO(){Vc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new WL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function zL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function ZL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Dl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function UO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var XL={}.toString,VO=Array.isArray||function(c){return XL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var YL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Il();function Il(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Vs(c,s){if(Il()=Il())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Il().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return _l(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function tN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return fN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return uN(this,s,u);case"latin1":case"binary":return cN(this,s,u);case"base64":return oN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return rN(this,s,u,p);case"utf8":case"utf-8":return nN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return sN(this,s,u,p);case"base64":return iN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return lN(p)}var KO=4096;function lN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Rl(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2};function Fl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Fl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Fl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),UO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),UO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function yN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return GL(dN(c))}function Bl(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function vN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||xN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function xN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),$l(s)?u.showHidden=s:s&&rf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=SN),Ml(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function SN(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function EN(c,s){return c}function CN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Ml(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Ml(c,p,u)),p}var a=wN(c,s);if(a)return a;var d=Object.keys(s),v=CN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Yc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Yc(s)}var o="",y=!1,O=["{","}"];if(Kc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Yc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=kN(c,s,u,v,d):g=d.map(function(f){return Hc(c,s,u,v,f,y)}),c.seen.pop(),AN(g,o,O)}function wN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Jc(s))return c.stylize(""+s,"number");if($l(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Yc(c){return"["+Error.prototype.toString.call(c)+"]"}function kN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function AN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Kc(c){return Array.isArray(c)}function $l(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Jc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&ef(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&ef(c)==="[object Date]"}function ha(c){return Li(c)&&(ef(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function jl(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function ef(c){return Object.prototype.toString.call(c)}function tf(c){return c<10?"0"+c.toString(10):c.toString(10)}var PN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function TN(){var c=new Date,s=[tf(c.getHours()),tf(c.getMinutes()),tf(c.getSeconds())].join(":");return[c.getDate(),PN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",TN(),Ll.apply(null,arguments))}function rf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function nf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,U=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=U(xe/je);xe>G*k>>1;Ge+=S)xe=U(xe/G);return U(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>U((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtU(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),U(Ge/nr)>b-ut&&$("overflow"),ut+=U(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnU((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Ut(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ve=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ve))Ce=Ce.replace(Ve,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Ut(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Vt(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var hr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:hr.domainHost,parse:hr.parse,serialize:hr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ue="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ue+"%"+Ue+Ue+"%"+Ue+Ue)+"|"+a("%[89A-Fa-f]"+Ue+"%"+Ue+Ue)+"|"+a("%"+Ue+Ue)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return U[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,V=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;vf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],U=L[3],Q=L[5];return(j<=23&&G<=59&&U<=59||j==23&&G==59&&U==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return vf}var xf,TS;function $N(){return TS||(TS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),xf}var Of,DS;function jN(){return DS||(DS=1,Of=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),Of}var Sf,IS;function qN(){return IS||(IS=1,Sf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),wf}var kf,BS;function WN(){return BS||(BS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),kf}var Af,LS;function GN(){return LS||(LS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),Af}var Pf,NS;function zN(){return NS||(NS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Pf}var Tf,MS;function ZN(){return MS||(MS=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Tf}var Df,$S;function XN(){return $S||($S=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,U=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Df}var If,jS;function qS(){return jS||(jS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),If}var Rf,QS;function US(){return QS||(QS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,VS;function WS(){return VS||(VS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,GS;function zS(){return GS||(GS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,ZS;function YN(){return ZS||(ZS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Bf}var Lf,XS;function HN(){return XS||(XS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Lf}var Nf,YS;function KN(){return YS||(YS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Nf}var Mf,HS;function JN(){return HS||(HS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Mf}var $f,KS;function eM(){return KS||(KS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(V),P=s.schema.patternProperties||{},N=Object.keys(P).filter(V),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,U=s.opts.removeAdditional,Q=j||G||U,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ve=s.util.getProperty(z),it=x+Ve,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ve,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Vt=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),$f}var jf,JS;function tM(){return JS||(JS=1,jf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Qf}var Uf,r1;function sM(){return r1||(r1=1,Uf={$ref:$N(),allOf:jN(),anyOf:qN(),$comment:QN(),const:UN(),contains:VN(),dependencies:WN(),enum:GN(),format:zN(),if:ZN(),items:XN(),maximum:qS(),minimum:qS(),maxItems:US(),minItems:US(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:YN(),not:HN(),oneOf:KN(),pattern:JN(),properties:eM(),propertyNames:tM(),required:rM(),uniqueItems:nM(),validate:wS()}),Uf}var Vf,n1;function iM(){if(n1)return Vf;n1=1;var c=sM(),s=da().toHash;return Vf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Vf}var Wf,s1;function aM(){if(s1)return Wf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Wf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),U={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...U},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...U},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...U},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...U,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,V=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Ut=new Error(qt,{cause:kt});throw kt.code&&(Ut.code=kt.code),Ut}}validateEnvironment(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Tl.Legacy=Re,Tl}var Ql={exports:{}},Ul={exports:{}},Kf,m1;function l$(){if(m1)return Kf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Kf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Kf}var Jf,g1;function y1(){if(g1)return Jf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=l$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ul,Ul.exports)),Ul.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var c$={isatty:v1,ReadStream:x1,WriteStream:O1},f$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:c$,isatty:v1}),p$=i(f$),S1;function h$(){return S1||(S1=1,function(c,s){const u=p$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=gH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?Ql.exports=u$():Ql.exports=h$()),Ql.exports}var ep,C1;function tp(){if(C1)return ep;C1=1;const c=kl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),U=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ue=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ue=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ue=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ue=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ue},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),V=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ue=Object.getOwnPropertyDescriptor(Te,ke);if(Ue)return Ue;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ue=0;Ue":return{value:Te.value>Ue.value};case">=":return{value:Te.value>=Ue.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ue.value};case">>>":return{value:Te.value>>>Ue.value};case"+":return{value:Te.value+Ue.value};case"-":return{value:Te.value-Ue.value};case"*":return{value:Te.value*Ue.value};case"/":return{value:Te.value/Ue.value};case"%":return{value:Te.value%Ue.value};case"**":return{value:Te.value**Ue.value};case"|":return{value:Te.value|Ue.value};case"^":return{value:Te.value^Ue.value};case"&":return{value:Te.value&Ue.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ue=ue(Ie.arguments,ke);if(Ue!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ue)};if(V.has(Pe[de]))return{value:Ue[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ue)};if(V.has(Oe))return{value:Ue[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ue=Te.defs[0];if(Ue.parent&&Ue.parent.kind==="const"&&Ue.node.id.type==="Identifier")return ce(Ue.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ue=ce(Ie.right,ke);if(Ue!=null)return Ue}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ue=pe(Ie,ke);if(Ue!=null&&!z(Te.value,Ue.value))return{value:Te.value[Ue.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ue=ue(Ie.arguments,ke);if(Te!=null&&Ue!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ue)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ue of Ie.properties)if(Ue.type==="Property"){if(Ue.kind!=="init")return null;const lt=pe(Ue,ke),Oe=ce(Ue.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ue.type==="SpreadElement"||Ue.type==="ExperimentalSpreadProperty"){const lt=ce(Ue.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ue=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ue!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ue)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ue=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ue}=Ie;return typeof this[Ue]=="function"?this[Ue](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ue}=Ie;for(const lt of Te[Ue]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ue=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ue},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ue,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ue=Ie|0,lt=ke,Oe=Te,!(Ue>=1))throw new TypeError("'times' should be a positive integer.")}else Ue=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ue>0);return Ue===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Ut=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ue=ke-1;Ue>=0&&Ie.charCodeAt(Ue)===92;--Ue)Te=!Te;return Te}function fe(Ie,ke,Te){const Ue=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}function Ve(Ie,ke,Te){const Ue=[];let lt=0;for(const Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Ut.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ue}=Ut.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ue||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ve(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Vt=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function hr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ue=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ue.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ue=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ue,!0))}for(const Te of this.globalObjectNames){const Ue=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ue,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ue=oe(Te.arguments[0]);if(Ue==null||!Bt(ke,Ue))continue;const lt=ke[Ue],Oe=[Ue];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ue of Te.body){if(!Pt.test(Ue.type)||Ue.source==null)continue;const lt=Ue.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ue,path:Pe,type:se,info:Oe[se]}),Ue.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ue,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ue.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ue,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ue[se]&&(yield{node:Pe,path:Te,type:se,info:Ue[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ue)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ue){let lt=ke;for(;hr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ue,Pe))return;Te=Te.concat(Pe);const de=Ue[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ue[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ue[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ue[Vt]&&(yield{node:Oe,path:Te,type:Vt,info:Ue[Vt]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue),yield*this._iteratePropertyReferences(Oe,Te,Ue));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ue))}*_iterateLhsReferences(ke,Te,Ue){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ue,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ue,Oe))continue;const Pe=Te.concat(Oe),de=Ue[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ue))}*_iterateImportReferences(ke,Te,Ue){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ue,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Vt,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Vt,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:U,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Vt,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=U,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(rp)),rp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Wl,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=lp;function lp(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",lp)}En.notDeepStrictEqual=up;function up(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",up)}En.strictEqual=cp;function cp(c,s,u){c!==s&&Cn(c,s,u,"===",cp)}En.notStrictEqual=fp;function fp(c,s,u){c===s&&Cn(c,s,u,"!==",fp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function v$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=v$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var x$=Object.freeze({__proto__:null,AssertionError:Wl,assert:mo,deepEqual:ap,deepStrictEqual:op,default:En,doesNotThrow:j1,equal:sp,fail:Cn,ifError:q1,notDeepEqual:lp,notDeepStrictEqual:up,notEqual:ip,notStrictEqual:fp,ok:mo,strictEqual:cp,throws:$1}),Gl=i(x$),pp,Q1;function go(){return Q1||(Q1=1,pp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),pp}var yo={},U1;function bo(){return U1||(U1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var hp,V1;function O$(){if(V1)return hp;V1=1;const c=go(),s=bo();return hp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},hp}var dp,W1;function S$(){if(W1)return dp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return dp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},dp}var mp,G1;function gp(){if(G1)return mp;G1=1;const c=go();return mp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},mp}var yp,z1;function E$(){if(z1)return yp;z1=1;const c=gp();return yp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},yp}var bp,Z1;function C$(){if(Z1)return bp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return bp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},Op}var Sp,H1;function k$(){if(H1)return Sp;H1=1;const c=gp();return Sp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Sp}var Ep,K1;function A$(){if(K1)return Ep;K1=1;const c=O$(),s=S$(),u=E$(),p=C$(),a=xp(),d=w$(),v=k$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Ep={forward:new m(a,p),backward:new m(s,c)},Ep}var Cp,J1;function P$(){if(J1)return Cp;J1=1;const c=xp();return Cp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Cp}var wp,eE;function T$(){if(eE)return wp;eE=1;const c=Gl,{isCommentToken:s}=Kr(),u=A$(),p=xp(),a=P$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return wp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Tp}var Dp,lE;function Ip(){if(lE)return Dp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Rp=d,Rp}var Fp,cE;function I$(){if(cE)return Fp;cE=1;const c=Ip(),s=D$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,U=this.thrownForkContext;G.add=f.bind(null,G,U,j),U.add=f.bind(null,U,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const U=this.choiceContext;return U.trueForkContext.addAll(I.trueForkContext),U.falseForkContext.addAll(I.falseForkContext),U.nullishForkContext.addAll(I.nullishForkContext),U.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const U=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,U,I.defaultBodySegments)):j.add(U));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Fp=P,Fp}var _p,fE;function pE(){if(fE)return _p;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return _p=c,_p}var Bp,hE;function R$(){if(hE)return Bp;hE=1;const c=I$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Lp=R,Lp}var Np,mE;function gE(){return mE||(mE=1,Np=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Np}var ji={},Mp={exports:{}},$p={exports:{}},jp,yE;function _$(){if(yE)return jp;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Up={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)V?te:V}),s=K(function(te,V){return te0?1:0},d=K(function(te,V){return~~(te/V)}),v=K(function(te,V){return te%V}),m=K(function(te,V){return Math.floor(te/V)}),o=K(function(te,V){var ae;return(te%(ae=V)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,V){return Math.pow(te,V)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,V){return Math.atan2(te,V)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},U=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,V){var ae;for(te=Math.abs(te),V=Math.abs(V);V!==0;)ae=te%V,te=V,V=ae;return te}),W=K(function(te,V){return Math.abs(Math.floor(te/$(te,V)*V))}),Vp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:U,odd:Q,gcd:$,lcm:W};function K(te,V){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,ZB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,ZB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Yp,FE;function V$(){var j;if(FE)return Yp;FE=1;const{isCommentToken:c}=Kr(),s=T$(),u=zl(),p=tp(),a=nE(),{directivesPattern:d}=iE(),v=F$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=jc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,U){const Q=[];let $=0,W=0;for(;$=U.length||$=U.range[0]||U.range[0]<=G.range[0]&&U.range[1]>=G.range[0]}function F(G,U,Q,$){if(R(U,Q))return!1;const[W,K]=U.range[1]<=Q.range[0]?[U,Q]:[Q,U],te=G.getLastToken(W)||W,V=G.getFirstToken(K)||K;let ae=te;for(;ae!==V;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==V&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,U={},Q={}){for(const $ of new Set([...Object.keys(U),...Object.keys(Q)])){const W=U[$]===void 0?void 0:T(U[$]),te=Q[$]&&Q[$].value||W,V=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=V!==void 0,ae.eslintExplicitGlobalComments=V,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,U){Object.keys(U).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,V,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,V=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=V||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const V=this.scopeManager.acquire(te,K);if(V)return V.type==="function-expression-name"?($.set(Q,V.childScopes[0]),V.childScopes[0]):($.set(Q,V),V)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const V=te.variables.find(ae=>ae.name===Q);if(V)return V.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:V,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(V);if(!(te.type==="Line"&&!ue)){if(V==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${V} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(V){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=V.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(V=>{const{label:ae,value:z}=f.parseDirective(V.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:V.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(V),K[ue].value=ce):K[ue]={comments:[V],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:V.loc}):Q.push({ruleId:null,loc:V.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Yp=L,Yp}var Hp,_E;function BE(){return _E||(_E=1,Hp={SourceCode:V$()}),Hp}var Kp,LE;function Zl(){return LE||(LE=1,Kp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Kp}var Jp,NE;function W$(){if(NE)return Jp;NE=1;const c=Zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Jp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Jp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function eh(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function G$(c){return function(s){if(Array.isArray(s))return th(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return th(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?th(c,s):void 0}}function th(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[U]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[U]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,U,Q,$,W,K,te;function V(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(U=$.length;(U-=1)>=0;)if($[U]){if(S(I,Q[G]))j=new g($[U],[te,U],"Property",new x($,U));else{if(!b($[U]))continue;j=new g($[U],[te,U],null,new x($,U))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||V(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)U.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(U),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var U;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),z$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=hr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,U=hr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=hr(["\\",'"'],!0,!1),V=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=hr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=hr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=hr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=hr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=hr(["/"],!0,!1),qt=Zt(":not(",!1),Ut=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ve=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Vt=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function hr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beVt&&(Vt=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ue(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(U))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Ut)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ve)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&UE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&UE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function nh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Xl.VisitorKeys[p]?Xl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function sh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=eh(u,1)[0];if(!d)return!1;for(var v=nh(d,a),m=0;m0&&sh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return oh={getPlaceholderMatcher:c,interpolate:s},oh}var lh,YE;function H$(){if(YE)return lh;YE=1;const c=Gl,{RuleFixer:s}=X$(),{interpolate:u}=Y$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return lh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},lh}function K$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uh,HE;function J$(){if(HE)return uh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),uh={LazyLoadingRuleMap:s},uh}var ch={exports:{}},xo={},fh={exports:{}},KE;function e3(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}fh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),fh.exports}var ph={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ph.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ph.exports}var hh={exports:{}},tC;function t3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}hh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),hh.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=e3(),xo.code=eC(),xo.keyword=t3()}()),xo}var dh,sC;function iC(){return sC||(sC=1,dh={LATEST_ECMA_VERSION:2025}),dh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=kl(),u=nC(),p=Pl(),a=Zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=zl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function U(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function V(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Ut(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ve(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Vt(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ve(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ve):ee.getFirstToken(X,Ve)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ue(ee.left,ee.operator),Ke=be&&ve&&Ue(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ue(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:V,isES5Constructor:G,getUpperFunction:U,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Vt,isDotToken:qt,isQuestionDotToken:Ut,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Ut),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ve),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ve,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=U(Ne);if(Ke===null||!V(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!V(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(V(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},mh}var gh,lC;function n3(){if(lC)return gh;lC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},gh}var yh,uC;function s3(){if(uC)return yh;uC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},yh}var bh,cC;function i3(){if(cC)return bh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return bh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},bh}var vh,fC;function a3(){if(fC)return vh;fC=1;const c=Ze();return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},vh}var xh,pC;function o3(){if(pC)return xh;pC=1;const c=Ze();return xh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},xh}var Oh,hC;function l3(){if(hC)return Oh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},Oh}var Sh,dC;function u3(){if(dC)return Sh;dC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Sh}var Eh,mC;function c3(){return mC||(mC=1,Eh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Eh}var Ch,gC;function f3(){if(gC)return Ch;gC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Ch}var wh,yC;function p3(){if(yC)return wh;yC=1;const c=Ze();return wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},wh}var kh,bC;function h3(){return bC||(bC=1,kh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),kh}var Ah,vC;function d3(){if(vC)return Ah;vC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},Ah}var Ph,xC;function m3(){if(xC)return Ph;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ph={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ph}var Th,OC;function g3(){if(OC)return Th;OC=1;const c=Ze();return Th={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Th}var Dh,SC;function y3(){if(SC)return Dh;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Dh}var Ih,EC;function b3(){if(EC)return Ih;EC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Ih}var Rh,CC;function v3(){if(CC)return Rh;CC=1;const c=Ze();return Rh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Rh}var Fh,wC;function Qi(){if(wC)return Fh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Fh={upperCaseFirst:u,getGraphemeCount:p},Fh}var _h,kC;function x3(){if(kC)return _h;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return _h={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},_h}var Bh,AC;function O3(){if(AC)return Bh;AC=1;const c=Ze();return Bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Bh}var Lh,PC;function S3(){if(PC)return Lh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Lh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Lh}var Nh,TC;function E3(){return TC||(TC=1,Nh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Nh}var Mh,DC;function C3(){if(DC)return Mh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Mh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const U=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+U)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},$h}var jh,RC;function k3(){if(RC)return jh;RC=1;const c=/^no default$/iu;return jh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},jh}var qh,FC;function A3(){return FC||(FC=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),qh}var Qh,_C;function P3(){return _C||(_C=1,Qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),Qh}var Uh,BC;function T3(){if(BC)return Uh;BC=1;const c=Ze();return Uh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Uh}var Vh,LC;function Wh(){return LC||(LC=1,Vh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Vh}var Gh,NC;function D3(){if(NC)return Gh;NC=1;const c=Ze(),s=Wh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Gh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Gh}var zh,MC;function I3(){return MC||(MC=1,zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),zh}var Zh,$C;function R3(){if($C)return Zh;$C=1;const c=Ze();return Zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Zh}var Xh,jC;function F3(){if(jC)return Xh;jC=1;const{getStaticValue:c}=Kr();return Xh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Xh}var Yh,qC;function _3(){if(qC)return Yh;qC=1;const c=Ze();return Yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Hh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Hh}var Kh,UC;function L3(){if(UC)return Kh;UC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Kh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Kh}var Jh,VC;function N3(){return VC||(VC=1,Jh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Jh}var ed,WC;function M3(){return WC||(WC=1,ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return sd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},sd}var id,YC;function U3(){if(YC)return id;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},id}var ad,HC;function V3(){return HC||(HC=1,ad={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),ad}var od,KC;function W3(){return KC||(KC=1,od={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),od}var ld,JC;function G3(){if(JC)return ld;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ld={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ld}var ud,ew;function z3(){if(ew)return ud;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ud={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ud}var cd,tw;function Z3(){if(tw)return cd;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return cd={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},cd}var fd,rw;function X3(){return rw||(rw=1,fd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),fd}var pd,nw;function Y3(){if(nw)return pd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},pd}var hd,sw;function H3(){if(sw)return hd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return hd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function U(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function V(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:V}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||V(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(V,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[V.range[1]-V.loc.end.column,V.range[1]-V.loc.end.column+z+ue]:[V.range[0]-V.loc.start.column,V.range[0]-V.loc.start.column+z+ue];s.report({node:V,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(V,ae){const z=ae?o.getLastToken(V):o.getFirstToken(V),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(V,ae){const z=ae===!0?o.getLastToken(V,1):o.getTokenBefore(V),ue=ae===!0?V.loc.end.line:V.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(V,ae){const z=g(V,!1);if(V.type!=="ArrayExpression"&&V.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab),V.type==="IfStatement"&&V.alternate){const ue=o.getTokenBefore(V.alternate);b(ue,ae),f(V.alternate)||b(V.alternate,ae)}if(V.type==="TryStatement"&&V.handler){const ue=o.getFirstToken(V.handler);b(ue,ae)}if(V.type==="TryStatement"&&V.finalizer){const ue=o.getTokenBefore(V.finalizer);b(ue,ae)}if(V.type==="DoWhileStatement"){const ue=o.getTokenAfter(V.body);b(ue,ae)}}function S(V,ae){V.forEach(z=>b(z,ae))}function E(V,ae){const z=o.getLastToken(V),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(V,!0)&&x(V,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(V,ae){const z=o.getLastToken(V,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(V,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(V,ae){const z=g(V,!1);(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab,{line:V.loc.start.line,column:V.loc.start.column})}function T(V,ae,z){let ue=V.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(V){return T(V,"VariableDeclarator")}function F(V,ae){return ae&&ae.parent.loc.start.line===V.loc.start.line&&ae.parent.declarations.length>1}function P(V){const ae=V.parent;return ae.arguments.length>=2&&ae.arguments[1]===V?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(V){const ae=V.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==V)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(V){const ae=V.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(V.body,z),E(V,z-ue)}function L(V){const ae=o.getLastToken(V),z=V.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(V){if(L(V))return;let ae=V.type==="ArrayExpression"?V.elements:V.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(V);if(f(V)){const ce=V.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==V.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=V.parent.type==="ObjectExpression"?V.parent.properties:V.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(V)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(V,z)}else z=g(V).goodChar;m[V.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[V.type],F(V,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===V.loc.end.line)&&E(V,z+(F(V,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(V){return V.type==="BlockStatement"||V.type==="ClassBody"||V.body&&V.body.type==="BlockStatement"||V.consequent&&V.consequent.type==="BlockStatement"}function U(V){if(L(V))return;if(V.parent&&(V.parent.type==="FunctionExpression"||V.parent.type==="FunctionDeclaration"||V.parent.type==="ArrowFunctionExpression")){I(V);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];V.parent&&ue.includes(V.parent.type)&&G(V)?ae=g(V.parent).goodChar:V.parent&&V.parent.type==="CatchClause"?ae=g(V.parent.parent).goodChar:ae=g(V).goodChar,V.type==="IfStatement"&&V.consequent.type!=="BlockStatement"?z=[V.consequent]:Array.isArray(V.body)?z=V.body:z=[V.body],z.length>0&&S(z,ae+v),V.type==="BlockStatement"&&E(V,ae)}function Q(V){return V.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==V.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(V){const ae=Q(V),z=g(V).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[V.kind];if(S(ae,ne),o.getLastToken(V).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(V,g(ce).goodChar):E(V,ne-v)}function W(V){V.body.type!=="BlockStatement"&&U(V)}function K(V,ae){const z=V.type==="SwitchStatement"?V:V.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(V){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(V).replace(o.getText(V.argument),"");return ae.test(z)}return{Program(V){V.body.length>0&&S(V.body,g(V).goodChar)},ClassBody:U,BlockStatement:U,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(V){V.consequent.type!=="BlockStatement"&&V.consequent.loc.start.line>V.loc.start.line&&U(V)},VariableDeclaration(V){V.declarations.at(-1).loc.start.line>V.declarations[0].loc.start.line&&$(V)},ObjectExpression(V){j(V)},ArrayExpression(V){j(V)},MemberExpression(V){if(typeof m.MemberExpression>"u"||L(V)||T(V,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(V,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(V).goodChar+v*m.MemberExpression,z=[V.property],ue=o.getTokenBefore(V.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(V){const ae=g(V).goodChar,z=K(V,ae);S(V.cases,z),E(V,ae)},SwitchCase(V){if(L(V))return;const ae=K(V);S(V.consequent,ae+v)},FunctionDeclaration(V){L(V)||(m.FunctionDeclaration.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(V){L(V)||(m.FunctionExpression.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(V){if(L(V))return;const ae=g(V).goodChar;te(V)?k(V,ae):b(V,ae)},CallExpression(V){L(V)||(m.CallExpression.arguments==="first"&&V.arguments.length?S(V.arguments.slice(1),V.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(V.arguments,g(V).goodChar+v*m.CallExpression.arguments))}}}},dd}var md,aw;function J3(){if(aw)return md;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return md={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const V=W.length-K;if((V&&te==="strict"||V<0&&te==="minimum"||V>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=V>0,pe=Math.abs(V),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),V,ae,z;f&&$>1?(V=f.beforeColon,ae=f.afterColon,z=f.mode):(V=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?V:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,V,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):U(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},yd}var bd,uw;function r5(){if(uw)return bd;uw=1;const c=Ze(),s=Wh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:U,ExportNamedDeclaration:V,ExportDefaultDeclaration:V,ExportAllDeclaration:V,FunctionDeclaration:G,ImportDeclaration:V,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:U,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},bd}var vd,cw;function n5(){if(cw)return vd;cw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},vd}var xd,fw;function s5(){if(fw)return xd;fw=1;const c=Ze();return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},xd}var Od,pw;function i5(){if(pw)return Od;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function U($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const V=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&U($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(V<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(V)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},Od}var Sd,hw;function a5(){if(hw)return Sd;hw=1;const c=Ze();return Sd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Sd}var Ed,dw;function o5(){if(dw)return Ed;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Ed}var Cd,mw;function l5(){if(mw)return Cd;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Cd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),U=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||U)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield U.insertTextBefore(W,I.operator),yield U.removeRange([R.range[0],P.range[0]]),yield U.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield U.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Cd}var wd,gw;function u5(){return gw||(gw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),wd}var kd,yw;function c5(){return yw||(yw=1,kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),kd}var Ad,bw;function f5(){if(bw)return Ad;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return Ad={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(U,Q){let $=0;return U.replace(/\t/gu,(W,K)=>{const te=K+$,V=Q?te%Q:0,ae=Q-V;$+=ae-1}),Array.from(U).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(U,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===U.length)}function D(U,Q,$){const W=$.loc.start,K=$.loc.end,te=!U.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===U.length)}function T(U){if(!U||!U.parent||U.type!=="JSXEmptyExpression"||U.parent.type!=="JSXExpressionContainer")return!1;const Q=U.parent;return Q.loc.start.line===Q.loc.end.line}function R(U,Q){return U.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(U,Q,$){Array.isArray(U[Q])||(U[Q]=[]),U[Q].push($)}function P(){return a.ast.tokens.filter(U=>U.type==="String"||U.type==="JSXText"&&a.getNodeByRangeIndex(U.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(U=>U.type==="Template")}function I(){return a.ast.tokens.filter(U=>U.type==="RegularExpression")}function L(U){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?U.at(-1)!==$.parent&&U.push($.parent):U.push(Q)}),U}function G(U){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),V=N(),ae=L(V),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:U,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:U,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},Ad}var Pd,vw;function p5(){if(vw)return Pd;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Pd}var Td,xw;function h5(){if(xw)return Td;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Td}var Dd,Ow;function d5(){return Ow||(Ow=1,Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Dd}var Id,Sw;function m5(){if(Sw)return Id;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Id}var Rd,Ew;function g5(){if(Ew)return Rd;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Rd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Rd}var Fd,Cw;function y5(){if(Cw)return Fd;Cw=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Fd}var _d,ww;function b5(){if(ww)return _d;ww=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const U=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=U+K.length;return G.replaceTextRange([U,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=U+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const V=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=V.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([U,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},_d}var Bd,kw;function v5(){if(kw)return Bd;kw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Bd}var Ld,Aw;function x5(){if(Aw)return Ld;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Ld={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Ld}var Nd,Pw;function O5(){if(Pw)return Nd;Pw=1;const c=Ze();return Nd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Nd}var Md,Tw;function S5(){if(Tw)return Md;Tw=1;const c=Ze();return Md={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Md}var $d,Dw;function E5(){return Dw||(Dw=1,$d={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),$d}var jd,Iw;function C5(){if(Iw)return jd;Iw=1;const c=Ze();return jd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},jd}var qd,Rw;function w5(){if(Rw)return qd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return qd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},qd}var Qd,Fw;function k5(){if(Fw)return Qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return Qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},Qd}var Ud,_w;function A5(){return _w||(_w=1,Ud={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Ud}var Vd,Bw;function P5(){if(Bw)return Vd;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Vd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Vd}var Wd,Lw;function T5(){if(Lw)return Wd;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Wd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Wd}var Gd,Nw;function D5(){return Nw||(Nw=1,Gd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Gd}var zd,Mw;function I5(){return Mw||(Mw=1,zd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),zd}var Zd,$w;function R5(){return $w||($w=1,Zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Zd}var Xd,jw;function F5(){if(jw)return Xd;jw=1;const c=Ze();return Xd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Xd}var Yd,qw;function _5(){if(qw)return Yd;qw=1;const c=Ze();return Yd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Yd}var Hd,Qw;function B5(){return Qw||(Qw=1,Hd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Hd}var Kd,Uw;function L5(){if(Uw)return Kd;Uw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Kd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Kd}var Jd,Vw;function N5(){if(Vw)return Jd;Vw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Jd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Jd}var em,Ww;function M5(){if(Ww)return em;Ww=1;const c=Ze();return em={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},em}var tm,Gw;function $5(){if(Gw)return tm;Gw=1;const c=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},tm}var rm,zw;function j5(){if(zw)return rm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return rm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},rm}var nm,Zw;function q5(){if(Zw)return nm;Zw=1;const{isConstant:c}=Ze();return nm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},nm}var sm,Xw;function Q5(){return Xw||(Xw=1,sm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),sm}var im,Yw;function U5(){return Yw||(Yw=1,im={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,U=33,Q=35,$=36,W=37,K=38,te=40,V=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Ut=66,tr=68,fe=70,Ve=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Vt=98,ir=99,Ot=100,Zt=102,hr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ue=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,V,be,ve,at,ht,dt]),Xn=new Set([K,U,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,V,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,U,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Ui(nt){return ws(nt)||bt(nt)}class Vi{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===V&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==U)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(U))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==V&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ve)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ue)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Ui(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Vi(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Vi(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Vi,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var am,Kw;function V5(){if(Kw)return am;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return am={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},am}var om,Jw;function W5(){return Jw||(Jw=1,om={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,ek;function G5(){return ek||(ek=1,lm={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),lm}var um,tk;function z5(){return tk||(tk=1,um={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),um}var cm,rk;function Z5(){return rk||(rk=1,cm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),cm}var fm,nk;function X5(){if(nk)return fm;nk=1;const c=Ze();return fm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},fm}var pm,sk;function Y5(){if(sk)return pm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return pm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},pm}var hm,ik;function H5(){if(ik)return hm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},hm}var dm,ak;function K5(){if(ak)return dm;ak=1;const c=Ze();return dm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},dm}var mm,ok;function J5(){if(ok)return mm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return mm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},mm}var gm,lk;function Oo(){if(lk)return gm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return gm=s,gm}var ym,uk;function ej(){if(uk)return ym;uk=1;const c=Ze(),s=Oo();return ym={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),U=p.getTokenBefore(G);if(U.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===U.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},ym}var bm,ck;function tj(){if(ck)return bm;ck=1;const c=Ze();return bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},bm}var vm,fk;function rj(){if(fk)return vm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return vm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},vm}var xm,pk;function nj(){if(pk)return xm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return xm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},xm}var Om,hk;function sj(){if(hk)return Om;hk=1;const c=Ze();return Om={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},Om}var Sm,dk;function ij(){return dk||(dk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Sm}var Em,mk;function aj(){return mk||(mk=1,Em={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Em}var Cm,gk;function oj(){if(gk)return Cm;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Cm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Cm}var wm,yk;function lj(){if(yk)return wm;yk=1;const c=Ze();return wm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},wm}var km,bk;function uj(){if(bk)return km;bk=1;const c=Ze();return km={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},km}var Am,vk;function cj(){if(vk)return Am;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},Am}var Pm,xk;function fj(){if(xk)return Pm;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Pm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ve||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function U(fe){for(let Ve=fe;Ve;Ve=Ve.parent)if(Ve.type==="ReturnStatement"||Ve.type==="ArrowFunctionExpression"&&Ve.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ve=p.getLastToken(fe),mt=p.getTokenBefore(Ve);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ve)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ve.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ve.range[1],mt.range[0]);return Bt.replaceTextRange([Ve.range[0],mt.range[1]],(te(fe)?" ":"")+se+(V(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ve=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ve=Ve.object,mt=Ve.type;return mt==="CallExpression"}function Be(fe){const Ve=fe.callee;j(Ve,d(fe))&&(L(Ve)||!(ae(fe)||Ve.type==="NewExpression"&&!Q(Ve)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ve.type==="MemberExpression"&&pe(Ve)||!fe.optional&&Ve.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ve=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ve||mt===Ve&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ve||Pt===Ve&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ve=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ve,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ve)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ve){const mt=[fe];let Pt=fe;for(;Pt!==Ve;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ve){return Se(Ve,fe).reverse()}function Me(fe,Ve){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ve);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ve);case"MemberExpression":return fe.computed&&fe.property===Ve;case"ConditionalExpression":return fe.consequent===Ve;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ve,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ve),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ve=>Ve.node===fe)}function qt(fe){T.reports=T.reports.filter(Ve=>Ve.node!==fe)}function Ut(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Ut(fe.parent):!1}function tr({left:fe,operator:Ve,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ve)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ve=>Ve&&j(Ve,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ve=>z(Ve)&&I(Ve)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ve=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ve);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ve)&&a.add(Ve),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ve=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ve.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ve.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ve.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&a.add(Ve)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ve=>{const mt=we(fe,Ve);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ve=>Ve.value&&j(Ve.value,k)).forEach(Ve=>ne(Ve.value))},ObjectPattern(fe){fe.properties.filter(Ve=>{const mt=Ve.value;return z(mt)&&I(mt)}).forEach(Ve=>ne(Ve.value))},Property(fe){if(fe.computed){const{key:Ve}=fe;Ve&&j(Ve,k)&&ne(Ve)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ve=fe.argument;z(Ve)&&I(Ve)&&ne(Ve)},ReturnStatement(fe){const Ve=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ve,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ve=d(fe);fe.expressions.filter(mt=>j(mt,Ve)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ve=p.getFirstToken(fe);K(Ve,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ve}=fe,mt=p.getLastToken(fe);Ve.loc.end.line===mt.loc.start.line?ce(fe):L(Ve)&&ne(Ve)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ve=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ve,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ve=>Ve&&I(Ve)).forEach(ne)},AssignmentPattern(fe){const{left:Ve,right:mt}=fe;z(Ve)&&I(Ve)&&ne(Ve),mt&&j(mt,k)&&ne(mt)}}}},Dm}var Im,Ek;function dj(){if(Ek)return Im;Ek=1;const c=Oo(),s=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Im}var Rm,Ck;function mj(){if(Ck)return Rm;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Rm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Rm}var Fm,wk;function gj(){if(wk)return Fm;wk=1;const c=Ze();return Fm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Fm}var _m,kk;function yj(){if(kk)return _m;kk=1;const c=Ze();return _m={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},_m}var Bm,Ak;function bj(){return Ak||(Ak=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Bm}var Lm,Pk;function vj(){if(Pk)return Lm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Lm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Lm}var Nm,Tk;function xj(){return Tk||(Tk=1,Nm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Nm}var Mm,Dk;function Oj(){if(Dk)return Mm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Mm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Mm}var $m,Ik;function Sj(){if(Ik)return $m;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return $m={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},$m}var jm,Rk;function Ej(){if(Rk)return jm;Rk=1;const c=Ze();return jm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},jm}var qm,Fk;function Cj(){if(Fk)return qm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return qm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},qm}var Qm,_k;function wj(){if(_k)return Qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return Qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},Qm}var Um,Bk;function kj(){if(Bk)return Um;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Um={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Um}var Vm,Lk;function Aj(){if(Lk)return Vm;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Vm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const U=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:U,column:Q.index},end:{line:U,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let U=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],U+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),U=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Vm}var Wm,Nk;function Pj(){if(Nk)return Wm;Nk=1;const{getStaticPropertyName:c}=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Wm}var Gm,Mk;function Tj(){if(Mk)return Gm;Mk=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Gm}var zm,$k;function Dj(){if($k)return zm;$k=1;const c=Ze();return zm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},zm}var Zm,jk;function Ij(){return jk||(jk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Zm}var Xm,qk;function Rj(){return qk||(qk=1,Xm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Xm}var Ym,Qk;function Fj(){if(Qk)return Ym;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Ym={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Ym}var Hm,Uk;function _j(){return Uk||(Uk=1,Hm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Hm}var Km,Vk;function Bj(){if(Vk)return Km;Vk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Km={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),eg}var tg,zk;function Mj(){return zk||(zk=1,tg=function(s){return s>=127462&&s<=127487}),tg}var rg,Zk;function $j(){return Zk||(Zk=1,rg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),rg}var ng,Xk;function jj(){if(Xk)return ng;Xk=1;const c=Lj(),s=Nj(),u=Mj(),p=$j();return ng={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},ng}var sg,Yk;function ig(){if(Yk)return sg;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return sg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},sg}var ag,Hk;function qj(){if(Hk)return ag;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ag={parseStringLiteral:o,parseTemplateToken:y},ag}var og,Kk;function Qj(){if(Kk)return og;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=jj(),x=Ze(),{isValidWithUnicodeFlag:g}=ig(),{parseStringLiteral:f,parseTemplateToken:b}=qj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,U=I[j].end,Q=N.slice(G,U);return R(P,Q)}return og={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var U;const N=(U=P.options[0])==null?void 0:U.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let V=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return V??(V=f(ce)),F(ne,ce,V)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return V??(V=b(ce)),F(ne,ce,V)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];V??(V=b(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];V??(V=f(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,V;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),V=a(z,$);else{if(ue.regex)continue;te=String(ue.value),V=""}typeof V=="string"&&G(ae,te,V,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},og}var lg,Jk;function Uj(){if(Jk)return lg;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},lg}var ug,eA;function Vj(){return eA||(eA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),ug}var cg,tA;function Wj(){return tA||(tA=1,cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),cg}var fg,rA;function Gj(){return rA||(rA=1,fg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),fg}var pg,nA;function zj(){if(nA)return pg;nA=1;const c=Ze();return pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},pg}var hg,sA;function Zj(){if(sA)return hg;sA=1;const c=Ze();return hg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},hg}var dg,iA;function Xj(){return iA||(iA=1,dg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),dg}var mg,aA;function Yj(){return aA||(aA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),mg}var gg,oA;function Hj(){return oA||(oA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),gg}var yg,lA;function Kj(){return lA||(lA=1,yg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),yg}var bg,uA;function Jj(){return uA||(uA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),bg}var vg,cA;function eq(){return cA||(cA=1,vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),vg}var xg,fA;function tq(){if(fA)return xg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return xg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},xg}var Og,pA;function rq(){if(pA)return Og;pA=1;const c=["Symbol","BigInt"];return Og={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},Og}var Sg,hA;function nq(){if(hA)return Sg;hA=1;const c=Ze();return Sg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Sg}var Eg,dA;function sq(){return dA||(dA=1,Eg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Eg}var Cg,mA;function iq(){return mA||(mA=1,Cg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Cg}var wg,gA;function aq(){if(gA)return wg;gA=1;const{getVariableByName:c}=Ze();return wg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},wg}var kg,yA;function oq(){if(yA)return kg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return kg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},kg}var Ag,bA;function lq(){if(bA)return Ag;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return Ag={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},Ag}var Pg,vA;function uq(){if(vA)return Pg;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Pg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Pg}var Tg,xA;function cq(){return xA||(xA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Tg}var Dg,OA;function fq(){return OA||(OA=1,Dg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Dg}var Ig,SA;function pq(){if(SA)return Ig;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Ig={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Ig}var Rg,EA;function hq(){return EA||(EA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Rg}var Fg,CA;function dq(){if(CA)return Fg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Fg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Fg}var _g,wA;function mq(){return wA||(wA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),_g}var Bg,kA;function gq(){return kA||(kA=1,Bg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Bg}var Lg,AA;function yq(){if(AA)return Lg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Lg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Lg}var Ng,PA;function bq(){if(PA)return Ng;PA=1;const{getStaticPropertyName:c}=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Ng}var Mg,TA;function vq(){if(TA)return Mg;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Mg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Mg}var $g,DA;function xq(){if(DA)return $g;DA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},$g}var jg,IA;function Oq(){if(IA)return jg;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return jg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},jg}var qg,RA;function Sq(){if(RA)return qg;RA=1;const c=Ze();return qg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},qg}var Qg,FA;function Eq(){return FA||(FA=1,Qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),Qg}var Ug,_A;function BA(){if(_A)return Ug;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,V)=>Object.defineProperty(K,te,{value:V}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,V,ae)=>V.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,V)=>te+6{const ae=V.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,V,ae,z)=>te===p?`\\[${V}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(V)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let V=T[K];return V||(V=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=V),te?new RegExp(V,"i"):new RegExp(V)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,V,ae,z){this.origin=te,this.pattern=V,this.negative=ae,this.regex=z}}const L=(K,te)=>{const V=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(V,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,V)=>F(K)?K?G.isNotRelative(K)?V(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:V("path must not be empty",TypeError):V(`path must be a string, but got \`${te}\``,TypeError),U=K=>y.test(K);G.isNotRelative=U,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:V=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=V,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const V=L(te,this._ignoreCase);this._added=!0,this._rules.push(V)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,V){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!V)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,V,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,V,ae,z)}_t(te,V,ae,z){if(te in V)return V[te];if(z||(z=te.split(O)),z.pop(),!z.length)return V[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,V,ae,z);return V[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Ug=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=V=>/^\\\\\?\\/.test(V)||/["<>|\u0000-\u001F]+/u.test(V)?V:V.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=V=>te.test(V)||U(V)}return Ug}var Vg,LA;function Cq(){if(LA)return Vg;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Vg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Vg}var Wg,NA;function wq(){if(NA)return Wg;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Wg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Wg}var Gg,MA;function kq(){if(MA)return Gg;MA=1;const c=Ze();return Gg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Gg}var zg,$A;function Aq(){return $A||($A=1,zg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),zg}var Zg,jA;function Pq(){if(jA)return Zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Zg}var Xg,qA;function Tq(){if(qA)return Xg;qA=1;const c=Ze();return Xg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Xg}var Yg,QA;function Dq(){if(QA)return Yg;QA=1;const c=Ze();return Yg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Yg}var Hg,UA;function Iq(){if(UA)return Hg;UA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Kg}var Jg,WA;function Fq(){if(WA)return Jg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Jg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Jg}var e0,GA;function _q(){if(GA)return e0;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return e0={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},e0}var t0,zA;function Bq(){if(zA)return t0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return t0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,U=>u.has(U.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},t0}var r0,ZA;function Lq(){if(ZA)return r0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return r0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},r0}var n0,XA;function Nq(){return XA||(XA=1,n0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},a0}var o0,JA;function qq(){return JA||(JA=1,o0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),o0}var l0,eP;function Qq(){return eP||(eP=1,l0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),l0}var u0,tP;function Uq(){if(tP)return u0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return u0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},u0}var c0,rP;function Vq(){if(rP)return c0;rP=1;const c=Ze();return c0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},c0}var f0,nP;function Wq(){if(nP)return f0;nP=1;const c=Ze();return f0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&U{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},p0}var h0,iP;function zq(){if(iP)return h0;iP=1;const c=Ze();return h0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},h0}var d0,aP;function Zq(){return aP||(aP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),d0}var m0,oP;function Xq(){return oP||(oP=1,m0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let U=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(U.type);)U=U.parent;f(G)&&!S(G)&&!g(G)&&!(y&&U.type==="ArrayPattern")&&!(O&&U.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),m0}var g0,lP;function Yq(){if(lP)return g0;lP=1;const c=Ze();return g0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},g0}var y0,uP;function Hq(){if(uP)return y0;uP=1;const c=tp(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},y0}var b0,cP;function Kq(){if(cP)return b0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return b0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return v0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},v0}var x0,pP;function e6(){if(pP)return x0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return x0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},x0}var O0,hP;function t6(){if(hP)return O0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return O0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},O0}var S0,dP;function r6(){if(dP)return S0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return S0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},S0}var E0,mP;function n6(){if(mP)return E0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return E0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},E0}var C0,gP;function s6(){if(gP)return C0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return C0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},w0}var k0,bP;function a6(){return bP||(bP=1,k0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),k0}var A0,vP;function o6(){if(vP)return A0;vP=1;const c=Ze();return A0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(U){if(a.destructuredArrayIgnorePattern&&U.name.parent.type==="ArrayPattern")return"array-destructure";switch(U.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(U){let Q,$;switch(U){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${U}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"defined",additional:$}}function y(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"assigned a value",additional:$}}function O(U,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:U.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(U){const Q=U.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(U){return U.type==="Property"&&U.parent.type==="ObjectPattern"&&p.test(U.parent.properties.at(-1).type)}function b(U){if(a.ignoreRestSiblings){const Q=U.defs.some(W=>f(W.name.parent)),$=U.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(U){return U.isRead()}function E(U,Q){let $=U.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(U){const Q=[];return U.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(U,Q){return U.range[0]>=Q.range[0]&&U.range[1]<=Q.range[1]}function T(U){const Q=U.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===U?T(Q):!0:!1}function R(U,Q){const $=U.identifier,W=$.parent,K=U.from.variableScope,te=U.resolved.scope.variableScope,V=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!V?W.right:null}function F(U,Q){let $=U,W=U.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(U,Q){const $=c.getUpperFunction(U);return $&&D($,Q)&&F($,Q)}function N(U,Q){const $=U.identifier,W=$.parent;return U.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(U){let Q=U.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(U){if(U.eslintUsed)return!0;const Q=k(U),$=Q.length>0;let W=null;return U.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(U){const Q=U.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(U)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(U,Q){const $=U.variables,W=U.childScopes;let K,te;if(U.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(V))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"variable")});continue}}!L(V)&&!g(V)&&!b(V)&&Q.push(V)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let V;te.length>0&&(V=te.at(-1)),s.report({node:V?V.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:U,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},A0}var P0,xP;function l6(){if(xP)return P0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return P0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},T0}var D0,SP;function c6(){if(SP)return D0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return D0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const U=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=U.length-1;do Q--,$--;while(T[Q]===U[$]);const W=$+1,K=U.slice(0,W),te=U.slice(W),V=te.find(o),ae=V&&V.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},D0}var I0,EP;function f6(){if(EP)return I0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},I0}var R0,CP;function p6(){return CP||(CP=1,R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),R0}var F0,wP;function h6(){if(wP)return F0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},F0}var _0,kP;function d6(){if(kP)return _0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},_0}var B0,AP;function m6(){if(AP)return B0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return L0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const U=P[0];if(I==="^"&&U.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!U.negate||U.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},N0}var M0,DP;function b6(){if(DP)return M0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return M0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},M0}var $0,IP;function v6(){if(IP)return $0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return $0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},$0}var j0,RP;function x6(){return RP||(RP=1,j0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),j0}var q0,FP;function O6(){if(FP)return q0;FP=1;const c=Zl(),s=Ze(),u=40;return q0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},q0}var Q0,_P;function S6(){if(_P)return Q0;_P=1;const c=Ze();return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},Q0}var U0,BP;function E6(){return BP||(BP=1,U0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),U0}var V0,LP;function C6(){if(LP)return V0;LP=1;const c={enum:["beside","below","any"]};return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},V0}var W0,NP;function w6(){if(NP)return W0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},W0}var G0,MP;function k6(){if(MP)return G0;MP=1;const c=Ze();return G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},G0}var z0,$P;function A6(){return $P||($P=1,z0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+V;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${V}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function U(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":U,"FunctionDeclaration:exit":U,"FunctionExpression:exit":U,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},Z0}var X0,qP;function T6(){if(qP)return X0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return X0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!U||G.required&&U?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(U=>U.range[0]===I.parent.range[0]),G=L[j-1];return U=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(U.replaceText($,",")):W.push(U.insertTextAfter($,",")),W.push(U.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const U=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(U.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(U.loc.start.line>G.loc.end.line||U.type==="Line"||U.type==="Block"){let $=U;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),U=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&U&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},X0}var Y0,QP;function D6(){return QP||(QP=1,Y0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Y0}var H0,UP;function I6(){if(UP)return H0;UP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return H0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},H0}var K0,VP;function R6(){if(VP)return K0;VP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},K0}var J0,WP;function F6(){if(WP)return J0;WP=1;const c=Ze();return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},J0}var ey,GP;function _6(){if(GP)return ey;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),V=j(K,Q);te.verify(D,K,Q,V)}F.prevNode=Q}function U(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:U,"SwitchCase:exit":N}}},ey}var ty,zP;function B6(){if(zP)return ty;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ty={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ty}var ry,ZP;function L6(){if(ZP)return ry;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EU.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const U=L.declarations[0];if(U.init){const Q=U.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(U=>U.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let U=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?U+=Q.id.properties.length:Q.id.type==="ArrayPattern"?U+=Q.id.elements.length:U+=1}),G=G&&T===U}I.forEach(U=>{f.report({node:U,messageId:"useConst",data:U,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ry}var ny,XP;function N6(){if(XP)return ny;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ny={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ny}var sy,YP;function M6(){if(YP)return sy;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return sy={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},sy}var iy,HP;function $6(){if(HP)return iy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return iy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},iy}var ay,KP;function j6(){if(KP)return ay;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return ay={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},ay}var oy,JP;function q6(){if(JP)return oy;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return oy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},oy}var ly,eT;function Q6(){if(eT)return ly;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const U=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),U[1]),L.range[1]];yield T.removeRange(U),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ly={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ly}var uy,tT;function U6(){if(tT)return uy;tT=1;const c=Ze();return uy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},uy}var cy,rT;function V6(){return rT||(rT=1,cy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),cy}var fy,nT;function W6(){if(nT)return fy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ig();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return fy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function U($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:V}of K.iterateGlobalReferences(te))if(b&&F(V)){const ae=V.arguments[0];if(V.arguments.length===2){const z=[],ue=D(V.arguments[1])||"";U(V,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&U(V,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:V,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(V,Q(V,`/${Be}/${pe}`))}}))})}else{const z=[];U(V,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:V,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(V,Q(V,ue))}}))})}}else if(R(V)){let ae=D(V.arguments[0]),z=!1,ue;if(V.arguments[1]&&(ue=D(V.arguments[1])),U(V,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},dy}var my,oT;function X6(){if(oT)return my;oT=1;const c=Pl(),s=Ze(),u=Wh();return my={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},my}var gy,lT;function Y6(){if(lT)return gy;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},gy}var yy,uT;function H6(){if(uT)return yy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return yy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},yy}var by,cT;function K6(){if(cT)return by;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return by={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},by}var vy,fT;function J6(){if(fT)return vy;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return vy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},vy}var xy,pT;function e8(){if(pT)return xy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ig();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return xy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},xy}var Oy,hT;function t8(){return hT||(hT=1,Oy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),Oy}var Sy,dT;function r8(){return dT||(dT=1,Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Sy}var Ey,mT;function n8(){if(mT)return Ey;mT=1;const c=Oo(),s=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,U,Q;L?(G="extraSemi",Q=j.loc,U=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},U=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:U})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),U=j||G;L&&U?g(I,!0):!L&&!U&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Ey}var Cy,gT;function s8(){if(gT)return Cy;gT=1;const c=Ze();return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Cy}var wy,yT;function i8(){if(yT)return wy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},wy}var ky,bT;function a8(){return bT||(bT=1,ky={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),ky}var Ay={exports:{}},vT;function o8(){if(vT)return Ay.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ty}var Dy,ST;function c8(){if(ST)return Dy;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Dy}var Iy,ET;function f8(){if(ET)return Iy;ET=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Iy}var Ry,CT;function p8(){if(CT)return Ry;CT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Ry}var Fy,wT;function h8(){if(wT)return Fy;wT=1;const{isEqToken:c}=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Fy}var _y,kT;function d8(){if(kT)return _y;kT=1;const c=Ze();return _y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},_y}var By,AT;function m8(){if(AT)return By;AT=1;const c=Zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return By={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},By}var Ly,PT;function g8(){if(PT)return Ly;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},Ly}var Ny,TT;function y8(){if(TT)return Ny;TT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ny}var My,DT;function b8(){if(DT)return My;DT=1;const c=Ze();return My={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},My}var $y,IT;function v8(){if(IT)return $y;IT=1;const c=Ze();return $y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},$y}var jy,RT;function x8(){return RT||(RT=1,jy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),jy}var qy,FT;function O8(){return FT||(FT=1,qy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),qy}var Qy,_T;function S8(){if(_T)return Qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return Qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},Qy}var Uy,BT;function E8(){if(BT)return Uy;BT=1;const c=Ze();return Uy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Uy}var Vy,LT;function C8(){return LT||(LT=1,Vy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Gy}var zy,$T;function A8(){return $T||($T=1,zy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),zy}var Zy,jT;function P8(){if(jT)return Zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,U=>U.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Zy}var Xy,qT;function QT(){if(qT)return Xy;qT=1;const{LazyLoadingRuleMap:c}=J$();return Xy=new c(Object.entries({"accessor-pairs":()=>r3(),"array-bracket-newline":()=>n3(),"array-bracket-spacing":()=>s3(),"array-callback-return":()=>i3(),"array-element-newline":()=>a3(),"arrow-body-style":()=>o3(),"arrow-parens":()=>l3(),"arrow-spacing":()=>u3(),"block-scoped-var":()=>c3(),"block-spacing":()=>f3(),"brace-style":()=>p3(),"callback-return":()=>h3(),camelcase:()=>d3(),"capitalized-comments":()=>m3(),"class-methods-use-this":()=>g3(),"comma-dangle":()=>y3(),"comma-spacing":()=>b3(),"comma-style":()=>v3(),complexity:()=>x3(),"computed-property-spacing":()=>O3(),"consistent-return":()=>S3(),"consistent-this":()=>E3(),"constructor-super":()=>C3(),curly:()=>w3(),"default-case":()=>k3(),"default-case-last":()=>A3(),"default-param-last":()=>P3(),"dot-location":()=>T3(),"dot-notation":()=>D3(),"eol-last":()=>I3(),eqeqeq:()=>R3(),"for-direction":()=>F3(),"func-call-spacing":()=>_3(),"func-name-matching":()=>B3(),"func-names":()=>L3(),"func-style":()=>N3(),"function-call-argument-newline":()=>M3(),"function-paren-newline":()=>$3(),"generator-star-spacing":()=>j3(),"getter-return":()=>q3(),"global-require":()=>Q3(),"grouped-accessor-pairs":()=>U3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>W3(),"id-blacklist":()=>G3(),"id-denylist":()=>z3(),"id-length":()=>Z3(),"id-match":()=>X3(),"implicit-arrow-linebreak":()=>Y3(),indent:()=>H3(),"indent-legacy":()=>K3(),"init-declarations":()=>J3(),"jsx-quotes":()=>e5(),"key-spacing":()=>t5(),"keyword-spacing":()=>r5(),"line-comment-position":()=>n5(),"linebreak-style":()=>s5(),"lines-around-comment":()=>i5(),"lines-around-directive":()=>a5(),"lines-between-class-members":()=>o5(),"logical-assignment-operators":()=>l5(),"max-classes-per-file":()=>u5(),"max-depth":()=>c5(),"max-len":()=>f5(),"max-lines":()=>p5(),"max-lines-per-function":()=>h5(),"max-nested-callbacks":()=>d5(),"max-params":()=>m5(),"max-statements":()=>g5(),"max-statements-per-line":()=>y5(),"multiline-comment-style":()=>b5(),"multiline-ternary":()=>v5(),"new-cap":()=>x5(),"new-parens":()=>O5(),"newline-after-var":()=>S5(),"newline-before-return":()=>E5(),"newline-per-chained-call":()=>C5(),"no-alert":()=>w5(),"no-array-constructor":()=>k5(),"no-async-promise-executor":()=>A5(),"no-await-in-loop":()=>P5(),"no-bitwise":()=>T5(),"no-buffer-constructor":()=>D5(),"no-caller":()=>I5(),"no-case-declarations":()=>R5(),"no-catch-shadow":()=>F5(),"no-class-assign":()=>_5(),"no-compare-neg-zero":()=>B5(),"no-cond-assign":()=>L5(),"no-confusing-arrow":()=>N5(),"no-console":()=>M5(),"no-const-assign":()=>$5(),"no-constant-binary-expression":()=>j5(),"no-constant-condition":()=>q5(),"no-constructor-return":()=>Q5(),"no-continue":()=>U5(),"no-control-regex":()=>V5(),"no-debugger":()=>W5(),"no-delete-var":()=>G5(),"no-div-regex":()=>z5(),"no-dupe-args":()=>Z5(),"no-dupe-class-members":()=>X5(),"no-dupe-else-if":()=>Y5(),"no-dupe-keys":()=>H5(),"no-duplicate-case":()=>K5(),"no-duplicate-imports":()=>J5(),"no-else-return":()=>ej(),"no-empty":()=>tj(),"no-empty-character-class":()=>rj(),"no-empty-function":()=>nj(),"no-empty-pattern":()=>sj(),"no-empty-static-block":()=>ij(),"no-eq-null":()=>aj(),"no-eval":()=>oj(),"no-ex-assign":()=>lj(),"no-extend-native":()=>uj(),"no-extra-bind":()=>cj(),"no-extra-boolean-cast":()=>fj(),"no-extra-label":()=>pj(),"no-extra-parens":()=>hj(),"no-extra-semi":()=>dj(),"no-fallthrough":()=>mj(),"no-floating-decimal":()=>gj(),"no-func-assign":()=>yj(),"no-global-assign":()=>bj(),"no-implicit-coercion":()=>vj(),"no-implicit-globals":()=>xj(),"no-implied-eval":()=>Oj(),"no-import-assign":()=>Sj(),"no-inline-comments":()=>Ej(),"no-inner-declarations":()=>Cj(),"no-invalid-regexp":()=>wj(),"no-invalid-this":()=>kj(),"no-irregular-whitespace":()=>Aj(),"no-iterator":()=>Pj(),"no-label-var":()=>Tj(),"no-labels":()=>Dj(),"no-lone-blocks":()=>Ij(),"no-lonely-if":()=>Rj(),"no-loop-func":()=>Fj(),"no-loss-of-precision":()=>_j(),"no-magic-numbers":()=>Bj(),"no-misleading-character-class":()=>Qj(),"no-mixed-operators":()=>Uj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Wj(),"no-multi-assign":()=>Gj(),"no-multi-spaces":()=>zj(),"no-multi-str":()=>Zj(),"no-multiple-empty-lines":()=>Xj(),"no-native-reassign":()=>Yj(),"no-negated-condition":()=>Hj(),"no-negated-in-lhs":()=>Kj(),"no-nested-ternary":()=>Jj(),"no-new":()=>eq(),"no-new-func":()=>tq(),"no-new-native-nonconstructor":()=>rq(),"no-new-object":()=>nq(),"no-new-require":()=>sq(),"no-new-symbol":()=>iq(),"no-new-wrappers":()=>aq(),"no-nonoctal-decimal-escape":()=>oq(),"no-obj-calls":()=>lq(),"no-object-constructor":()=>uq(),"no-octal":()=>cq(),"no-octal-escape":()=>fq(),"no-param-reassign":()=>pq(),"no-path-concat":()=>hq(),"no-plusplus":()=>dq(),"no-process-env":()=>mq(),"no-process-exit":()=>gq(),"no-promise-executor-return":()=>yq(),"no-proto":()=>bq(),"no-prototype-builtins":()=>vq(),"no-redeclare":()=>xq(),"no-regex-spaces":()=>Oq(),"no-restricted-exports":()=>Sq(),"no-restricted-globals":()=>Eq(),"no-restricted-imports":()=>Cq(),"no-restricted-modules":()=>wq(),"no-restricted-properties":()=>kq(),"no-restricted-syntax":()=>Aq(),"no-return-assign":()=>Pq(),"no-return-await":()=>Tq(),"no-script-url":()=>Dq(),"no-self-assign":()=>Iq(),"no-self-compare":()=>Rq(),"no-sequences":()=>Fq(),"no-setter-return":()=>_q(),"no-shadow":()=>Bq(),"no-shadow-restricted-names":()=>Lq(),"no-spaced-func":()=>Nq(),"no-sparse-arrays":()=>Mq(),"no-sync":()=>$q(),"no-tabs":()=>jq(),"no-template-curly-in-string":()=>qq(),"no-ternary":()=>Qq(),"no-this-before-super":()=>Uq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Wq(),"no-undef":()=>Gq(),"no-undef-init":()=>zq(),"no-undefined":()=>Zq(),"no-underscore-dangle":()=>Xq(),"no-unexpected-multiline":()=>Yq(),"no-unmodified-loop-condition":()=>Hq(),"no-unneeded-ternary":()=>Kq(),"no-unreachable":()=>Jq(),"no-unreachable-loop":()=>e6(),"no-unsafe-finally":()=>t6(),"no-unsafe-negation":()=>r6(),"no-unsafe-optional-chaining":()=>n6(),"no-unused-expressions":()=>s6(),"no-unused-labels":()=>i6(),"no-unused-private-class-members":()=>a6(),"no-unused-vars":()=>o6(),"no-use-before-define":()=>l6(),"no-useless-assignment":()=>u6(),"no-useless-backreference":()=>c6(),"no-useless-call":()=>f6(),"no-useless-catch":()=>p6(),"no-useless-computed-key":()=>h6(),"no-useless-concat":()=>d6(),"no-useless-constructor":()=>m6(),"no-useless-escape":()=>g6(),"no-useless-rename":()=>y6(),"no-useless-return":()=>b6(),"no-var":()=>v6(),"no-void":()=>x6(),"no-warning-comments":()=>O6(),"no-whitespace-before-property":()=>S6(),"no-with":()=>E6(),"nonblock-statement-body-position":()=>C6(),"object-curly-newline":()=>w6(),"object-curly-spacing":()=>k6(),"object-property-newline":()=>A6(),"object-shorthand":()=>P6(),"one-var":()=>T6(),"one-var-declaration-per-line":()=>D6(),"operator-assignment":()=>I6(),"operator-linebreak":()=>R6(),"padded-blocks":()=>F6(),"padding-line-between-statements":()=>_6(),"prefer-arrow-callback":()=>B6(),"prefer-const":()=>L6(),"prefer-destructuring":()=>N6(),"prefer-exponentiation-operator":()=>M6(),"prefer-named-capture-group":()=>$6(),"prefer-numeric-literals":()=>j6(),"prefer-object-has-own":()=>q6(),"prefer-object-spread":()=>Q6(),"prefer-promise-reject-errors":()=>U6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>W6(),"prefer-rest-params":()=>G6(),"prefer-spread":()=>z6(),"prefer-template":()=>Z6(),"quote-props":()=>X6(),quotes:()=>Y6(),radix:()=>H6(),"require-atomic-updates":()=>K6(),"require-await":()=>J6(),"require-unicode-regexp":()=>e8(),"require-yield":()=>t8(),"rest-spread-spacing":()=>r8(),semi:()=>n8(),"semi-spacing":()=>s8(),"semi-style":()=>i8(),"sort-imports":()=>a8(),"sort-keys":()=>l8(),"sort-vars":()=>u8(),"space-before-blocks":()=>c8(),"space-before-function-paren":()=>f8(),"space-in-parens":()=>p8(),"space-infix-ops":()=>h8(),"space-unary-ops":()=>d8(),"spaced-comment":()=>m8(),strict:()=>g8(),"switch-colon-spacing":()=>y8(),"symbol-description":()=>b8(),"template-curly-spacing":()=>v8(),"template-tag-spacing":()=>x8(),"unicode-bom":()=>O8(),"use-isnan":()=>S8(),"valid-typeof":()=>E8(),"vars-on-top":()=>C8(),"wrap-iife":()=>w8(),"wrap-regex":()=>k8(),"yield-star-spacing":()=>A8(),yoda:()=>P8()})),Xy}var Yy,UT;function T8(){if(UT)return Yy;UT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,K$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Yy=s,Yy}var Hy,VT;function D8(){if(VT)return Hy;VT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Hy=a,Hy}var Ky,WT;function GT(){if(WT)return Ky;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Ky={startTime:c,endTime:s},Ky}var Jy,zT;function I8(){if(zT)return Jy;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Jy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Jy}var R8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:R8},eb,XT;function YT(){if(XT)return eb;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return eb={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},eb}var tb={},rb={},nb,HT;function F8(){if(HT)return nb;HT=1,nb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return sb}var ib,JT;function B8(){if(JT)return ib;JT=1;var c=F8(),s=_8();ib=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],U;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,V=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}U.push(ue)}}else U=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var U="",Q=!!G.nocase,$=!1,W=[],K=[],te,V=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":U+=d,Q=!0;break;case"?":U+=a,Q=!0;break;default:U+="\\"+te;break}ne.debug("clearStateChar %j %j",te,U),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=U.slice(0,pt.reStart),qt=U.slice(pt.reStart,pt.reEnd-8),Ut=U.slice(pt.reEnd-8,pt.reEnd),tr=U.slice(pt.reEnd);Ut+=tr;var fe=kt.split("(").length-1,Ve=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var U=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=V===te,this.debug("string match",te,V,ne)):(ne=V.match(te),this.debug("pattern match",te,V,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ab}var So={},tD;function N8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=L8(),p=$i(),a=N8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function U(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function V(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,V(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await U(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(rb)),rb}var ob,sD;function iD(){if(sD)return ob;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ob={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ob}var lb,aD;function ub(){if(aD)return lb;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(U){return typeof U=="object"&&U!==null}function p(U){return u(U)&&!Array.isArray(U)}function a(U){return typeof U>"u"}function d(U,Q,$=new Map){let W=$.get(U);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(U,W);const K={...U,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(U,te))continue;const V=U[te],ae=Q[te];p(V)&&p(ae)?K[te]=d(V,ae,$):a(ae)&&(K[te]=V)}return K}function v(U){const Q=Array.isArray(U)?U.slice(0):[U];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(U){for(const Q of Object.keys(U))if(typeof U[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(U,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(U,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(U,Q){if(typeof s.get(Q)>"u")throw new O(U,Q)}function g(U){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(U))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${U}".`)}function f(U){if(!u(U))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(U,Q){const $=Q===void 0?U:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(U){if(!(k.has(U)||typeof U=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(U={},Q={}){return d(U,Q)},validate:"object"},R={merge(U={},Q={}){const $=d(U,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??U[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(U={},Q={}){const $=new Set([...Object.keys(U),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in U&&K in Q&&U[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||U[K]}return W},validate(U){if(U===null||typeof U!="object")throw new TypeError("Expected an object.");if(Array.isArray(U))throw new S(U);for(const Q of Object.keys(U))if(Q!=="__proto__"&&(U[Q]===null||typeof U[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(U){if(typeof U=="string")g(U);else if(U&&typeof U=="object"){if(typeof U.preprocess!="function"||typeof U.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(U={},Q={}){const $={...U,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in U)||!(W in Q))continue;const K=v(U[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(U){f(U);for(const Q of Object.keys(U)){if(Q==="__proto__")continue;const $=U[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(U){return{merge:"replace",validate(){throw new b(U)}}}return lb={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(U=>[U,L(U)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},lb}var cb={},fb,oD;function M8(){if(oD)return fb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return fb={validateLanguageOptions:o},fb}var pb,lD;function uD(){if(lD)return pb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=zl(),p=jc(),a=kl(),{validateLanguageOptions:d}=M8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return pb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},pb}var cD;function $8(){if(cD)return cb;cD=1;const c=QT();return cb.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Pl(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],cb}var hb={},j8="http://json-schema.org/draft-04/schema#",q8="http://json-schema.org/draft-04/schema#",Q8="Core schema meta-schema",U8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",W8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},G8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},z8={id:j8,$schema:q8,description:Q8,definitions:U8,type:V8,properties:W8,dependencies:G8,default:{}},db,fD;function Z8(){if(fD)return db;fD=1;const c=f1(),s=z8;return db=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},db}var pD;function hD(){if(pD)return hb;pD=1;const s=Z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return hb.RuleValidator=o,hb}var mb,dD;function X8(){var x,g;if(dD)return mb;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=ub(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,mb={Config:O},mb}var mD;function Y8(){if(mD)return tb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=ub(),{defaultConfig:p}=$8(),{Config:a}=X8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return tb.FlatConfigArray=O,tb}var gb,gD;function H8(){return gD||(gD=1,gb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),gb}var yb,yD;function bD(){if(yD)return yb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return yb={VFile:u},yb}var bb,vD;function K8(){if(vD)return bb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return bb={ParserService:c},bb}var vb={},xD;function J8(){if(xD)return vb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return vb.FileContext=c,vb}var xb,OD;function e9(){if(OD)return xb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return xb={ProcessorService:u},xb}var Ob,SD;function t9(){var Ue,Sx,Oe,Ex;if(SD)return Ob;SD=1;const c=ao,s=jc(),u=kl(),p=Pl(),a=xL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=tp(),{SourceCode:O}=BE(),x=W$(),{ConfigCommentParser:g}=RE(),f=Z$(),b=H$(),S=T8(),E=gE(),k=D8(),D=I8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=Y8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=ub(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:U,inactiveFlags:Q}=H8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,V=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=K8(),{FileContext:pe}=J8(),{ProcessorService:Be}=e9(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(V.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=V.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,V.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(V.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=V.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Ut(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},V.parseListConfig(V.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ve(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ve(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Ut(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Vt(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Vt(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function hr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ue);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!U.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ue,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ue,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Ut(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},Ob={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},Ob}function r9(){return t9().Linter}var n9=l.Linter=r9();t.Linter=n9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(mH,dc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=vl.define(t);return[r,C_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const yH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class VI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",...Array.isArray(e.class)?e.class:[e.class]]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[OX,gl.of([Fz]),gY(),xX(),pX(xY(new dc.Linter,{languageOptions:{globals:{...dH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"warn","no-unused-private-class-members":"warn","no-unused-vars":"warn","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),yH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class bH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class vH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(bH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Eu="workshop-data-light@0.5.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Eu+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Eu+e,t(l.current)),l.persist=h=>localStorage.setItem(Eu+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Eu+e),l}class xH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Lo,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??H9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??t4,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const OH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(xH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var pl,na,Ma;class SH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new yU);or(this,"__module",Ds);An(this,pl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=w9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:i4}),zt("span",null,document.title)),zt("a",{innerHTML:r4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(VI,{class:["editor-code",{"is-active":B9(this.state.dataMode)}],ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(VI,{class:["editor-data",{"is-active":this.state.dataMode}],ref:this.ref("data"),content:this.store.data}),zt(vH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Lo,null,zt(Hs,{class:"data-code-toggler",icon:Cu(this.state.dataMode,t=>t?s4:n4),label:Cu(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Lo,null,zt(Lo,{compact:!0},zt(Hs,{icon:Cu(this.state.running,t=>t?e4:J9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames,active:this.state.running})),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30}))),zt(Lo,null,zt(Hs,{icon:K9,title:"Commencer un nouveau programme","event-click":t=>OH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})}),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,pl)),Cr(this,pl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await SU({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}pl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(SH,null)); diff --git a/assets/index-48994bca.js b/assets/index-48994bca.js new file mode 100644 index 0000000..dc7df16 --- /dev/null +++ b/assets/index-48994bca.js @@ -0,0 +1,230 @@ +var s9=Object.defineProperty;var i9=(n,e,t)=>e in n?s9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(i9(n,typeof e!="symbol"?e+"":e,t),t),Cb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Cb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Cb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Cb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function a9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let kb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),Ab=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}kb=t??"",e||(r[n]=kb),(e||o9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,kb)}};function l9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};wb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{Ab(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Ab(e,i)(t,n)}}function u9(n){return Array.isArray(n)?n:[n]}function hl(n,e){if(Array.isArray(n))return c9(n,e);if(n instanceof window.Element)return h9(n);if(n===null||typeof n!="object"||!n.vnode)return f9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return p9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return d9(n,t,e);if(n.isComponent)return AD(n,t,e)}function c9(n,e){n=u9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=S9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":O9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function E9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},C9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(C9);function w9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var mc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Uo=!1,wx=!1,kx,fi;function Lu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Uo?null:mc.requestAnimationFrame(Lu),Uo&&(Uo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function k9(n,e){Ax(qa,n,e)&&gc()}function A9(n,e){Ax(ja,n,e)&&gc()}function P9(n,e){Ax(Ki,n,e)&&WI()}function T9(n){Px(qa,n)&&gc()}function D9(n,e){Px(ja,n)&&gc()}function I9(n){Px(Ki,n)&&Tx()}function WI(n){Uo=!1,!xi&&(n=!!n,Ji=null,n?Lu():xi=mc.requestAnimationFrame(Lu))}function R9(){xi||(Uo=!0,Ji=null,xi=mc.requestAnimationFrame(Lu))}function Tx(){xi&&(mc.cancelAnimationFrame(xi),xi=null)}function F9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:P9,addAfter:A9,addBefore:k9,remove:I9,removeAfter:D9,removeBefore:T9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:R9,dispose:F9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Pb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Pb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Pb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Pb(this,e),e=e.next}},_9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends _9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Cu(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},B9=n=>Cu(n,e=>!e),L9="ui-backdrop-1l3kn107",N9={backdrop:L9,"loader-spin":"ui-loader-spin-1l3kn1"};class M9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[N9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const $9="ui-button-1urez107",j9="ui-button__label-1urez161",q9="ui-button__icon-1urez171",Tb={button:$9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:j9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const Q9="ui-input-ada4i107",U9="ui-input__icon-ada4i150",ko={input:Q9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:U9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const V9="ui-modal-1ng3s107",W9="ui-modal__header-1ng3s119",G9="ui-modal__title-1ng3s125",z9="ui-modal__content-1ng3s129",Po={modal:V9,modal__header:W9,modal__title:G9,modal__content:z9,"loader-spin":"ui-loader-spin-1ng3s1"},Z9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(M9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:Z9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const X9="ui-toolbar-1r0eh107",Y9={toolbar:X9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Lo extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[Y9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const H9=` + + +`,K9=` + + + +`,J9=` + + + +`,e4=` + + + +`,t4=` + + +`,r4=` + + + + + + +`,FD=` + + + + +`,n4=` + + + + +`,s4=` + + + + +`,_D=`export function setup () { + log('setup') +} + +export function draw () { + log(frameCount) +} +`,i4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nd4(m4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},eR={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])eR[`[object ${n}]`]=n.toLowerCase();function dr(n){return eR[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:yc,min:tR,max:rR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=yc*2,Db=yc/3,g4=yc/180,y4=180/yc;function nR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const b4="3.1.2",pr=(...n)=>new Ct(...n);pr.version=b4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,x4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,sR=n=>{if(n.match(v4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(x4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Hl}=Math,iR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Hl(e),t=Hl(t),r=Hl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Hl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=iR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return sR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},O4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=O4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Xo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=S4(e,t,r),[C,A,_]=aR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},S4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},aR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=oR(e,t,r),[A,_,B]=E4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function E4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const oR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const C4=(...n)=>new Ct(...n,"lab");Object.assign(pr,{lab:C4,getLabWhitePoint:Xo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:w4}=Math,k4=1e-7,A4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=A4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return P4(...this._rgb.slice(0,3))};const P4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:w4((n+.055)/1.055,2.4)),bn={},Ua=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Ua(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:T4,cos:D4}=Math,lR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*g4,[e,D4(r)*t,T4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=lR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},I4=(...n)=>{const e=nR(ur(n,"hcl"));return Fx(...e)},{sqrt:R4,atan2:F4,round:_4}=Math,uR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=R4(t*t+r*r);let l=(F4(r,t)*y4+360)%360;return _4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return nR(_x(this._rgb))};const B4=(...n)=>new Ct(...n,"lch"),L4=(...n)=>new Ct(...n,"hcl");Object.assign(pr,{lch:B4,hcl:L4});lr.format.lch=Fx;lr.format.hcl=I4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Ua(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Ua(this,"black",n,...e)};const N4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=N4;const{sqrt:_b,pow:Oa}=Math,M4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=M4;const $4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=$4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},cR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=cR;bn.hcl=cR;const j4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},q4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return q4(this._rgb)};const Q4=(...n)=>new Ct(...n,"num");Object.assign(pr,{num:Q4});lr.format.num=j4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const U4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=U4;const{floor:V4}=Math,W4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=V4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},G4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=tR(e,t,r),l=rR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return G4(this._rgb)};const z4=(...n)=>new Ct(...n,"hcg");pr.hcg=z4;lr.format.hcg=W4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const Z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=Z4;const{cos:Sa}=Math,X4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Y4,sqrt:H4,acos:K4}=Math,J4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Y4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=H4((e-t)*(e-t)+(e-r)*(t-r)),i=K4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return J4(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsi");pr.hsi=eQ;lr.format.hsi=X4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const tQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=tQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},fR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=tR(e,t,r),l=rR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return fR(this._rgb)};const rQ=(...n)=>new Ct(...n,"hsl");pr.hsl=rQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const nQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=nQ;const{floor:sQ}=Math,iQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=sQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:aQ,max:oQ}=Math,lQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=aQ(e,t,r),l=oQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return lQ(this._rgb)};const uQ=(...n)=>new Ct(...n,"hsv");pr.hsv=uQ;lr.format.hsv=iQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const cQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=cQ;function Nu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=fQ([e,t,r]),[A,_,B]=aR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Nu(t,n);return Nu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=oR(e,t,r);return[...pQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function pQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Nu(e,n);return Nu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const hQ=(...n)=>new Ct(...n,"oklab");Object.assign(pr,{oklab:hQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const dQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=dQ;const mQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=mQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:gQ}=Math,yQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return bQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},bQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:vQ}=Math;function Mu(n){let e="rgb",t=pr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&pr.brewer&&pr.brewer[Ye.toLowerCase()]&&(Ye=pr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=vQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=pr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=pr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=pr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Vr=20;for(;Math.abs(er)>.01&&Vr-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=xQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return pr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=pr(Ye),ot):t},ot}function xQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const OQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=OQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},EQ=n=>{const e=SQ(n);return e.scale=()=>Mu(e),e},{round:pR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(pR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:pR(e):e)};const CQ=(...n)=>new Ct(...n,"rgb");Object.assign(pr,{rgb:CQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=pr(t).rgb(),i=pr(e).rgb();return pr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},wQ=n=>n,kQ=(n,e)=>n*e/255,AQ=(n,e)=>n>e?e:n,PQ=(n,e)=>n>e?n:e,TQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),DQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),IQ=(n,e)=>255*(1-(1-e/255)/(n/255)),RQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(wQ));ms.multiply=Di(Ii(kQ));ms.screen=Di(Ii(TQ));ms.overlay=Di(Ii(DQ));ms.darken=Di(Ii(AQ));ms.lighten=Di(Ii(PQ));ms.dodge=Di(Ii(RQ));ms.burn=Di(Ii(IQ));const{pow:FQ,sin:_Q,cos:BQ}=Math;function LQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=FQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=BQ(_),me=_Q(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return pr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>pr.scale(C),C.hue(t),C}const NQ="0123456789abcdef",{floor:MQ,random:$Q}=Math,jQ=()=>{let n="#";for(let e=0;e<6;e++)n+=NQ.charAt(MQ($Q()*16));return new Ct(n,"hex")},{log:ND,pow:qQ,floor:QQ,abs:UQ}=Math;function hR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>dR(t,r,i),t}function dR(n,e="equal",t=7){dr(n)=="array"&&(n=hR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const VQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,WQ=5e-4,GQ=.1,$D=1.14,Kl=.022,jD=1.414,zQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Ua(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Kl?t:t+Math.pow(Kl-t,jD),l=r>=Kl?r:r+Math.pow(Kl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:ZQ,max:XQ,atan2:QD,abs:UD,cos:Jl,sin:VD,exp:YQ,PI:WD}=Math;function HQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=UD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Jl(h(Nt-30))+.24*Jl(h(2*Nt))+.32*Jl(h(3*Nt+6))-.2*Jl(h(4*Nt-63));let Yt=_t-It;Yt=UD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*VD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Vr=1+.045*ot,On=1+.015*ot*At,qr=30*YQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*VD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Vr),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Vr))*(Yt/(i*On)));return XQ(0,ZQ(100,hn))}function KQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const JQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},eU={cool(){return Mu([pr.hsl(180,1,.9),pr.hsl(250,.7,.4)])},hot(){return Mu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},mR=Object.keys(vv),GD=new Map(mR.map(n=>[n.toLowerCase(),n])),tU=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(mR)}}):vv,rU=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,nU=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return nU(this._rgb)};const sU=(...n)=>new Ct(...n,"cmyk");Object.assign(pr,{cmyk:sU});lr.format.cmyk=rU;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const iU=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},aU=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},oU=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},lU=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},gR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},uU=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,cU=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return iU(fR(e),t);if(t.substr(0,3)==="lab"){const r=Xo();Ks("d50");const i=aU(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Xo();Ks("d50");const i=oU(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?lU(Lx(e)):t.substr(0,5)==="oklch"?uU(gR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},yR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=lR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$u=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,bc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,bR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),vR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),xR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),OR=new RegExp("^hsla?\\("+rs+[bc,$u,$u].join(eo)+to+"\\)$"),SR=new RegExp("^hsl?\\("+rs+[bc,$u,$u].join(Nx)+rs+"\\)$"),ER=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,CR=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),wR=new RegExp("^lch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),kR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),AR=new RegExp("^oklch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),{round:PR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(PR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(bR))||(e=n.match(vR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(xR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(OR))||(e=n.match(SR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(ER)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=PR(r[i]);return r[3]=+e[4],r}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Xo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Xo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(AR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(yR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>bR.test(n)||OR.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||AR.test(n)||vR.test(n)||xR.test(n)||SR.test(n)||ER.test(n)||n==="transparent";Ct.prototype.css=function(n){return cU(this._rgb,n)};const fU=(...n)=>new Ct(...n,"css");pr.css=fU;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const pU=(...n)=>new Ct(...n,"gl");pr.gl=pU;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return iR(this._rgb,n)};const hU=(...n)=>new Ct(...n,"hex");pr.hex=hU;lr.format.hex=sR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:eu}=Math,TR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*eu(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*eu(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*eu(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*eu(r),i=255),[t,r,i,1]},{round:dU}=Math,mU=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=TR(C);A[2]/A[0]>=r/t?l=C:i=C}return dU(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return mU(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(pr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=TR;Ct.prototype.oklch=function(){return gR(this._rgb)};const gU=(...n)=>new Ct(...n,"oklch");Object.assign(pr,{oklch:gU});lr.format.oklch=yR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(pr,{analyze:hR,average:yQ,bezier:EQ,blend:ms,brewer:tU,Color:Ct,colors:Qa,contrast:VQ,contrastAPCA:zQ,cubehelix:LQ,deltaE:HQ,distance:KQ,input:lr,interpolate:Ua,limits:dR,mix:Ua,random:jQ,scale:Mu,scales:eU,valid:JQ});class yU{constructor(){or(this,"PROPERTIES",{...h4,...console,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:pr,rgb:(e=0,t=e,r=t=e)=>pr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>pr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{const i=[e,t].sort();for(let l=i[0];l{this.line(0,this.ledCount,e)},gradient:(e,t,r=this.rgb(),i=r,l="rgb")=>{if(!r||!r._rgb)throw new Error("Unexpected color value");if(!i||!i._rgb)throw new Error("Unexpected color value");const h=[e,t].sort();for(let C=h[0];C"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(vU);const xU=xv;var ea={},OU={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Va(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Va(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new DR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new IR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=CU(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new wU(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=wu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Va(this,e,t);let i=wu(this.text,wu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Va(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function CU(n){let e=-1;for(let t of n)e+=t.length+1;return e}function wu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class DR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class IR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=IR.prototype[Symbol.iterator]=function(){return this});class wU{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Va(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?RR:AU)(n,e,r)}function RR(n,e,t){if(e==n.length)return e;e&&FR(n.charCodeAt(e))&&_R(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function AU(n,e,t){for(;e>0;){let r=RR(n,e-2,t);if(r=56320&&n<57344}function _R(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!_R(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return FR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Yo(n),C=new Yo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Yo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function LR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new ku([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class ku{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=qu(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new NR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class NR{constructor(e,t){this.inner=e,this.prec=t}}class vc{of(e){return new wv(this,e)}reconfigure(e){return vc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class ju{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of TU(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>PU($e,me,ie))}}let q=_.map(Y=>Y(C));return new ju(e,h,q,C,A,l)}}function TU(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof NR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof ku)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Wo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function qu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const MR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),$R=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),jR=$t.define(),qR=$t.define(),QR=$t.define(),UR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new DU}}class DU{of(e){return new ri(this,e)}}class IU{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new IU(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&LR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function RU(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=WR(e,Ia(l),!1)}return n}function _U(n){let e=n.startState,t=e.facet(QR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const BU=[];function Ia(n){return n==null?BU:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const LU=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NU(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||LU.test(t)))return!0}return!1}function MU(n){return e=>{if(!/\S/.test(e))return Br.Space;if(NU(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=ju.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ju.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return LR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(UR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(MR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return MU(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=$R;Sr.readOnly=UR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=MR;Sr.changeFilter=jR;Sr.transactionFilter=qR;Sr.transactionExtender=QR;vc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class GR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new GR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new zR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ho.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ho.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?$U(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function $U(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new zR(h,t,r,l));return i.length==1?i[0]:new Ho(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ho.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){tu(this.active,e),tu(this.activeTo,e),tu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;ru(this.active,t,r),ru(this.activeTo,t,i),ru(this.activeRank,t,l),e&&ru(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&tu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new jU(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class jU{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qU=typeof navigator<"u"&&/Mac/.test(navigator.platform),QU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ko[un]=String.fromCharCode(un);for(var qb in ki)Ko.hasOwnProperty(qb)||(Ko[qb]=ki[qb]);function UU(n){var e=qU&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||QU&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ko:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Jo(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Au(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function el(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Go(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function xc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function VU(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ZR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function WU(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=VU(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=ZR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class zU{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function XR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!Qu(t))r=oa(t),t=t.parentNode;else return null}}function JR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Ux){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function tF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:Oc,ie_version:nF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:sF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YU=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>YU||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return HU(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(YR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return iF(this,e)}coordsAt(e,t){return oF(this,e,t)}}function HU(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?xc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Ux;function iF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?aF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function oF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function JU(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=lF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new ml(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class dl extends Ht{constructor(e){let{start:t,end:r}=lF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof dl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Uu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}dl.prototype.point=!1;class ml extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ml&&this.spec.class==e.spec.class&&Uu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ml.prototype.mapMode=cn.TrackBefore;ml.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&eV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function lF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function eV(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),rF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Uu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){aF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return iF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(YR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=el(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=oF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class zo{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nu(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(nu(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(nu(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(nu(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new zo(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function nu(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Vx=Rr.RTL;function uF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function fF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function aV(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Vv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Vv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function pF(n){return[new vi(0,n,0)]}let hF="";function lV(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),hF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),OF=$t.define({combine:n=>n.some(e=>e)}),SF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const su=sr.define({map:(n,e)=>n.map(e)}),EF=sr.define();function Tn(n,e,t){let r=n.facet(yF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let cV=0;const No=$t.define();class Ur{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Ur(cV++,e,r,i,C=>{let A=[No.of(C)];return h&&A.push(tl.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Ur.define(r=>new e(r),t)}}class Ub{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const CF=$t.define(),zx=$t.define(),tl=$t.define(),wF=$t.define(),Zx=$t.define(),kF=$t.define();function p2(n,e){let t=n.state.facet(kF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=uV(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const AF=$t.define();function PF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(AF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Mo=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Vu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Vu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!yV(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?pV(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=mV(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=zo.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=zo.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=zo.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);tF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(EF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&Au(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&fV(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Go(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Go(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&gV(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Jo(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=hV(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?KR:JR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Go(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Jo(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?el(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=el(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new eF(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(tl).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(wF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=PF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;WU(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function bV(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function xV(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vb(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=el(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Vb(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=vV(e,Qe),ct=xV(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Vb(B,Qe)?B=m2(B,Qe.bottom):q&&Vb(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function DF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&OV(Qe,Je,B)||Qt.chrome&&SV(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function OV(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function SV(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function EV(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=lV(i,l,h,C,t),B=hF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function CV(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function wV(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=DF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(AV(e,r.node,r.offset)?t:0))}}function AV(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class PV{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:IV(e),A=new kV(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=RV(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=TV(n,e,t));return n.state.facet(bF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function TV(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&TF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function DV(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function IV(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function RV(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class FV{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&XV(e.contentDOM.ownerDocument)}handleEvent(e){!qV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_V(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&FF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=RF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BV.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function _V(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const RF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BV="dthko",FF=[16,17,18,20,91,92,224,225],iu=6;function au(n){return Math.max(0,n)*.7+8}function LV(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class NV{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=GU(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&MV(e,t),this.dragging=jV(e,t)&&LF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LV(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=PF(this.view);e.clientX-A.left<=i+iu?t=-au(i-e.clientX):e.clientX+A.right>=h-iu&&(t=au(e.clientX-h)),e.clientY-A.top<=l+iu?r=-au(l-e.clientY):e.clientY+A.bottom>=C-iu&&(r=au(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MV(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function $V(n,e){let t=n.state.facet(mF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function jV(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Jo(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function qV(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),_F=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function QV(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),BF(n,t.value)},50)}function Sc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function BF(n,e){e=Sc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(gF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=WV(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new NV(n,e,t,r)),r&&n.observer.ignore(()=>{XR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return bV(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function UV(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:UV(n,t,e.clientX,e.clientY)}}const VV=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function LF(n){if(!VV)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function WV(n,e){let t=E2(n,e),r=LF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=GV(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function GV(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Sc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Sc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&$V(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=_F?null:e.clipboardData;return t?(BF(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(QV(n),!1)};function zV(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function ZV(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Sc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=ZV(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=_F?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(zV(n,t),!1)};const NF=ri.define();function MF(n,e){let t=[];for(let r of n.facet(vF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:NF.of(!0)}):null}function $F(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=MF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),$F(n)};ns.blur=n=>{n.observer.clearSelectionRange(),$F(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=RF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function XV(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class YV{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Tu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Vn extends jF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Vn||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Vn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Tu&&(A=-2);let Y=new Vn(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Tu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Tu)&&(za=!0),Wu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class KV extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Wu(this.left,e),this.right=Wu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const JV=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Vn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Vn(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=JV)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Vn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vn)return e;let t=new Vn(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vn)&&!this.isCovered?this.nodes.push(new Vn(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function n7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new YV(t),this.stateDeco=e.facet(tl).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new ou(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(jo(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(tl).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,e7(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(OF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=ZR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=HR(e.scrollDOM);let me=(this.printing?n7:r7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new HV(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new ou(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||jo(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||jo(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return jo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ou{constructor(e,t){this.from=e,this.to=t}}function i7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function uu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function a7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function jo(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>jo(i,e)):n._content)}const cu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),qF=wi.newName(),QF=wi.newName(),UF={"&light":"."+qF,"&dark":"."+QF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const o7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},UF),l7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class u7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zU,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new f7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!Au(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Go(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jo(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&c7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Au(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Au(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new PV(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=IF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Go(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function c7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class f7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:EF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Jo(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZU(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(su)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(No).map(i=>new Ub(i));for(let i of this.plugins)i.update(this);this.observer=new u7(this),this.inputState=new FV(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(NF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=MF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Vu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(su)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Gu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Mo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(cu)!=i.state.facet(cu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!IF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(No).map(r=>new Ub(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(No),r=e.state.facet(No);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Ub(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(HR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Vu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?QF:qF)+" "+this.state.facet(cu)}updateAttrs(){let e=N2(this,CF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Mo);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(o7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>CV(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return EV(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,wV(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),DF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return xc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(xF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p7)return pF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||fF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=oV(e.text,t,r);return this.bidiCache.push(new Gu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{XR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return su.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return su.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ur.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ur.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[cu.of(r),Mo.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(Mo.of(Kv("."+Hv,e,UF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=Mo;Mt.inputHandler=bF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=SF;Mt.focusChangeEffect=vF;Mt.perLineTextDirection=xF;Mt.exceptionSink=yF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=gF;Mt.dragMovesSelection=mF;Mt.clickAddsSelectionRange=dF;Mt.decorations=tl;Mt.outerDecorations=wF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=kF;Mt.scrollMargins=AF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=CF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const p7=4096,L2={};class Gu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const h7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function d7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function g7(n,e,t){return WF(VF(n.state),e,n,t)}let gi=null;const y7=4e3;function b7(n,e=h7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>d7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},y7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function WF(n,e,t,r){Jv=e;let i=UU(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",FF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+fu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+fu(me,e,!0)])||e.shiftKey&&(_e=Ko[e.keyCode])!=i&&_e!=me&&Y(ie[C+fu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+fu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class yl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=GF(e);return[new yl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return v7(e,t,r)}}function GF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function v7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=GF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Vr.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function x7(n,e){return n.constructor==e.constructor&&n.eq(e)}class O7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t!x7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=$t.define();function zF(n){return[Ur.define(e=>new O7(e,n)),Du.of(n)]}const ZF=!Qt.ios,rl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function S7(n={}){return[rl.of(n),E7,C7,w7,OF.of(!0)]}function XF(n){return n.startState.facet(rl)!=n.state.facet(rl)}const E7=zF({above:!0,markers(n){let{state:e}=n,t=e.facet(rl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||ZF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of yl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=XF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(rl).cursorBlinkRate+"ms"}const C7=zF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:yl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||XF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};ZF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const w7=Ri.highest(Mt.theme(ex)),YF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),qo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(YF)?r.value:t,n)}}),k7=Ur.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(qo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(qo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(qo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(qo)!=n&&this.view.dispatch({effects:YF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function A7(){return[qo,k7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function P7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class T7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of P7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",D7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),I7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function R7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Iu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:D7,addSpecialChars:null});return(e.replaceTabs=!R7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function F7(n={}){return[Iu.of(n),_7()]}let Q2=null;function _7(){return Q2||(Q2=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Iu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new T7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new M7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new N7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Iu);n.startState.facet(Iu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const B7="•";function L7(n){return n>=32?B7:n==10?"␤":String.fromCharCode(9216+n)}class N7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=L7(this.code),r=e.state.phrase("Control character")+" "+(I7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class M7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $7(){return q7}const j7=Ht.line({class:"cm-activeLine"}),q7=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(j7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function Q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function U7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function U2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?U7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function V7(n,e){let t=U2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=U2(n,i);if(!C)return r;let A=Q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function W7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?V7(t,r):null)}const G7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},z7={style:"cursor: crosshair"};function Z7(n={}){let[e,t]=G7[n.key||"Alt"],r=Ur.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?z7:null})]}const Io="-10000px";class HF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function X7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||X7}}}),V2=new WeakMap,Kx=Ur.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new HF(n,Ec,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=V2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||H7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Y7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),H7={x:0,y:0},Ec=$t.define({enables:[Kx,Y7]}),zu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Cc{static create(e){return new Cc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new HF(e,zu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K7=Ec.compute([zu],n=>{let e=n.facet(zu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Cc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class J7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Cc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!eW(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!tW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pu=4;function eW(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-pu&&e.clientX<=r+pu&&e.clientY>=i-pu&&e.clientY<=l+pu}function tW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function rW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(nW)&&(i=[]);return i},provide:i=>zu.from(i)});return{active:r,extension:[r,Ur.define(i=>new J7(i,n,r,t,e.hoverTime||300)),K7]}}function KF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const nW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function nl(n,e){let t=n.plugin(JF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const JF=Ur.fromClass(class{constructor(n){this.input=n.state.facet(sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new hu(n,!0,e.topContainer),this.bottom=new hu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new hu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new hu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(sl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class hu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const sl=$t.define({enables:JF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Ru=$t.define(),sW=$t.define(),iW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Zo=$t.define();function e_(n){return[t_(),Zo.of(Object.assign(Object.assign({},iW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function t_(n){let e=[aW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const aW=Ur.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Ru),this.view.viewport.from),r=[],i=this.gutters.map(l=>new oW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Zo),t=n.state.facet(Zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Ru),n.state.facet(Ru),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new r_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(sW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new r_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class r_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const fW=Zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(uW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function pW(n={}){return[Aa.of(n),t_(),fW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hW.range(i)))}return gr.of(e)});function mW(){return dW}const n_=1024;let gW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=gW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const yW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):yW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return OW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function il(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(s_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new bW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class bW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends i_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function a_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(il(C,e,t,!1))}}return i?a_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function OW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=n_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Vr=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Us=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Us>=0&&C.id==Us&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Us,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Us,_t+1);if(Us>=0&&si>0&&si-1&&si>0){let Cl=ie(Vr,$r);On=rO(Vr,hn,dn,0,hn.length,0,Yt-At,Cl,Cl)}else On=_e(Vr,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Vr=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Vr,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Fu(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Fu(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class SW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class EW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let CW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=CW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Xu(e);return r=>r.modified.indexOf(t)>-1?r:Xu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let wW=0;class Xu{constructor(e){this.name=e,this.instances=[],this.id=wW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&kW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=AW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Xu.get(C,A));return l}}function kW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function AW(n){let e=[[]];for(let t=0;tr.length-t.length)}function l_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Yu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return u_.add(e)}const u_=new mr;class Yu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function PW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function TW(n,e,t,r=0,i=n.length){let l=new DW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class DW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=IW(e)||Yu.empty,q=PW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function IW(n){let e=n.type.prop(u_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,mu=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),gu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),yu=Ft(),re={comment:mu,lineComment:Ft(mu),blockComment:Ft(mu),docComment:Ft(mu),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:gu,docString:Ft(gu),character:Ft(gu),attributeValue:Ft(gu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:yu,documentMeta:Ft(yu),annotation:Ft(yu),processingInstruction:Ft(yu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}c_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function f_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class RW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Ku{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Ku(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends o_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Ku.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let p_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(p_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,FW=Ur.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=p_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,FW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class _W{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const BW=$t.define(),wc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ju(n){let e=n.facet(wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function al(n,e){let t="",r=n.tabSize,i=n.facet(wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?LW(n,t,e):null}class kc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ju(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const h_=new mr;function LW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return d_(r,n,t)}function d_(n,e,t){for(let r=n;r;r=r.next){let i=MW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function NW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function MW(n){let e=n.type.prop(h_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>m_(h,!0,1,void 0,l&&!NW(h)?i.from:void 0)}return n.parent==null?$W:null}function $W(){return 0}class iO extends kc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return d_(this.context.next,this.base,this.pos)}}function jW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function qW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function QW({closing:n,align:e=!0,units:t=1}){return r=>m_(r,e,t,n)}function m_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?qW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const UW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const VW=200;function WW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+VW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=al(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const GW=$t.define(),g_=new mr;function zW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function XW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function ec(n,e,t){for(let r of n.facet(GW)){let i=r(n,e,t);if(i)return i}return ZW(n,e,t)}function y_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ac=sr.define({map:y_}),bl=sr.define({map:y_});function b_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Ac)&&!YW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new nG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(bl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function YW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function v_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(O_()))}const HW=n=>{for(let e of b_(n)){let t=ec(n.state,e.from,e.to);if(t)return n.dispatch({effects:v_(n.state,[Ac.of(t),x_(n,t)])}),!0}return!1},KW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of b_(n)){let r=tc(n.state,t.from,t.to);r&&e.push(bl.of(r),x_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function x_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(bl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:HW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KW},{key:"Ctrl-Alt-[",run:JW},{key:"Ctrl-Alt-]",run:eG}],rG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,rG)}});function O_(n){let e=[ca,aG];return n&&e.push(aO.of(n)),e}function S_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=tc(n.state,C.from,C.to);A&&n.dispatch({effects:bl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return S_(n,null)}}});class nG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return S_(e,this.value)}}const sG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iG(n={}){let e=Object.assign(Object.assign({},sG),n),t=new nv(e,!0),r=new nv(e,!1),i=Ur.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=tc(h.state,A.from,A.to)?r:ec(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,e_({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=tc(h.state,C.from,C.to);if(_)return h.dispatch({effects:bl.of(_)}),!0;let B=ec(h.state,C.from,C.to);return B?(h.dispatch({effects:Ac.of(B)}),!0):!1}})}),O_()]}const aG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=c_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new vl(e,t||{})}}const lx=$t.define(),E_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(E_)}function C_(n,e){let t=[lG],r;return n instanceof vl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(E_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class oG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)TW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const lG=Ri.high(Ur.fromClass(oG,{decorations:n=>n.decorations})),uG=vl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),cG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),w_=1e4,k_="()[]{}",A_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:k_,maxScanDistance:w_,renderMatch:hG})}}),fG=Ht.mark({class:"cm-matchingBracket"}),pG=Ht.mark({class:"cm-nonmatchingBracket"});function hG(n){let e=[],t=n.matched?fG:pG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const dG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(A_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),mG=[dG,cG];function gG(n={}){return[A_.of(n),mG]}const yG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(yG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||w_,l=r.brackets||k_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return bG(n,e,t,A,B,_,l)}}return vG(n,e,t,h,C.type,i,l)}function bG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const xG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),OG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OG[n]=SG(xG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function SG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[l_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const EG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?CG(n):r.block?kG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const CG=oO(TG,0),wG=oO(P_,0),kG=oO((n,e)=>P_(n,e,PG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function AG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function PG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function P_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>AG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),DG=ri.define(),IG=$t.define(),T_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),D_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(T_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=rc(B,B.length,t.minDepth,A):B=F_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(DG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function RG(n={}){return[D_,T_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?I_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Pc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(D_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const I_=Pc(0,!1),px=Pc(1,!1),FG=Pc(0,!0),_G=Pc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(IG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function rc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function BG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function LG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function R_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],NG=200;function F_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-NG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),rc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function MG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=$G(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function $G(n,e,t){let r=R_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const jG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||jG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const B_=n=>__(n,!vn(n)),L_=n=>__(n,vn(n));function N_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Tc(t,e))}const QG=n=>N_(n,!vn(n)),UG=n=>N_(n,vn(n));function VG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;VG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const WG=n=>vs(n,e=>Dc(n.state,e,!vn(n))),GG=n=>vs(n,e=>Dc(n.state,e,vn(n)));function M_(n,e){return vs(n,t=>{if(!t.empty)return Tc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const $_=n=>M_(n,!1),j_=n=>M_(n,!0);function q_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Tc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>Q_(n,!1),hx=n=>Q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const zG=n=>vs(n,e=>Fi(n,e,!0)),ZG=n=>vs(n,e=>Fi(n,e,!1)),XG=n=>vs(n,e=>Fi(n,e,!vn(n))),YG=n=>vs(n,e=>Fi(n,e,vn(n))),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),KG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function JG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headJG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function U_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>U_(n,!vn(n)),W_=n=>U_(n,vn(n));function G_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const tz=n=>G_(n,!vn(n)),rz=n=>G_(n,vn(n)),nz=n=>ss(n,e=>Dc(n.state,e,!vn(n))),sz=n=>ss(n,e=>Dc(n.state,e,vn(n)));function z_(n,e){return ss(n,t=>n.moveVertically(t,e))}const Z_=n=>z_(n,!1),X_=n=>z_(n,!0);function Y_(n,e){return ss(n,t=>n.moveVertically(t,e,q_(n).height))}const lI=n=>Y_(n,!1),uI=n=>Y_(n,!0),iz=n=>ss(n,e=>Fi(n,e,!0)),az=n=>ss(n,e=>Fi(n,e,!1)),oz=n=>ss(n,e=>Fi(n,e,!vn(n))),lz=n=>ss(n,e=>Fi(n,e,vn(n))),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),cz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),pz=({state:n,dispatch:e})=>{let t=Ic(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},hz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},dz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function xl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=bu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=bu(n,h,!1),C=bu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const H_=(n,e,t)=>xl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iH_(n,!1,!0),K_=n=>H_(n,!0,!1),J_=(n,e)=>xl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),eB=n=>J_(n,!1),mz=n=>J_(n,!0),gz=n=>xl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headxl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bz=n=>xl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},xz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ic(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function tB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Ic(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Oz=({state:n,dispatch:e})=>tB(n,e,!1),Sz=({state:n,dispatch:e})=>tB(n,e,!0);function rB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Ic(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ez=({state:n,dispatch:e})=>rB(n,e,!1),Cz=({state:n,dispatch:e})=>rB(n,e,!0),wz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ic(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function kz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=nB(!1),Az=nB(!0);function nB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&kz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new kc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Pz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new kc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=al(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(wc)})}),{userEvent:"input.indent"})),!0),iB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=al(n,Math.max(0,l-Ju(n)));for(;h(n.setTabFocusMode(),!0),Dz=[{key:"Ctrl-b",run:B_,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:L_,shift:W_},{key:"Ctrl-p",run:$_,shift:Z_},{key:"Ctrl-n",run:j_,shift:X_},{key:"Ctrl-a",run:HG,shift:uz},{key:"Ctrl-e",run:KG,shift:cz},{key:"Ctrl-d",run:K_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:gz},{key:"Ctrl-Alt-h",run:eB},{key:"Ctrl-o",run:vz},{key:"Ctrl-t",run:xz},{key:"Ctrl-v",run:hx}],Iz=[{key:"ArrowLeft",run:B_,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:XG,shift:oz,preventDefault:!0},{key:"ArrowRight",run:L_,shift:W_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:UG,shift:rz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:YG,shift:lz,preventDefault:!0},{key:"ArrowUp",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:j_,shift:X_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:ZG,shift:az,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:zG,shift:iz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:fz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:K_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:eB},{key:"Mod-Delete",mac:"Alt-Delete",run:mz},{mac:"Mod-Backspace",run:yz},{mac:"Mod-Delete",run:bz}].concat(Dz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:WG,shift:nz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GG,shift:sz},{key:"Alt-ArrowUp",run:Oz},{key:"Shift-Alt-ArrowUp",run:Ez},{key:"Alt-ArrowDown",run:Sz},{key:"Shift-Alt-ArrowDown",run:Cz},{key:"Escape",run:dz},{key:"Mod-Enter",run:Az},{key:"Alt-l",mac:"Ctrl-l",run:pz},{key:"Mod-i",run:hz,preventDefault:!0},{key:"Mod-[",run:iB},{key:"Mod-]",run:sB},{key:"Mod-Alt-\\",run:Pz},{key:"Shift-Mod-k",run:wz},{key:"Shift-Mod-\\",run:ez},{key:"Mod-/",run:EG},{key:"Alt-A",run:wG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Tz}].concat(Iz),Fz={key:"Tab",run:sB,shift:iB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=nc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=nc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(lB.prototype[Symbol.iterator]=uB.prototype[Symbol.iterator]=function(){return this});function _z(n){try{return new RegExp(n,cO),!0}catch{return!1}}function nc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:sc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[sc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const sc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sc)&&(n=t.value);return n},provide:n=>sl.from(n,e=>e?mx:null)}),Bz=n=>{let e=nl(n,mx);if(!e){let t=[sc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Lz])),n.dispatch({effects:t}),e=nl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Lz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Nz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cB=$t.define({combine(n){return bs(n,Nz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mz(n){let e=[Uz,Qz];return n&&e.push(cB.of(n)),e}const $z=Ht.mark({class:"cm-selectionMatch"}),jz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function qz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const Qz=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(cB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&qz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(jz.range(B,q)):(B>=i.to||q<=i.from)&&C.push($z.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Uz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Wz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Gz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Vz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Wz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class fB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||_z(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Yz(this):new Zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class pB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?zz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function zz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new lB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Xz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function ic(n,e){return n.slice(pn(n,e,!1),e)}function ac(n,e){return n.slice(e,pn(n,e))}function Xz(n){return(e,t,r)=>!r[0].length||(n(ic(r.input,r.index))!=Br.Word||n(ac(r.input,r.index))!=Br.Word)&&(n(ac(r.input,r.index+r[0].length))!=Br.Word||n(ic(r.input,r.index+r[0].length))!=Br.Word)}class Yz extends pB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const ol=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ol)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>sl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Hz=Ht.mark({class:"cm-searchMatch"}),Kz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jz=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Kz:Hz)})}return r.finish()}},{decorations:n=>n.decorations});function Ol(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):mB(e)}}const oc=Ol((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),dB(n),!0}),lc=Ol((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),dB(n),!0}),eZ=Ol((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),tZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=Ol((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),rZ=Ol((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new fB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function hB(n){let e=nl(n,pO);return e&&e.dom.querySelector("[main-field]")}function dB(n){let e=hB(n);e&&e==n.root.activeElement&&e.select()}const mB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=hB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:ol.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?ol.of(gx(n.state,e.query.spec)):sr.appendConfig.of(aZ)]});return!0},gB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=nl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},nZ=[{key:"Mod-f",run:mB,scope:"editor search-panel"},{key:"F3",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tZ},{key:"Mod-Alt-g",run:Bz},{key:"Mod-d",run:Gz,preventDefault:!0}];class sZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>oc(e),[Qn(e,"next")]),r("prev",()=>lc(e),[Qn(e,"previous")]),r("select",()=>eZ(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>rZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>gB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new fB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ol.of(e)}))}keydown(e){g7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?lc:oc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(ol)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const vu=30,xu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-vu),h=Math.min(i,t+vu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-vu;A--)if(!xu.test(C[A-1])&&xu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const iZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aZ=[Oi,Ri.low(Jz),iZ];class yB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(vB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function oZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:oZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function lZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function vB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function uZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function cZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=bB(n)),e}const uc=sr.define(),ll=sr.define();class fZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class pZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function hZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function dZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class mZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=dZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ll.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&yZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew mZ(t,n,e)}function yZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new pZ(q):new fZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=bZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:CZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new cc(SZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(cZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!vZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(SB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new cc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xZ:OZ}}function vZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SZ=[];function xB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=xB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(uc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ll))i=new Wn(i.source,0);else if(l.is(OB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new yB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function EZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):vB(n,!0).test(i)}const OB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),SB=sr.define(),Bn=Hr.define({create(){return cc.start()},update(n,e){return n.update(e)},provide:n=>[Ec.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},uZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const CZ=gZ(Bn,mO);function Ou(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:SB.of(C)}),!0}}const wZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:uc.of(!0)}),!0):!1,kZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ll.of(null)}),!0)};class AZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const PZ=50,TZ=1e3,DZ=Ur.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=xB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lPZ&&Date.now()-h.time>TZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(uc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new yB(e,t,n.explicitPos==t,this.view),i=new AZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ll.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:OB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&KF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ll.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uc.of(!1)}),20),this.composing=0}}}),IZ=typeof navigator=="object"&&/Win/.test(navigator.platform),RZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(IZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),EB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new FZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let _Z=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),BZ=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?_Z:BZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Sl=sr.define({map(n,e){return n&&n.map(e)}}),LZ=sr.define(),ul=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Sl))return t.value;if(t.is(LZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function NZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Sl.of(_)];t.state.field(ul,!1)===void 0&&B.push(sr.appendConfig.of([ul,QZ,UZ,EB]))}t.dispatch(t.state.update(A))}}function CB(n){return({state:e,dispatch:t})=>{let r=e.field(ul,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Sl.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const MZ=({state:n,dispatch:e})=>n.field(ul,!1)?(e(n.update({effects:Sl.of(null)})),!0):!1,$Z=CB(1),jZ=CB(-1),qZ=[{key:"Tab",run:$Z,shift:jZ},{key:"Escape",run:MZ}],kI=$t.define({combine(n){return n.length?n[0]:qZ}}),QZ=Ri.highest(gl.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:NZ(n)})}const UZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ul,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Sl.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const wB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function VZ(){return[GZ,wB]}const cv="()[]{}<>";function kB(n){for(let e=0;e{if((WZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=XZ(n.state,r);return l?(n.dispatch(l),!0):!1}),zZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=AB(n,n.selection.main.head).brackets||cl.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=YZ(n.doc,h.head);for(let A of r)if(A==C&&Rc(n.doc,h.head)==kB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},ZZ=[{key:"Backspace",run:zZ}];function XZ(n,e){let t=AB(n,n.selection.main.head),r=t.brackets||cl.brackets;for(let i of r){let l=kB(ln(i,0));if(e==i)return l==i?JZ(n,i,r.indexOf(i+i+i)>-1,t):HZ(n,i,l,t.before||cl.before);if(e==l&&PB(n,n.selection.main.from))return KZ(n,i,l)}return null}function PB(n,e){let t=!1;return n.field(wB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Rc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function YZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function HZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Rc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Rc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function JZ(n,e,t,r){let i=r.stringPrefixes||cl.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Rc(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(PB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!eX(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function eX(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function tX(n={}){return[RZ,Bn,fn.of(n),DZ,rX,EB]}const TB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:kZ},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:wZ}],rX=Ri.highest(gl.computeN([fn],n=>n.facet(fn).defaultKeymap?[TB]:[]));class nX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new hX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new nX(i,l,h.diagnostic),!1}),r}function DB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Fc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function IB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(MB))}function sX(n,e){return{effects:IB(n,[Fc.of(e)])}}const Fc=sr.define(),xO=sr.define(),RB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Fc)){let r=e.state.facet(Ls).autoPanel?t.value.length?fl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?fl.open:null,n.selected):t.is(RB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[sl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),iX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function aX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).toBB(n,t,!1)))}const oX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:IB(n.state,[xO.of(!0)])});let t=nl(n,fl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},lX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uX=[{key:"Mod-Shift-m",run:oX,preventDefault:!0},{key:"F8",run:lX}],cX=Ur.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(sX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function fX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function pX(n,e={}){return[Ls.of({source:n,config:e}),cX,MB]}function _B(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function BB(n,e,t){var r;let i=t?_B(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class hX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=BB(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=_B(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:RB.of(r)})}static open(e){return new fl(e)}}function _u(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Su(n){return _u(``,'width="6" height="3"')}const dX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class LB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)gX(e,t,r)),t}}function mX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mX(n,e)}let{hoverTime:i}=n.state.facet(_c),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function yX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new LB(t[i]).range(+i));return gr.of(r,!0)}const bX=e_({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new LB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(_c).markerFilter;for(let r of e.effects)if(r.is(Fc)){let i=r.value;t&&(i=t(i||[],e.state)),n=yX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),NB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=DB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Ec.from(n)}),vX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:_u('')},".cm-lint-marker-warning":{content:_u('')},".cm-lint-marker-error":{content:_u('')}}),MB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([iX.range(e.from,e.to)])}),rW(aX,{hideOn:DB}),dX],_c=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function xX(n={}){return[_c.of(n),yx,bX,vX,NB]}const OX=(()=>[pW(),mW(),F7(),RG(),iG(),S7(),A7(),Sr.allowMultipleSelections.of(!0),WW(),C_(uG,{fallback:!0}),gG(),VZ(),tX(),W7(),Z7(),$7(),Mz(),gl.of([...ZZ,...Rz,...nZ,...qG,...tG,...TB,...uX])])();class fc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new fc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new fc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class SX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class pc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pc(this.stack,this.pos,this.index)}}function Qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new Bu;class EX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;$B(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if($B(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class El{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function $B(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||CX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function CX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class wX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class kX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Bu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Bu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Bu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new wX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&DX(i);if(h)return Un&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Un&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Un&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Un&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Un&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Un&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Un&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Un&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Un&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Un&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class TX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class hc extends o_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=n_;let h=Qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new AX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(hc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const IX=312,RX=313,MI=1,FX=2,_X=3,BX=4,LX=314,NX=316,MX=317,$X=5,jX=6,qX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],jB=125,QX=59,xx=47,UX=42,VX=43,WX=45,GX=60,zX=44,ZX=63,XX=46,YX=91,HX=new TX({start:!1,shift(n,e){return e==$X||e==jX||e==NX?n:e==MX},strict:!1}),KX=new El((n,e)=>{let{next:t}=n;(t==jB||t==-1||e.context)&&n.acceptToken(LX)},{contextual:!0,fallback:!0}),JX=new El((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==UX)||t!=jB&&t!=QX&&t!=-1&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new El((n,e)=>{n.next==YX&&!e.context&&n.acceptToken(RX)},{contextual:!0}),tY=new El((n,e)=>{let{next:t}=n;if(t==VX||t==WX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:FX)}}else t==ZX&&n.peek(1)==XX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(_X))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const rY=new El((n,e)=>{if(n.next!=GX||!e.dialectEnabled(qX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(BX,-t)}),nY=l_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),sY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},iY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aY={__proto__:null,"<":187},oY=hc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:HX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[nY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[JX,eY,tY,rY,2,3,4,5,6,7,8,9,10,11,12,13,14,KX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>sY[n]||-1},{term:339,get:n=>iY[n]||-1},{term:92,get:n=>aY[n]||-1}],tokenPrec:15004}),qB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lY=qB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new SW,QB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const uY=["FunctionDeclaration"],cY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(uY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function UB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=cY[h.name];if(C&&C(h,l)||QB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of UB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function fY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)QB.has(i.name)&&(r=r.concat(UB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Hu.define({name:"javascript",parser:oY.configure({props:[h_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:UW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:QW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),g_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),WB={test:n=>/^JSX/.test(n.name),facet:f_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pY=Ei.configure({dialect:"ts"},"typescript"),hY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[WB]:void 0)]}),dY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[WB]:void 0)]},"typescript");let GB=n=>({label:n,type:"keyword"});const zB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(GB),mY=zB.concat(["declare","implements","private","protected","public"].map(GB));function gY(n={}){let e=n.jsx?n.typescript?dY:hY:n.typescript?pY:Ei,t=n.typescript?lY.concat(mY):qB.concat(zB);return new _W(e,[Ei.data.of({autocomplete:lZ(VB,bB(t))}),Ei.data.of({autocomplete:fY}),n.jsx?vY:[]])}function yY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vY=Mt.inputHandler.of((n,e,t,r,i)=>{if((bY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=yY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function xY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(OY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function OY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},SY={get exports(){return Ox},set exports(n){Ox=n}};const EY={define:!1,require:!1},CY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},wY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},kY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},AY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},PY={assert:!0,expect:!0,should:!0},TY={exports:!0,global:!1,module:!1,require:!1},DY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},IY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},RY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},UY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},GY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},ZY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},XY={$:!1,jQuery:!1},YY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},HY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},KY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},JY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},eH={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},rH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},nH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},sH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},iH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},aH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},oH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},lH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},uH={browser:!1,chrome:!1,opr:!1},cH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},fH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},pH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},hH={amd:EY,applescript:CY,atomtest:wY,browser:kY,builtin:AY,chai:PY,commonjs:TY,couch:DY,devtools:IY,embertest:RY,es2015:FY,es2016:_Y,es2017:BY,es2018:LY,es2019:NY,es2020:MY,es2021:$Y,es2022:jY,es2023:qY,es2024:QY,es2025:UY,es3:VY,es5:WY,greasemonkey:GY,jasmine:zY,jest:ZY,jquery:XY,meteor:YY,mocha:HY,mongo:KY,nashorn:JY,node:eH,nodeBuiltin:tH,phantomjs:rH,prototypejs:nH,protractor:sH,qunit:iH,rhino:aH,serviceworker:oH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:lH,webextensions:uH,worker:cH,wsh:fH,yui:pH};(function(n){n.exports=hH})(SY);const dH=E9(Ox);var dc={},mH={get exports(){return dc},set exports(n){dc=n}},dv,UI;function gH(){return UI||(UI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var KB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bc=function(c){return KB.exec(c).slice(1)};function wl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Mc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Lc(c){var s=Nc(c),u=eL(c,-1)==="/";return c=SO(Mc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Nc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Lc(Mc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=wl(c).substr(1),s=wl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function U(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,U=G.type||j.wrap,te=this.__keys[U],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+U+".");for(W=te.length;(W-=1)>=0;)if($=te[W],V=G[$],!!V){if(Array.isArray(V)){for(K=V.length;(K-=1)>=0;)if(V[K]&&!E(L,V[K])){if(S(U,te[W]))j=new g(V[K],[$,K],"Property",null);else if(b(V[K]))j=new g(V[K],[$,K],null,null);else continue;I.push(j)}}else if(b(V)){if(E(L,V))continue;I.push(new g(V,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,U;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(U,1)):U+=1;if(U===I.length)return a.Break;if(I[U].extendedRange[0]>Q.range[1])return a.Skip}}),U=0,k(F,{leave:function(Q){for(var $;UQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}($c)),$c}var oo={},rL="esrecurse",nL="ECMAScript AST recursive visitor",sL="https://github.com/estools/esrecurse",iL="esrecurse.js",aL="4.3.0",oL={node:">=4.0"},lL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],uL={type:"git",url:"https://github.com/estools/esrecurse.git"},cL={estraverse:"^5.2.0"},fL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},pL="BSD-2-Clause",hL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},dL={presets:["es2015"]},mL={name:rL,description:nL,homepage:sL,main:iL,version:aL,engines:oL,maintainers:lL,repository:uL,dependencies:cL,devDependencies:fL,license:pL,scripts:hL,babel:dL},RO;function gL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class U extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:V}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===V.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===V.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===V.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===V.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===V.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===V.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===V.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===V.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===V.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Ut=256,tr=Re|Se|Ut;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ve=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Vt=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Vt.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Ut)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Ut))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ut)>0},Vt.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,U.lastIndex=w,w+=U.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var hr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var w=U.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){U.lastIndex=this.pos;var tt=U.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new hr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ue=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ue&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Ut|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Vt.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new hr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Vt.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Ui(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Ui(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Vi(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Vi(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Uc}var NO;function bL(){return NO||(NO=1,function(c){const s=yL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(qc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||qc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(Qc)),Qc.exports}var uo={},MO;function vL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Pl(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=qc(),s=bL(),u=vL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var V=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,V.get?V:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],V=W.at(-1),ae={type:o.Template,value:K.slice(te.start,V.end)};return te.loc&&(ae.loc={start:te.loc.start,end:V.loc.end}),te.range&&(ae.start=te.range[0],ae.end=V.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,V=this._acornTokTypes;if(te===V.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===V.privateId)W.type=o.PrivateIdentifier;else if(te===V.semi||te===V.comma||te===V.parenL||te===V.parenR||te===V.braceL||te===V.braceR||te===V.dot||te===V.bracketL||te===V.colon||te===V.question||te===V.bracketR||te===V.ellipsis||te===V.arrow||te===V.jsxTagStart||te===V.incDec||te===V.starstar||te===V.jsxTagEnd||te===V.prefix||te===V.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===V.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===V.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===V.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===V.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===V.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,V=K.tokens,ae=this._tokens,z=()=>{V.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),V.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),V=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:V,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,V,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=V,ce.range=[te,V]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(V,ae){(typeof V!="object"||V===null)&&(V={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=V.sourceType,ue=E(V),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const V=this[k],ae=V.tokens;return V.comments&&(ae.comments=V.comments),ae}finishNode(...V){const ae=super.finishNode(...V);return this[D](ae)}finishNodeAt(...V){const ae=super.finishNodeAt(...V);return this[D](ae)}parse(){const V=this[k],ae=super.parse();if(ae.sourceType=V.originalSourceType,V.comments&&(ae.comments=V.comments),V.tokens&&(ae.tokens=V.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return V.lastToken&&(ae.range&&(ae.range[1]=V.lastToken.range[1]),ae.loc&&(ae.loc.end=V.lastToken.loc.end),ae.end=V.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(V){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(V)}raise(V,ae){const z=W.acorn.getLineInfo(this.input,V),ue=new SyntaxError(ae);throw ue.index=V,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(V,ae){this.raise(V,ae)}unexpected(V){let ae="Unexpected token";if(V!=null){if(this.pos=V,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(V){const ae=super.jsx_readString(V);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](V){return V.type==="TemplateElement"&&this[k].templateElements.push(V),V.type.includes("Function")&&!V.generator&&(V.generator=!1),V}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),U=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=U,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function xL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",U="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",V="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[U]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[V]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ue||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Vt}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var OL="eslint",SL="9.12.0",EL="Nicholas C. Zakas ",CL="An AST-based pattern checker for JavaScript.",wL={eslint:"./bin/eslint.js"},kL="./lib/api.js",AL="./lib/types/index.d.ts",PL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},TL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},DL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},IL={"pre-commit":"lint-staged"},RL=["LICENSE","README.md","bin","conf","lib","messages"],FL="eslint/eslint",_L="https://eslint.org/donate",BL="https://eslint.org",LL="https://github.com/eslint/eslint/issues/",NL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},ML={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},$L={jiti:"*"},jL={jiti:{optional:!0}},qL=["ast","lint","javascript","ecmascript","espree"],QL="MIT",UL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:OL,version:SL,author:EL,description:CL,bin:wL,main:kL,types:AL,exports:PL,typesVersions:TL,scripts:DL,gitHooks:IL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:RL,repository:FL,funding:_L,homepage:BL,bugs:LL,dependencies:NL,devDependencies:ML,peerDependencies:$L,peerDependenciesMeta:jL,keywords:qL,license:QL,engines:UL},Tl={},xs=[],Zn=[],WL=typeof Uint8Array<"u"?Uint8Array:Array,Vc=!1;function qO(){Vc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new WL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function zL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function ZL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Dl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function UO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var XL={}.toString,VO=Array.isArray||function(c){return XL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var YL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Il();function Il(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Vs(c,s){if(Il()=Il())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Il().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return _l(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function tN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return fN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return uN(this,s,u);case"latin1":case"binary":return cN(this,s,u);case"base64":return oN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return rN(this,s,u,p);case"utf8":case"utf-8":return nN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return sN(this,s,u,p);case"base64":return iN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return lN(p)}var KO=4096;function lN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Rl(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2};function Fl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Fl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Fl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),UO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),UO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function yN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return GL(dN(c))}function Bl(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function vN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||xN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function xN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),$l(s)?u.showHidden=s:s&&rf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=SN),Ml(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function SN(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function EN(c,s){return c}function CN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Ml(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Ml(c,p,u)),p}var a=wN(c,s);if(a)return a;var d=Object.keys(s),v=CN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Yc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Yc(s)}var o="",y=!1,O=["{","}"];if(Kc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Yc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=kN(c,s,u,v,d):g=d.map(function(f){return Hc(c,s,u,v,f,y)}),c.seen.pop(),AN(g,o,O)}function wN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Jc(s))return c.stylize(""+s,"number");if($l(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Yc(c){return"["+Error.prototype.toString.call(c)+"]"}function kN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function AN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Kc(c){return Array.isArray(c)}function $l(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Jc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&ef(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&ef(c)==="[object Date]"}function ha(c){return Li(c)&&(ef(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function jl(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function ef(c){return Object.prototype.toString.call(c)}function tf(c){return c<10?"0"+c.toString(10):c.toString(10)}var PN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function TN(){var c=new Date,s=[tf(c.getHours()),tf(c.getMinutes()),tf(c.getSeconds())].join(":");return[c.getDate(),PN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",TN(),Ll.apply(null,arguments))}function rf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function nf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,U=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=U(xe/je);xe>G*k>>1;Ge+=S)xe=U(xe/G);return U(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>U((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtU(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),U(Ge/nr)>b-ut&&$("overflow"),ut+=U(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnU((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Ut(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ve=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ve))Ce=Ce.replace(Ve,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Ut(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Vt(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var hr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:hr.domainHost,parse:hr.parse,serialize:hr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ue="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ue+"%"+Ue+Ue+"%"+Ue+Ue)+"|"+a("%[89A-Fa-f]"+Ue+"%"+Ue+Ue)+"|"+a("%"+Ue+Ue)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return U[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,V=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;vf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],U=L[3],Q=L[5];return(j<=23&&G<=59&&U<=59||j==23&&G==59&&U==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return vf}var xf,TS;function $N(){return TS||(TS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),xf}var Of,DS;function jN(){return DS||(DS=1,Of=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),Of}var Sf,IS;function qN(){return IS||(IS=1,Sf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),wf}var kf,BS;function WN(){return BS||(BS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),kf}var Af,LS;function GN(){return LS||(LS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),Af}var Pf,NS;function zN(){return NS||(NS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Pf}var Tf,MS;function ZN(){return MS||(MS=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Tf}var Df,$S;function XN(){return $S||($S=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,U=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Df}var If,jS;function qS(){return jS||(jS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),If}var Rf,QS;function US(){return QS||(QS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,VS;function WS(){return VS||(VS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,GS;function zS(){return GS||(GS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,ZS;function YN(){return ZS||(ZS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Bf}var Lf,XS;function HN(){return XS||(XS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Lf}var Nf,YS;function KN(){return YS||(YS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Nf}var Mf,HS;function JN(){return HS||(HS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Mf}var $f,KS;function eM(){return KS||(KS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(V),P=s.schema.patternProperties||{},N=Object.keys(P).filter(V),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,U=s.opts.removeAdditional,Q=j||G||U,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ve=s.util.getProperty(z),it=x+Ve,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ve,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Vt=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),$f}var jf,JS;function tM(){return JS||(JS=1,jf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Qf}var Uf,r1;function sM(){return r1||(r1=1,Uf={$ref:$N(),allOf:jN(),anyOf:qN(),$comment:QN(),const:UN(),contains:VN(),dependencies:WN(),enum:GN(),format:zN(),if:ZN(),items:XN(),maximum:qS(),minimum:qS(),maxItems:US(),minItems:US(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:YN(),not:HN(),oneOf:KN(),pattern:JN(),properties:eM(),propertyNames:tM(),required:rM(),uniqueItems:nM(),validate:wS()}),Uf}var Vf,n1;function iM(){if(n1)return Vf;n1=1;var c=sM(),s=da().toHash;return Vf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Vf}var Wf,s1;function aM(){if(s1)return Wf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Wf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),U={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...U},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...U},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...U},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...U,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,V=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Ut=new Error(qt,{cause:kt});throw kt.code&&(Ut.code=kt.code),Ut}}validateEnvironment(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Tl.Legacy=Re,Tl}var Ql={exports:{}},Ul={exports:{}},Kf,m1;function l$(){if(m1)return Kf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Kf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Kf}var Jf,g1;function y1(){if(g1)return Jf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=l$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ul,Ul.exports)),Ul.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var c$={isatty:v1,ReadStream:x1,WriteStream:O1},f$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:c$,isatty:v1}),p$=i(f$),S1;function h$(){return S1||(S1=1,function(c,s){const u=p$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=gH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?Ql.exports=u$():Ql.exports=h$()),Ql.exports}var ep,C1;function tp(){if(C1)return ep;C1=1;const c=kl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),U=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ue=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ue=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ue=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ue=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ue},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),V=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ue=Object.getOwnPropertyDescriptor(Te,ke);if(Ue)return Ue;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ue=0;Ue":return{value:Te.value>Ue.value};case">=":return{value:Te.value>=Ue.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ue.value};case">>>":return{value:Te.value>>>Ue.value};case"+":return{value:Te.value+Ue.value};case"-":return{value:Te.value-Ue.value};case"*":return{value:Te.value*Ue.value};case"/":return{value:Te.value/Ue.value};case"%":return{value:Te.value%Ue.value};case"**":return{value:Te.value**Ue.value};case"|":return{value:Te.value|Ue.value};case"^":return{value:Te.value^Ue.value};case"&":return{value:Te.value&Ue.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ue=ue(Ie.arguments,ke);if(Ue!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ue)};if(V.has(Pe[de]))return{value:Ue[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ue)};if(V.has(Oe))return{value:Ue[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ue=Te.defs[0];if(Ue.parent&&Ue.parent.kind==="const"&&Ue.node.id.type==="Identifier")return ce(Ue.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ue=ce(Ie.right,ke);if(Ue!=null)return Ue}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ue=pe(Ie,ke);if(Ue!=null&&!z(Te.value,Ue.value))return{value:Te.value[Ue.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ue=ue(Ie.arguments,ke);if(Te!=null&&Ue!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ue)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ue of Ie.properties)if(Ue.type==="Property"){if(Ue.kind!=="init")return null;const lt=pe(Ue,ke),Oe=ce(Ue.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ue.type==="SpreadElement"||Ue.type==="ExperimentalSpreadProperty"){const lt=ce(Ue.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ue=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ue!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ue)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ue=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ue}=Ie;return typeof this[Ue]=="function"?this[Ue](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ue}=Ie;for(const lt of Te[Ue]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ue=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ue},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ue,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ue=Ie|0,lt=ke,Oe=Te,!(Ue>=1))throw new TypeError("'times' should be a positive integer.")}else Ue=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ue>0);return Ue===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Ut=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ue=ke-1;Ue>=0&&Ie.charCodeAt(Ue)===92;--Ue)Te=!Te;return Te}function fe(Ie,ke,Te){const Ue=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}function Ve(Ie,ke,Te){const Ue=[];let lt=0;for(const Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Ut.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ue}=Ut.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ue||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ve(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Vt=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function hr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ue=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ue.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ue=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ue,!0))}for(const Te of this.globalObjectNames){const Ue=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ue,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ue=oe(Te.arguments[0]);if(Ue==null||!Bt(ke,Ue))continue;const lt=ke[Ue],Oe=[Ue];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ue of Te.body){if(!Pt.test(Ue.type)||Ue.source==null)continue;const lt=Ue.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ue,path:Pe,type:se,info:Oe[se]}),Ue.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ue,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ue.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ue,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ue[se]&&(yield{node:Pe,path:Te,type:se,info:Ue[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ue)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ue){let lt=ke;for(;hr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ue,Pe))return;Te=Te.concat(Pe);const de=Ue[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ue[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ue[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ue[Vt]&&(yield{node:Oe,path:Te,type:Vt,info:Ue[Vt]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue),yield*this._iteratePropertyReferences(Oe,Te,Ue));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ue))}*_iterateLhsReferences(ke,Te,Ue){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ue,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ue,Oe))continue;const Pe=Te.concat(Oe),de=Ue[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ue))}*_iterateImportReferences(ke,Te,Ue){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ue,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Vt,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Vt,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:U,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Vt,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=U,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(rp)),rp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Wl,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=lp;function lp(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",lp)}En.notDeepStrictEqual=up;function up(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",up)}En.strictEqual=cp;function cp(c,s,u){c!==s&&Cn(c,s,u,"===",cp)}En.notStrictEqual=fp;function fp(c,s,u){c===s&&Cn(c,s,u,"!==",fp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function v$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=v$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var x$=Object.freeze({__proto__:null,AssertionError:Wl,assert:mo,deepEqual:ap,deepStrictEqual:op,default:En,doesNotThrow:j1,equal:sp,fail:Cn,ifError:q1,notDeepEqual:lp,notDeepStrictEqual:up,notEqual:ip,notStrictEqual:fp,ok:mo,strictEqual:cp,throws:$1}),Gl=i(x$),pp,Q1;function go(){return Q1||(Q1=1,pp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),pp}var yo={},U1;function bo(){return U1||(U1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var hp,V1;function O$(){if(V1)return hp;V1=1;const c=go(),s=bo();return hp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},hp}var dp,W1;function S$(){if(W1)return dp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return dp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},dp}var mp,G1;function gp(){if(G1)return mp;G1=1;const c=go();return mp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},mp}var yp,z1;function E$(){if(z1)return yp;z1=1;const c=gp();return yp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},yp}var bp,Z1;function C$(){if(Z1)return bp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return bp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},Op}var Sp,H1;function k$(){if(H1)return Sp;H1=1;const c=gp();return Sp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Sp}var Ep,K1;function A$(){if(K1)return Ep;K1=1;const c=O$(),s=S$(),u=E$(),p=C$(),a=xp(),d=w$(),v=k$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Ep={forward:new m(a,p),backward:new m(s,c)},Ep}var Cp,J1;function P$(){if(J1)return Cp;J1=1;const c=xp();return Cp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Cp}var wp,eE;function T$(){if(eE)return wp;eE=1;const c=Gl,{isCommentToken:s}=Kr(),u=A$(),p=xp(),a=P$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return wp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Tp}var Dp,lE;function Ip(){if(lE)return Dp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Rp=d,Rp}var Fp,cE;function I$(){if(cE)return Fp;cE=1;const c=Ip(),s=D$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,U=this.thrownForkContext;G.add=f.bind(null,G,U,j),U.add=f.bind(null,U,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const U=this.choiceContext;return U.trueForkContext.addAll(I.trueForkContext),U.falseForkContext.addAll(I.falseForkContext),U.nullishForkContext.addAll(I.nullishForkContext),U.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const U=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,U,I.defaultBodySegments)):j.add(U));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Fp=P,Fp}var _p,fE;function pE(){if(fE)return _p;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return _p=c,_p}var Bp,hE;function R$(){if(hE)return Bp;hE=1;const c=I$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Lp=R,Lp}var Np,mE;function gE(){return mE||(mE=1,Np=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Np}var ji={},Mp={exports:{}},$p={exports:{}},jp,yE;function _$(){if(yE)return jp;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Up={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)V?te:V}),s=K(function(te,V){return te0?1:0},d=K(function(te,V){return~~(te/V)}),v=K(function(te,V){return te%V}),m=K(function(te,V){return Math.floor(te/V)}),o=K(function(te,V){var ae;return(te%(ae=V)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,V){return Math.pow(te,V)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,V){return Math.atan2(te,V)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},U=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,V){var ae;for(te=Math.abs(te),V=Math.abs(V);V!==0;)ae=te%V,te=V,V=ae;return te}),W=K(function(te,V){return Math.abs(Math.floor(te/$(te,V)*V))}),Vp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:U,odd:Q,gcd:$,lcm:W};function K(te,V){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,ZB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,ZB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Yp,FE;function V$(){var j;if(FE)return Yp;FE=1;const{isCommentToken:c}=Kr(),s=T$(),u=zl(),p=tp(),a=nE(),{directivesPattern:d}=iE(),v=F$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=jc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,U){const Q=[];let $=0,W=0;for(;$=U.length||$=U.range[0]||U.range[0]<=G.range[0]&&U.range[1]>=G.range[0]}function F(G,U,Q,$){if(R(U,Q))return!1;const[W,K]=U.range[1]<=Q.range[0]?[U,Q]:[Q,U],te=G.getLastToken(W)||W,V=G.getFirstToken(K)||K;let ae=te;for(;ae!==V;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==V&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,U={},Q={}){for(const $ of new Set([...Object.keys(U),...Object.keys(Q)])){const W=U[$]===void 0?void 0:T(U[$]),te=Q[$]&&Q[$].value||W,V=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=V!==void 0,ae.eslintExplicitGlobalComments=V,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,U){Object.keys(U).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,V,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,V=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=V||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const V=this.scopeManager.acquire(te,K);if(V)return V.type==="function-expression-name"?($.set(Q,V.childScopes[0]),V.childScopes[0]):($.set(Q,V),V)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const V=te.variables.find(ae=>ae.name===Q);if(V)return V.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:V,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(V);if(!(te.type==="Line"&&!ue)){if(V==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${V} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(V){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=V.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(V=>{const{label:ae,value:z}=f.parseDirective(V.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:V.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(V),K[ue].value=ce):K[ue]={comments:[V],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:V.loc}):Q.push({ruleId:null,loc:V.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Yp=L,Yp}var Hp,_E;function BE(){return _E||(_E=1,Hp={SourceCode:V$()}),Hp}var Kp,LE;function Zl(){return LE||(LE=1,Kp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Kp}var Jp,NE;function W$(){if(NE)return Jp;NE=1;const c=Zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Jp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Jp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function eh(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function G$(c){return function(s){if(Array.isArray(s))return th(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return th(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?th(c,s):void 0}}function th(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[U]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[U]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,U,Q,$,W,K,te;function V(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(U=$.length;(U-=1)>=0;)if($[U]){if(S(I,Q[G]))j=new g($[U],[te,U],"Property",new x($,U));else{if(!b($[U]))continue;j=new g($[U],[te,U],null,new x($,U))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||V(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)U.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(U),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var U;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),z$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=hr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,U=hr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=hr(["\\",'"'],!0,!1),V=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=hr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=hr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=hr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=hr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=hr(["/"],!0,!1),qt=Zt(":not(",!1),Ut=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ve=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Vt=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function hr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beVt&&(Vt=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ue(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(U))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Ut)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ve)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&UE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&UE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function nh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Xl.VisitorKeys[p]?Xl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function sh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=eh(u,1)[0];if(!d)return!1;for(var v=nh(d,a),m=0;m0&&sh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return oh={getPlaceholderMatcher:c,interpolate:s},oh}var lh,YE;function H$(){if(YE)return lh;YE=1;const c=Gl,{RuleFixer:s}=X$(),{interpolate:u}=Y$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return lh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},lh}function K$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uh,HE;function J$(){if(HE)return uh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),uh={LazyLoadingRuleMap:s},uh}var ch={exports:{}},xo={},fh={exports:{}},KE;function e3(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}fh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),fh.exports}var ph={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ph.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ph.exports}var hh={exports:{}},tC;function t3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}hh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),hh.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=e3(),xo.code=eC(),xo.keyword=t3()}()),xo}var dh,sC;function iC(){return sC||(sC=1,dh={LATEST_ECMA_VERSION:2025}),dh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=kl(),u=nC(),p=Pl(),a=Zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=zl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function U(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function V(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Ut(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ve(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Vt(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ve(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ve):ee.getFirstToken(X,Ve)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ue(ee.left,ee.operator),Ke=be&&ve&&Ue(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ue(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:V,isES5Constructor:G,getUpperFunction:U,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Vt,isDotToken:qt,isQuestionDotToken:Ut,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Ut),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ve),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ve,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=U(Ne);if(Ke===null||!V(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!V(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(V(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},mh}var gh,lC;function n3(){if(lC)return gh;lC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},gh}var yh,uC;function s3(){if(uC)return yh;uC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},yh}var bh,cC;function i3(){if(cC)return bh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return bh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},bh}var vh,fC;function a3(){if(fC)return vh;fC=1;const c=Ze();return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},vh}var xh,pC;function o3(){if(pC)return xh;pC=1;const c=Ze();return xh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},xh}var Oh,hC;function l3(){if(hC)return Oh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},Oh}var Sh,dC;function u3(){if(dC)return Sh;dC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Sh}var Eh,mC;function c3(){return mC||(mC=1,Eh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Eh}var Ch,gC;function f3(){if(gC)return Ch;gC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Ch}var wh,yC;function p3(){if(yC)return wh;yC=1;const c=Ze();return wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},wh}var kh,bC;function h3(){return bC||(bC=1,kh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),kh}var Ah,vC;function d3(){if(vC)return Ah;vC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},Ah}var Ph,xC;function m3(){if(xC)return Ph;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ph={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ph}var Th,OC;function g3(){if(OC)return Th;OC=1;const c=Ze();return Th={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Th}var Dh,SC;function y3(){if(SC)return Dh;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Dh}var Ih,EC;function b3(){if(EC)return Ih;EC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Ih}var Rh,CC;function v3(){if(CC)return Rh;CC=1;const c=Ze();return Rh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Rh}var Fh,wC;function Qi(){if(wC)return Fh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Fh={upperCaseFirst:u,getGraphemeCount:p},Fh}var _h,kC;function x3(){if(kC)return _h;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return _h={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},_h}var Bh,AC;function O3(){if(AC)return Bh;AC=1;const c=Ze();return Bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Bh}var Lh,PC;function S3(){if(PC)return Lh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Lh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Lh}var Nh,TC;function E3(){return TC||(TC=1,Nh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Nh}var Mh,DC;function C3(){if(DC)return Mh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Mh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const U=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+U)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},$h}var jh,RC;function k3(){if(RC)return jh;RC=1;const c=/^no default$/iu;return jh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},jh}var qh,FC;function A3(){return FC||(FC=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),qh}var Qh,_C;function P3(){return _C||(_C=1,Qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),Qh}var Uh,BC;function T3(){if(BC)return Uh;BC=1;const c=Ze();return Uh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Uh}var Vh,LC;function Wh(){return LC||(LC=1,Vh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Vh}var Gh,NC;function D3(){if(NC)return Gh;NC=1;const c=Ze(),s=Wh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Gh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Gh}var zh,MC;function I3(){return MC||(MC=1,zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),zh}var Zh,$C;function R3(){if($C)return Zh;$C=1;const c=Ze();return Zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Zh}var Xh,jC;function F3(){if(jC)return Xh;jC=1;const{getStaticValue:c}=Kr();return Xh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Xh}var Yh,qC;function _3(){if(qC)return Yh;qC=1;const c=Ze();return Yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Hh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Hh}var Kh,UC;function L3(){if(UC)return Kh;UC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Kh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Kh}var Jh,VC;function N3(){return VC||(VC=1,Jh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Jh}var ed,WC;function M3(){return WC||(WC=1,ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return sd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},sd}var id,YC;function U3(){if(YC)return id;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},id}var ad,HC;function V3(){return HC||(HC=1,ad={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),ad}var od,KC;function W3(){return KC||(KC=1,od={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),od}var ld,JC;function G3(){if(JC)return ld;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ld={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ld}var ud,ew;function z3(){if(ew)return ud;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ud={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ud}var cd,tw;function Z3(){if(tw)return cd;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return cd={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},cd}var fd,rw;function X3(){return rw||(rw=1,fd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),fd}var pd,nw;function Y3(){if(nw)return pd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},pd}var hd,sw;function H3(){if(sw)return hd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return hd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function U(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function V(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:V}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||V(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(V,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[V.range[1]-V.loc.end.column,V.range[1]-V.loc.end.column+z+ue]:[V.range[0]-V.loc.start.column,V.range[0]-V.loc.start.column+z+ue];s.report({node:V,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(V,ae){const z=ae?o.getLastToken(V):o.getFirstToken(V),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(V,ae){const z=ae===!0?o.getLastToken(V,1):o.getTokenBefore(V),ue=ae===!0?V.loc.end.line:V.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(V,ae){const z=g(V,!1);if(V.type!=="ArrayExpression"&&V.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab),V.type==="IfStatement"&&V.alternate){const ue=o.getTokenBefore(V.alternate);b(ue,ae),f(V.alternate)||b(V.alternate,ae)}if(V.type==="TryStatement"&&V.handler){const ue=o.getFirstToken(V.handler);b(ue,ae)}if(V.type==="TryStatement"&&V.finalizer){const ue=o.getTokenBefore(V.finalizer);b(ue,ae)}if(V.type==="DoWhileStatement"){const ue=o.getTokenAfter(V.body);b(ue,ae)}}function S(V,ae){V.forEach(z=>b(z,ae))}function E(V,ae){const z=o.getLastToken(V),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(V,!0)&&x(V,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(V,ae){const z=o.getLastToken(V,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(V,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(V,ae){const z=g(V,!1);(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab,{line:V.loc.start.line,column:V.loc.start.column})}function T(V,ae,z){let ue=V.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(V){return T(V,"VariableDeclarator")}function F(V,ae){return ae&&ae.parent.loc.start.line===V.loc.start.line&&ae.parent.declarations.length>1}function P(V){const ae=V.parent;return ae.arguments.length>=2&&ae.arguments[1]===V?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(V){const ae=V.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==V)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(V){const ae=V.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(V.body,z),E(V,z-ue)}function L(V){const ae=o.getLastToken(V),z=V.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(V){if(L(V))return;let ae=V.type==="ArrayExpression"?V.elements:V.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(V);if(f(V)){const ce=V.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==V.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=V.parent.type==="ObjectExpression"?V.parent.properties:V.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(V)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(V,z)}else z=g(V).goodChar;m[V.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[V.type],F(V,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===V.loc.end.line)&&E(V,z+(F(V,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(V){return V.type==="BlockStatement"||V.type==="ClassBody"||V.body&&V.body.type==="BlockStatement"||V.consequent&&V.consequent.type==="BlockStatement"}function U(V){if(L(V))return;if(V.parent&&(V.parent.type==="FunctionExpression"||V.parent.type==="FunctionDeclaration"||V.parent.type==="ArrowFunctionExpression")){I(V);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];V.parent&&ue.includes(V.parent.type)&&G(V)?ae=g(V.parent).goodChar:V.parent&&V.parent.type==="CatchClause"?ae=g(V.parent.parent).goodChar:ae=g(V).goodChar,V.type==="IfStatement"&&V.consequent.type!=="BlockStatement"?z=[V.consequent]:Array.isArray(V.body)?z=V.body:z=[V.body],z.length>0&&S(z,ae+v),V.type==="BlockStatement"&&E(V,ae)}function Q(V){return V.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==V.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(V){const ae=Q(V),z=g(V).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[V.kind];if(S(ae,ne),o.getLastToken(V).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(V,g(ce).goodChar):E(V,ne-v)}function W(V){V.body.type!=="BlockStatement"&&U(V)}function K(V,ae){const z=V.type==="SwitchStatement"?V:V.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(V){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(V).replace(o.getText(V.argument),"");return ae.test(z)}return{Program(V){V.body.length>0&&S(V.body,g(V).goodChar)},ClassBody:U,BlockStatement:U,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(V){V.consequent.type!=="BlockStatement"&&V.consequent.loc.start.line>V.loc.start.line&&U(V)},VariableDeclaration(V){V.declarations.at(-1).loc.start.line>V.declarations[0].loc.start.line&&$(V)},ObjectExpression(V){j(V)},ArrayExpression(V){j(V)},MemberExpression(V){if(typeof m.MemberExpression>"u"||L(V)||T(V,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(V,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(V).goodChar+v*m.MemberExpression,z=[V.property],ue=o.getTokenBefore(V.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(V){const ae=g(V).goodChar,z=K(V,ae);S(V.cases,z),E(V,ae)},SwitchCase(V){if(L(V))return;const ae=K(V);S(V.consequent,ae+v)},FunctionDeclaration(V){L(V)||(m.FunctionDeclaration.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(V){L(V)||(m.FunctionExpression.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(V){if(L(V))return;const ae=g(V).goodChar;te(V)?k(V,ae):b(V,ae)},CallExpression(V){L(V)||(m.CallExpression.arguments==="first"&&V.arguments.length?S(V.arguments.slice(1),V.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(V.arguments,g(V).goodChar+v*m.CallExpression.arguments))}}}},dd}var md,aw;function J3(){if(aw)return md;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return md={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const V=W.length-K;if((V&&te==="strict"||V<0&&te==="minimum"||V>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=V>0,pe=Math.abs(V),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),V,ae,z;f&&$>1?(V=f.beforeColon,ae=f.afterColon,z=f.mode):(V=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?V:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,V,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):U(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},yd}var bd,uw;function r5(){if(uw)return bd;uw=1;const c=Ze(),s=Wh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:U,ExportNamedDeclaration:V,ExportDefaultDeclaration:V,ExportAllDeclaration:V,FunctionDeclaration:G,ImportDeclaration:V,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:U,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},bd}var vd,cw;function n5(){if(cw)return vd;cw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},vd}var xd,fw;function s5(){if(fw)return xd;fw=1;const c=Ze();return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},xd}var Od,pw;function i5(){if(pw)return Od;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function U($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const V=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&U($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(V<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(V)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},Od}var Sd,hw;function a5(){if(hw)return Sd;hw=1;const c=Ze();return Sd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Sd}var Ed,dw;function o5(){if(dw)return Ed;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Ed}var Cd,mw;function l5(){if(mw)return Cd;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Cd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),U=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||U)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield U.insertTextBefore(W,I.operator),yield U.removeRange([R.range[0],P.range[0]]),yield U.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield U.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Cd}var wd,gw;function u5(){return gw||(gw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),wd}var kd,yw;function c5(){return yw||(yw=1,kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),kd}var Ad,bw;function f5(){if(bw)return Ad;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return Ad={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(U,Q){let $=0;return U.replace(/\t/gu,(W,K)=>{const te=K+$,V=Q?te%Q:0,ae=Q-V;$+=ae-1}),Array.from(U).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(U,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===U.length)}function D(U,Q,$){const W=$.loc.start,K=$.loc.end,te=!U.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===U.length)}function T(U){if(!U||!U.parent||U.type!=="JSXEmptyExpression"||U.parent.type!=="JSXExpressionContainer")return!1;const Q=U.parent;return Q.loc.start.line===Q.loc.end.line}function R(U,Q){return U.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(U,Q,$){Array.isArray(U[Q])||(U[Q]=[]),U[Q].push($)}function P(){return a.ast.tokens.filter(U=>U.type==="String"||U.type==="JSXText"&&a.getNodeByRangeIndex(U.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(U=>U.type==="Template")}function I(){return a.ast.tokens.filter(U=>U.type==="RegularExpression")}function L(U){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?U.at(-1)!==$.parent&&U.push($.parent):U.push(Q)}),U}function G(U){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),V=N(),ae=L(V),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:U,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:U,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},Ad}var Pd,vw;function p5(){if(vw)return Pd;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Pd}var Td,xw;function h5(){if(xw)return Td;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Td}var Dd,Ow;function d5(){return Ow||(Ow=1,Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Dd}var Id,Sw;function m5(){if(Sw)return Id;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Id}var Rd,Ew;function g5(){if(Ew)return Rd;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Rd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Rd}var Fd,Cw;function y5(){if(Cw)return Fd;Cw=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Fd}var _d,ww;function b5(){if(ww)return _d;ww=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const U=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=U+K.length;return G.replaceTextRange([U,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=U+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const V=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=V.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([U,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},_d}var Bd,kw;function v5(){if(kw)return Bd;kw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Bd}var Ld,Aw;function x5(){if(Aw)return Ld;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Ld={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Ld}var Nd,Pw;function O5(){if(Pw)return Nd;Pw=1;const c=Ze();return Nd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Nd}var Md,Tw;function S5(){if(Tw)return Md;Tw=1;const c=Ze();return Md={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Md}var $d,Dw;function E5(){return Dw||(Dw=1,$d={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),$d}var jd,Iw;function C5(){if(Iw)return jd;Iw=1;const c=Ze();return jd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},jd}var qd,Rw;function w5(){if(Rw)return qd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return qd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},qd}var Qd,Fw;function k5(){if(Fw)return Qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return Qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},Qd}var Ud,_w;function A5(){return _w||(_w=1,Ud={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Ud}var Vd,Bw;function P5(){if(Bw)return Vd;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Vd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Vd}var Wd,Lw;function T5(){if(Lw)return Wd;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Wd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Wd}var Gd,Nw;function D5(){return Nw||(Nw=1,Gd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Gd}var zd,Mw;function I5(){return Mw||(Mw=1,zd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),zd}var Zd,$w;function R5(){return $w||($w=1,Zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Zd}var Xd,jw;function F5(){if(jw)return Xd;jw=1;const c=Ze();return Xd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Xd}var Yd,qw;function _5(){if(qw)return Yd;qw=1;const c=Ze();return Yd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Yd}var Hd,Qw;function B5(){return Qw||(Qw=1,Hd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Hd}var Kd,Uw;function L5(){if(Uw)return Kd;Uw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Kd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Kd}var Jd,Vw;function N5(){if(Vw)return Jd;Vw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Jd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Jd}var em,Ww;function M5(){if(Ww)return em;Ww=1;const c=Ze();return em={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},em}var tm,Gw;function $5(){if(Gw)return tm;Gw=1;const c=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},tm}var rm,zw;function j5(){if(zw)return rm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return rm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},rm}var nm,Zw;function q5(){if(Zw)return nm;Zw=1;const{isConstant:c}=Ze();return nm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},nm}var sm,Xw;function Q5(){return Xw||(Xw=1,sm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),sm}var im,Yw;function U5(){return Yw||(Yw=1,im={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,U=33,Q=35,$=36,W=37,K=38,te=40,V=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Ut=66,tr=68,fe=70,Ve=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Vt=98,ir=99,Ot=100,Zt=102,hr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ue=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,V,be,ve,at,ht,dt]),Xn=new Set([K,U,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,V,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,U,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Ui(nt){return ws(nt)||bt(nt)}class Vi{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===V&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==U)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(U))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==V&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ve)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ue)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Ui(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Vi(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Vi(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Vi,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var am,Kw;function V5(){if(Kw)return am;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return am={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},am}var om,Jw;function W5(){return Jw||(Jw=1,om={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,ek;function G5(){return ek||(ek=1,lm={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),lm}var um,tk;function z5(){return tk||(tk=1,um={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),um}var cm,rk;function Z5(){return rk||(rk=1,cm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),cm}var fm,nk;function X5(){if(nk)return fm;nk=1;const c=Ze();return fm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},fm}var pm,sk;function Y5(){if(sk)return pm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return pm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},pm}var hm,ik;function H5(){if(ik)return hm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},hm}var dm,ak;function K5(){if(ak)return dm;ak=1;const c=Ze();return dm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},dm}var mm,ok;function J5(){if(ok)return mm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return mm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},mm}var gm,lk;function Oo(){if(lk)return gm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return gm=s,gm}var ym,uk;function ej(){if(uk)return ym;uk=1;const c=Ze(),s=Oo();return ym={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),U=p.getTokenBefore(G);if(U.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===U.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},ym}var bm,ck;function tj(){if(ck)return bm;ck=1;const c=Ze();return bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},bm}var vm,fk;function rj(){if(fk)return vm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return vm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},vm}var xm,pk;function nj(){if(pk)return xm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return xm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},xm}var Om,hk;function sj(){if(hk)return Om;hk=1;const c=Ze();return Om={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},Om}var Sm,dk;function ij(){return dk||(dk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Sm}var Em,mk;function aj(){return mk||(mk=1,Em={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Em}var Cm,gk;function oj(){if(gk)return Cm;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Cm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Cm}var wm,yk;function lj(){if(yk)return wm;yk=1;const c=Ze();return wm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},wm}var km,bk;function uj(){if(bk)return km;bk=1;const c=Ze();return km={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},km}var Am,vk;function cj(){if(vk)return Am;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},Am}var Pm,xk;function fj(){if(xk)return Pm;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Pm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ve||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function U(fe){for(let Ve=fe;Ve;Ve=Ve.parent)if(Ve.type==="ReturnStatement"||Ve.type==="ArrowFunctionExpression"&&Ve.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ve=p.getLastToken(fe),mt=p.getTokenBefore(Ve);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ve)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ve.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ve.range[1],mt.range[0]);return Bt.replaceTextRange([Ve.range[0],mt.range[1]],(te(fe)?" ":"")+se+(V(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ve=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ve=Ve.object,mt=Ve.type;return mt==="CallExpression"}function Be(fe){const Ve=fe.callee;j(Ve,d(fe))&&(L(Ve)||!(ae(fe)||Ve.type==="NewExpression"&&!Q(Ve)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ve.type==="MemberExpression"&&pe(Ve)||!fe.optional&&Ve.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ve=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ve||mt===Ve&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ve||Pt===Ve&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ve=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ve,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ve)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ve){const mt=[fe];let Pt=fe;for(;Pt!==Ve;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ve){return Se(Ve,fe).reverse()}function Me(fe,Ve){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ve);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ve);case"MemberExpression":return fe.computed&&fe.property===Ve;case"ConditionalExpression":return fe.consequent===Ve;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ve,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ve),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ve=>Ve.node===fe)}function qt(fe){T.reports=T.reports.filter(Ve=>Ve.node!==fe)}function Ut(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Ut(fe.parent):!1}function tr({left:fe,operator:Ve,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ve)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ve=>Ve&&j(Ve,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ve=>z(Ve)&&I(Ve)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ve=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ve);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ve)&&a.add(Ve),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ve=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ve.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ve.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ve.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&a.add(Ve)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ve=>{const mt=we(fe,Ve);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ve=>Ve.value&&j(Ve.value,k)).forEach(Ve=>ne(Ve.value))},ObjectPattern(fe){fe.properties.filter(Ve=>{const mt=Ve.value;return z(mt)&&I(mt)}).forEach(Ve=>ne(Ve.value))},Property(fe){if(fe.computed){const{key:Ve}=fe;Ve&&j(Ve,k)&&ne(Ve)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ve=fe.argument;z(Ve)&&I(Ve)&&ne(Ve)},ReturnStatement(fe){const Ve=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ve,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ve=d(fe);fe.expressions.filter(mt=>j(mt,Ve)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ve=p.getFirstToken(fe);K(Ve,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ve}=fe,mt=p.getLastToken(fe);Ve.loc.end.line===mt.loc.start.line?ce(fe):L(Ve)&&ne(Ve)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ve=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ve,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ve=>Ve&&I(Ve)).forEach(ne)},AssignmentPattern(fe){const{left:Ve,right:mt}=fe;z(Ve)&&I(Ve)&&ne(Ve),mt&&j(mt,k)&&ne(mt)}}}},Dm}var Im,Ek;function dj(){if(Ek)return Im;Ek=1;const c=Oo(),s=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Im}var Rm,Ck;function mj(){if(Ck)return Rm;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Rm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Rm}var Fm,wk;function gj(){if(wk)return Fm;wk=1;const c=Ze();return Fm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Fm}var _m,kk;function yj(){if(kk)return _m;kk=1;const c=Ze();return _m={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},_m}var Bm,Ak;function bj(){return Ak||(Ak=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Bm}var Lm,Pk;function vj(){if(Pk)return Lm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Lm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Lm}var Nm,Tk;function xj(){return Tk||(Tk=1,Nm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Nm}var Mm,Dk;function Oj(){if(Dk)return Mm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Mm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Mm}var $m,Ik;function Sj(){if(Ik)return $m;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return $m={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},$m}var jm,Rk;function Ej(){if(Rk)return jm;Rk=1;const c=Ze();return jm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},jm}var qm,Fk;function Cj(){if(Fk)return qm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return qm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},qm}var Qm,_k;function wj(){if(_k)return Qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return Qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},Qm}var Um,Bk;function kj(){if(Bk)return Um;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Um={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Um}var Vm,Lk;function Aj(){if(Lk)return Vm;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Vm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const U=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:U,column:Q.index},end:{line:U,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let U=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],U+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),U=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Vm}var Wm,Nk;function Pj(){if(Nk)return Wm;Nk=1;const{getStaticPropertyName:c}=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Wm}var Gm,Mk;function Tj(){if(Mk)return Gm;Mk=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Gm}var zm,$k;function Dj(){if($k)return zm;$k=1;const c=Ze();return zm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},zm}var Zm,jk;function Ij(){return jk||(jk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Zm}var Xm,qk;function Rj(){return qk||(qk=1,Xm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Xm}var Ym,Qk;function Fj(){if(Qk)return Ym;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Ym={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Ym}var Hm,Uk;function _j(){return Uk||(Uk=1,Hm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Hm}var Km,Vk;function Bj(){if(Vk)return Km;Vk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Km={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),eg}var tg,zk;function Mj(){return zk||(zk=1,tg=function(s){return s>=127462&&s<=127487}),tg}var rg,Zk;function $j(){return Zk||(Zk=1,rg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),rg}var ng,Xk;function jj(){if(Xk)return ng;Xk=1;const c=Lj(),s=Nj(),u=Mj(),p=$j();return ng={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},ng}var sg,Yk;function ig(){if(Yk)return sg;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return sg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},sg}var ag,Hk;function qj(){if(Hk)return ag;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ag={parseStringLiteral:o,parseTemplateToken:y},ag}var og,Kk;function Qj(){if(Kk)return og;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=jj(),x=Ze(),{isValidWithUnicodeFlag:g}=ig(),{parseStringLiteral:f,parseTemplateToken:b}=qj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,U=I[j].end,Q=N.slice(G,U);return R(P,Q)}return og={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var U;const N=(U=P.options[0])==null?void 0:U.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let V=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return V??(V=f(ce)),F(ne,ce,V)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return V??(V=b(ce)),F(ne,ce,V)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];V??(V=b(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];V??(V=f(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,V;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),V=a(z,$);else{if(ue.regex)continue;te=String(ue.value),V=""}typeof V=="string"&&G(ae,te,V,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},og}var lg,Jk;function Uj(){if(Jk)return lg;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},lg}var ug,eA;function Vj(){return eA||(eA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),ug}var cg,tA;function Wj(){return tA||(tA=1,cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),cg}var fg,rA;function Gj(){return rA||(rA=1,fg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),fg}var pg,nA;function zj(){if(nA)return pg;nA=1;const c=Ze();return pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},pg}var hg,sA;function Zj(){if(sA)return hg;sA=1;const c=Ze();return hg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},hg}var dg,iA;function Xj(){return iA||(iA=1,dg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),dg}var mg,aA;function Yj(){return aA||(aA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),mg}var gg,oA;function Hj(){return oA||(oA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),gg}var yg,lA;function Kj(){return lA||(lA=1,yg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),yg}var bg,uA;function Jj(){return uA||(uA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),bg}var vg,cA;function eq(){return cA||(cA=1,vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),vg}var xg,fA;function tq(){if(fA)return xg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return xg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},xg}var Og,pA;function rq(){if(pA)return Og;pA=1;const c=["Symbol","BigInt"];return Og={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},Og}var Sg,hA;function nq(){if(hA)return Sg;hA=1;const c=Ze();return Sg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Sg}var Eg,dA;function sq(){return dA||(dA=1,Eg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Eg}var Cg,mA;function iq(){return mA||(mA=1,Cg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Cg}var wg,gA;function aq(){if(gA)return wg;gA=1;const{getVariableByName:c}=Ze();return wg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},wg}var kg,yA;function oq(){if(yA)return kg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return kg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},kg}var Ag,bA;function lq(){if(bA)return Ag;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return Ag={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},Ag}var Pg,vA;function uq(){if(vA)return Pg;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Pg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Pg}var Tg,xA;function cq(){return xA||(xA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Tg}var Dg,OA;function fq(){return OA||(OA=1,Dg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Dg}var Ig,SA;function pq(){if(SA)return Ig;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Ig={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Ig}var Rg,EA;function hq(){return EA||(EA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Rg}var Fg,CA;function dq(){if(CA)return Fg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Fg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Fg}var _g,wA;function mq(){return wA||(wA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),_g}var Bg,kA;function gq(){return kA||(kA=1,Bg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Bg}var Lg,AA;function yq(){if(AA)return Lg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Lg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Lg}var Ng,PA;function bq(){if(PA)return Ng;PA=1;const{getStaticPropertyName:c}=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Ng}var Mg,TA;function vq(){if(TA)return Mg;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Mg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Mg}var $g,DA;function xq(){if(DA)return $g;DA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},$g}var jg,IA;function Oq(){if(IA)return jg;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return jg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},jg}var qg,RA;function Sq(){if(RA)return qg;RA=1;const c=Ze();return qg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},qg}var Qg,FA;function Eq(){return FA||(FA=1,Qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),Qg}var Ug,_A;function BA(){if(_A)return Ug;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,V)=>Object.defineProperty(K,te,{value:V}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,V,ae)=>V.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,V)=>te+6{const ae=V.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,V,ae,z)=>te===p?`\\[${V}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(V)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let V=T[K];return V||(V=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=V),te?new RegExp(V,"i"):new RegExp(V)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,V,ae,z){this.origin=te,this.pattern=V,this.negative=ae,this.regex=z}}const L=(K,te)=>{const V=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(V,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,V)=>F(K)?K?G.isNotRelative(K)?V(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:V("path must not be empty",TypeError):V(`path must be a string, but got \`${te}\``,TypeError),U=K=>y.test(K);G.isNotRelative=U,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:V=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=V,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const V=L(te,this._ignoreCase);this._added=!0,this._rules.push(V)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,V){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!V)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,V,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,V,ae,z)}_t(te,V,ae,z){if(te in V)return V[te];if(z||(z=te.split(O)),z.pop(),!z.length)return V[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,V,ae,z);return V[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Ug=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=V=>/^\\\\\?\\/.test(V)||/["<>|\u0000-\u001F]+/u.test(V)?V:V.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=V=>te.test(V)||U(V)}return Ug}var Vg,LA;function Cq(){if(LA)return Vg;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Vg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Vg}var Wg,NA;function wq(){if(NA)return Wg;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Wg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Wg}var Gg,MA;function kq(){if(MA)return Gg;MA=1;const c=Ze();return Gg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Gg}var zg,$A;function Aq(){return $A||($A=1,zg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),zg}var Zg,jA;function Pq(){if(jA)return Zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Zg}var Xg,qA;function Tq(){if(qA)return Xg;qA=1;const c=Ze();return Xg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Xg}var Yg,QA;function Dq(){if(QA)return Yg;QA=1;const c=Ze();return Yg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Yg}var Hg,UA;function Iq(){if(UA)return Hg;UA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Kg}var Jg,WA;function Fq(){if(WA)return Jg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Jg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Jg}var e0,GA;function _q(){if(GA)return e0;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return e0={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},e0}var t0,zA;function Bq(){if(zA)return t0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return t0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,U=>u.has(U.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},t0}var r0,ZA;function Lq(){if(ZA)return r0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return r0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},r0}var n0,XA;function Nq(){return XA||(XA=1,n0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},a0}var o0,JA;function qq(){return JA||(JA=1,o0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),o0}var l0,eP;function Qq(){return eP||(eP=1,l0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),l0}var u0,tP;function Uq(){if(tP)return u0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return u0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},u0}var c0,rP;function Vq(){if(rP)return c0;rP=1;const c=Ze();return c0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},c0}var f0,nP;function Wq(){if(nP)return f0;nP=1;const c=Ze();return f0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&U{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},p0}var h0,iP;function zq(){if(iP)return h0;iP=1;const c=Ze();return h0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},h0}var d0,aP;function Zq(){return aP||(aP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),d0}var m0,oP;function Xq(){return oP||(oP=1,m0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let U=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(U.type);)U=U.parent;f(G)&&!S(G)&&!g(G)&&!(y&&U.type==="ArrayPattern")&&!(O&&U.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),m0}var g0,lP;function Yq(){if(lP)return g0;lP=1;const c=Ze();return g0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},g0}var y0,uP;function Hq(){if(uP)return y0;uP=1;const c=tp(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},y0}var b0,cP;function Kq(){if(cP)return b0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return b0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return v0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},v0}var x0,pP;function e6(){if(pP)return x0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return x0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},x0}var O0,hP;function t6(){if(hP)return O0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return O0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},O0}var S0,dP;function r6(){if(dP)return S0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return S0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},S0}var E0,mP;function n6(){if(mP)return E0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return E0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},E0}var C0,gP;function s6(){if(gP)return C0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return C0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},w0}var k0,bP;function a6(){return bP||(bP=1,k0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),k0}var A0,vP;function o6(){if(vP)return A0;vP=1;const c=Ze();return A0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(U){if(a.destructuredArrayIgnorePattern&&U.name.parent.type==="ArrayPattern")return"array-destructure";switch(U.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(U){let Q,$;switch(U){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${U}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"defined",additional:$}}function y(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"assigned a value",additional:$}}function O(U,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:U.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(U){const Q=U.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(U){return U.type==="Property"&&U.parent.type==="ObjectPattern"&&p.test(U.parent.properties.at(-1).type)}function b(U){if(a.ignoreRestSiblings){const Q=U.defs.some(W=>f(W.name.parent)),$=U.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(U){return U.isRead()}function E(U,Q){let $=U.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(U){const Q=[];return U.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(U,Q){return U.range[0]>=Q.range[0]&&U.range[1]<=Q.range[1]}function T(U){const Q=U.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===U?T(Q):!0:!1}function R(U,Q){const $=U.identifier,W=$.parent,K=U.from.variableScope,te=U.resolved.scope.variableScope,V=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!V?W.right:null}function F(U,Q){let $=U,W=U.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(U,Q){const $=c.getUpperFunction(U);return $&&D($,Q)&&F($,Q)}function N(U,Q){const $=U.identifier,W=$.parent;return U.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(U){let Q=U.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(U){if(U.eslintUsed)return!0;const Q=k(U),$=Q.length>0;let W=null;return U.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(U){const Q=U.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(U)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(U,Q){const $=U.variables,W=U.childScopes;let K,te;if(U.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(V))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"variable")});continue}}!L(V)&&!g(V)&&!b(V)&&Q.push(V)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let V;te.length>0&&(V=te.at(-1)),s.report({node:V?V.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:U,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},A0}var P0,xP;function l6(){if(xP)return P0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return P0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},T0}var D0,SP;function c6(){if(SP)return D0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return D0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const U=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=U.length-1;do Q--,$--;while(T[Q]===U[$]);const W=$+1,K=U.slice(0,W),te=U.slice(W),V=te.find(o),ae=V&&V.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},D0}var I0,EP;function f6(){if(EP)return I0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},I0}var R0,CP;function p6(){return CP||(CP=1,R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),R0}var F0,wP;function h6(){if(wP)return F0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},F0}var _0,kP;function d6(){if(kP)return _0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},_0}var B0,AP;function m6(){if(AP)return B0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return L0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const U=P[0];if(I==="^"&&U.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!U.negate||U.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},N0}var M0,DP;function b6(){if(DP)return M0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return M0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},M0}var $0,IP;function v6(){if(IP)return $0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return $0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},$0}var j0,RP;function x6(){return RP||(RP=1,j0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),j0}var q0,FP;function O6(){if(FP)return q0;FP=1;const c=Zl(),s=Ze(),u=40;return q0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},q0}var Q0,_P;function S6(){if(_P)return Q0;_P=1;const c=Ze();return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},Q0}var U0,BP;function E6(){return BP||(BP=1,U0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),U0}var V0,LP;function C6(){if(LP)return V0;LP=1;const c={enum:["beside","below","any"]};return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},V0}var W0,NP;function w6(){if(NP)return W0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},W0}var G0,MP;function k6(){if(MP)return G0;MP=1;const c=Ze();return G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},G0}var z0,$P;function A6(){return $P||($P=1,z0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+V;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${V}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function U(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":U,"FunctionDeclaration:exit":U,"FunctionExpression:exit":U,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},Z0}var X0,qP;function T6(){if(qP)return X0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return X0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!U||G.required&&U?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(U=>U.range[0]===I.parent.range[0]),G=L[j-1];return U=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(U.replaceText($,",")):W.push(U.insertTextAfter($,",")),W.push(U.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const U=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(U.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(U.loc.start.line>G.loc.end.line||U.type==="Line"||U.type==="Block"){let $=U;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),U=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&U&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},X0}var Y0,QP;function D6(){return QP||(QP=1,Y0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Y0}var H0,UP;function I6(){if(UP)return H0;UP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return H0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},H0}var K0,VP;function R6(){if(VP)return K0;VP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},K0}var J0,WP;function F6(){if(WP)return J0;WP=1;const c=Ze();return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},J0}var ey,GP;function _6(){if(GP)return ey;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),V=j(K,Q);te.verify(D,K,Q,V)}F.prevNode=Q}function U(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:U,"SwitchCase:exit":N}}},ey}var ty,zP;function B6(){if(zP)return ty;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ty={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ty}var ry,ZP;function L6(){if(ZP)return ry;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EU.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const U=L.declarations[0];if(U.init){const Q=U.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(U=>U.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let U=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?U+=Q.id.properties.length:Q.id.type==="ArrayPattern"?U+=Q.id.elements.length:U+=1}),G=G&&T===U}I.forEach(U=>{f.report({node:U,messageId:"useConst",data:U,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ry}var ny,XP;function N6(){if(XP)return ny;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ny={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ny}var sy,YP;function M6(){if(YP)return sy;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return sy={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},sy}var iy,HP;function $6(){if(HP)return iy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return iy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},iy}var ay,KP;function j6(){if(KP)return ay;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return ay={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},ay}var oy,JP;function q6(){if(JP)return oy;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return oy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},oy}var ly,eT;function Q6(){if(eT)return ly;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const U=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),U[1]),L.range[1]];yield T.removeRange(U),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ly={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ly}var uy,tT;function U6(){if(tT)return uy;tT=1;const c=Ze();return uy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},uy}var cy,rT;function V6(){return rT||(rT=1,cy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),cy}var fy,nT;function W6(){if(nT)return fy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ig();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return fy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function U($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:V}of K.iterateGlobalReferences(te))if(b&&F(V)){const ae=V.arguments[0];if(V.arguments.length===2){const z=[],ue=D(V.arguments[1])||"";U(V,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&U(V,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:V,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(V,Q(V,`/${Be}/${pe}`))}}))})}else{const z=[];U(V,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:V,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(V,Q(V,ue))}}))})}}else if(R(V)){let ae=D(V.arguments[0]),z=!1,ue;if(V.arguments[1]&&(ue=D(V.arguments[1])),U(V,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},dy}var my,oT;function X6(){if(oT)return my;oT=1;const c=Pl(),s=Ze(),u=Wh();return my={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},my}var gy,lT;function Y6(){if(lT)return gy;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},gy}var yy,uT;function H6(){if(uT)return yy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return yy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},yy}var by,cT;function K6(){if(cT)return by;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return by={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},by}var vy,fT;function J6(){if(fT)return vy;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return vy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},vy}var xy,pT;function e8(){if(pT)return xy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ig();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return xy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},xy}var Oy,hT;function t8(){return hT||(hT=1,Oy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),Oy}var Sy,dT;function r8(){return dT||(dT=1,Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Sy}var Ey,mT;function n8(){if(mT)return Ey;mT=1;const c=Oo(),s=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,U,Q;L?(G="extraSemi",Q=j.loc,U=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},U=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:U})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),U=j||G;L&&U?g(I,!0):!L&&!U&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Ey}var Cy,gT;function s8(){if(gT)return Cy;gT=1;const c=Ze();return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Cy}var wy,yT;function i8(){if(yT)return wy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},wy}var ky,bT;function a8(){return bT||(bT=1,ky={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),ky}var Ay={exports:{}},vT;function o8(){if(vT)return Ay.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ty}var Dy,ST;function c8(){if(ST)return Dy;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Dy}var Iy,ET;function f8(){if(ET)return Iy;ET=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Iy}var Ry,CT;function p8(){if(CT)return Ry;CT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Ry}var Fy,wT;function h8(){if(wT)return Fy;wT=1;const{isEqToken:c}=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Fy}var _y,kT;function d8(){if(kT)return _y;kT=1;const c=Ze();return _y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},_y}var By,AT;function m8(){if(AT)return By;AT=1;const c=Zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return By={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},By}var Ly,PT;function g8(){if(PT)return Ly;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},Ly}var Ny,TT;function y8(){if(TT)return Ny;TT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ny}var My,DT;function b8(){if(DT)return My;DT=1;const c=Ze();return My={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},My}var $y,IT;function v8(){if(IT)return $y;IT=1;const c=Ze();return $y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},$y}var jy,RT;function x8(){return RT||(RT=1,jy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),jy}var qy,FT;function O8(){return FT||(FT=1,qy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),qy}var Qy,_T;function S8(){if(_T)return Qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return Qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},Qy}var Uy,BT;function E8(){if(BT)return Uy;BT=1;const c=Ze();return Uy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Uy}var Vy,LT;function C8(){return LT||(LT=1,Vy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Gy}var zy,$T;function A8(){return $T||($T=1,zy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),zy}var Zy,jT;function P8(){if(jT)return Zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,U=>U.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Zy}var Xy,qT;function QT(){if(qT)return Xy;qT=1;const{LazyLoadingRuleMap:c}=J$();return Xy=new c(Object.entries({"accessor-pairs":()=>r3(),"array-bracket-newline":()=>n3(),"array-bracket-spacing":()=>s3(),"array-callback-return":()=>i3(),"array-element-newline":()=>a3(),"arrow-body-style":()=>o3(),"arrow-parens":()=>l3(),"arrow-spacing":()=>u3(),"block-scoped-var":()=>c3(),"block-spacing":()=>f3(),"brace-style":()=>p3(),"callback-return":()=>h3(),camelcase:()=>d3(),"capitalized-comments":()=>m3(),"class-methods-use-this":()=>g3(),"comma-dangle":()=>y3(),"comma-spacing":()=>b3(),"comma-style":()=>v3(),complexity:()=>x3(),"computed-property-spacing":()=>O3(),"consistent-return":()=>S3(),"consistent-this":()=>E3(),"constructor-super":()=>C3(),curly:()=>w3(),"default-case":()=>k3(),"default-case-last":()=>A3(),"default-param-last":()=>P3(),"dot-location":()=>T3(),"dot-notation":()=>D3(),"eol-last":()=>I3(),eqeqeq:()=>R3(),"for-direction":()=>F3(),"func-call-spacing":()=>_3(),"func-name-matching":()=>B3(),"func-names":()=>L3(),"func-style":()=>N3(),"function-call-argument-newline":()=>M3(),"function-paren-newline":()=>$3(),"generator-star-spacing":()=>j3(),"getter-return":()=>q3(),"global-require":()=>Q3(),"grouped-accessor-pairs":()=>U3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>W3(),"id-blacklist":()=>G3(),"id-denylist":()=>z3(),"id-length":()=>Z3(),"id-match":()=>X3(),"implicit-arrow-linebreak":()=>Y3(),indent:()=>H3(),"indent-legacy":()=>K3(),"init-declarations":()=>J3(),"jsx-quotes":()=>e5(),"key-spacing":()=>t5(),"keyword-spacing":()=>r5(),"line-comment-position":()=>n5(),"linebreak-style":()=>s5(),"lines-around-comment":()=>i5(),"lines-around-directive":()=>a5(),"lines-between-class-members":()=>o5(),"logical-assignment-operators":()=>l5(),"max-classes-per-file":()=>u5(),"max-depth":()=>c5(),"max-len":()=>f5(),"max-lines":()=>p5(),"max-lines-per-function":()=>h5(),"max-nested-callbacks":()=>d5(),"max-params":()=>m5(),"max-statements":()=>g5(),"max-statements-per-line":()=>y5(),"multiline-comment-style":()=>b5(),"multiline-ternary":()=>v5(),"new-cap":()=>x5(),"new-parens":()=>O5(),"newline-after-var":()=>S5(),"newline-before-return":()=>E5(),"newline-per-chained-call":()=>C5(),"no-alert":()=>w5(),"no-array-constructor":()=>k5(),"no-async-promise-executor":()=>A5(),"no-await-in-loop":()=>P5(),"no-bitwise":()=>T5(),"no-buffer-constructor":()=>D5(),"no-caller":()=>I5(),"no-case-declarations":()=>R5(),"no-catch-shadow":()=>F5(),"no-class-assign":()=>_5(),"no-compare-neg-zero":()=>B5(),"no-cond-assign":()=>L5(),"no-confusing-arrow":()=>N5(),"no-console":()=>M5(),"no-const-assign":()=>$5(),"no-constant-binary-expression":()=>j5(),"no-constant-condition":()=>q5(),"no-constructor-return":()=>Q5(),"no-continue":()=>U5(),"no-control-regex":()=>V5(),"no-debugger":()=>W5(),"no-delete-var":()=>G5(),"no-div-regex":()=>z5(),"no-dupe-args":()=>Z5(),"no-dupe-class-members":()=>X5(),"no-dupe-else-if":()=>Y5(),"no-dupe-keys":()=>H5(),"no-duplicate-case":()=>K5(),"no-duplicate-imports":()=>J5(),"no-else-return":()=>ej(),"no-empty":()=>tj(),"no-empty-character-class":()=>rj(),"no-empty-function":()=>nj(),"no-empty-pattern":()=>sj(),"no-empty-static-block":()=>ij(),"no-eq-null":()=>aj(),"no-eval":()=>oj(),"no-ex-assign":()=>lj(),"no-extend-native":()=>uj(),"no-extra-bind":()=>cj(),"no-extra-boolean-cast":()=>fj(),"no-extra-label":()=>pj(),"no-extra-parens":()=>hj(),"no-extra-semi":()=>dj(),"no-fallthrough":()=>mj(),"no-floating-decimal":()=>gj(),"no-func-assign":()=>yj(),"no-global-assign":()=>bj(),"no-implicit-coercion":()=>vj(),"no-implicit-globals":()=>xj(),"no-implied-eval":()=>Oj(),"no-import-assign":()=>Sj(),"no-inline-comments":()=>Ej(),"no-inner-declarations":()=>Cj(),"no-invalid-regexp":()=>wj(),"no-invalid-this":()=>kj(),"no-irregular-whitespace":()=>Aj(),"no-iterator":()=>Pj(),"no-label-var":()=>Tj(),"no-labels":()=>Dj(),"no-lone-blocks":()=>Ij(),"no-lonely-if":()=>Rj(),"no-loop-func":()=>Fj(),"no-loss-of-precision":()=>_j(),"no-magic-numbers":()=>Bj(),"no-misleading-character-class":()=>Qj(),"no-mixed-operators":()=>Uj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Wj(),"no-multi-assign":()=>Gj(),"no-multi-spaces":()=>zj(),"no-multi-str":()=>Zj(),"no-multiple-empty-lines":()=>Xj(),"no-native-reassign":()=>Yj(),"no-negated-condition":()=>Hj(),"no-negated-in-lhs":()=>Kj(),"no-nested-ternary":()=>Jj(),"no-new":()=>eq(),"no-new-func":()=>tq(),"no-new-native-nonconstructor":()=>rq(),"no-new-object":()=>nq(),"no-new-require":()=>sq(),"no-new-symbol":()=>iq(),"no-new-wrappers":()=>aq(),"no-nonoctal-decimal-escape":()=>oq(),"no-obj-calls":()=>lq(),"no-object-constructor":()=>uq(),"no-octal":()=>cq(),"no-octal-escape":()=>fq(),"no-param-reassign":()=>pq(),"no-path-concat":()=>hq(),"no-plusplus":()=>dq(),"no-process-env":()=>mq(),"no-process-exit":()=>gq(),"no-promise-executor-return":()=>yq(),"no-proto":()=>bq(),"no-prototype-builtins":()=>vq(),"no-redeclare":()=>xq(),"no-regex-spaces":()=>Oq(),"no-restricted-exports":()=>Sq(),"no-restricted-globals":()=>Eq(),"no-restricted-imports":()=>Cq(),"no-restricted-modules":()=>wq(),"no-restricted-properties":()=>kq(),"no-restricted-syntax":()=>Aq(),"no-return-assign":()=>Pq(),"no-return-await":()=>Tq(),"no-script-url":()=>Dq(),"no-self-assign":()=>Iq(),"no-self-compare":()=>Rq(),"no-sequences":()=>Fq(),"no-setter-return":()=>_q(),"no-shadow":()=>Bq(),"no-shadow-restricted-names":()=>Lq(),"no-spaced-func":()=>Nq(),"no-sparse-arrays":()=>Mq(),"no-sync":()=>$q(),"no-tabs":()=>jq(),"no-template-curly-in-string":()=>qq(),"no-ternary":()=>Qq(),"no-this-before-super":()=>Uq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Wq(),"no-undef":()=>Gq(),"no-undef-init":()=>zq(),"no-undefined":()=>Zq(),"no-underscore-dangle":()=>Xq(),"no-unexpected-multiline":()=>Yq(),"no-unmodified-loop-condition":()=>Hq(),"no-unneeded-ternary":()=>Kq(),"no-unreachable":()=>Jq(),"no-unreachable-loop":()=>e6(),"no-unsafe-finally":()=>t6(),"no-unsafe-negation":()=>r6(),"no-unsafe-optional-chaining":()=>n6(),"no-unused-expressions":()=>s6(),"no-unused-labels":()=>i6(),"no-unused-private-class-members":()=>a6(),"no-unused-vars":()=>o6(),"no-use-before-define":()=>l6(),"no-useless-assignment":()=>u6(),"no-useless-backreference":()=>c6(),"no-useless-call":()=>f6(),"no-useless-catch":()=>p6(),"no-useless-computed-key":()=>h6(),"no-useless-concat":()=>d6(),"no-useless-constructor":()=>m6(),"no-useless-escape":()=>g6(),"no-useless-rename":()=>y6(),"no-useless-return":()=>b6(),"no-var":()=>v6(),"no-void":()=>x6(),"no-warning-comments":()=>O6(),"no-whitespace-before-property":()=>S6(),"no-with":()=>E6(),"nonblock-statement-body-position":()=>C6(),"object-curly-newline":()=>w6(),"object-curly-spacing":()=>k6(),"object-property-newline":()=>A6(),"object-shorthand":()=>P6(),"one-var":()=>T6(),"one-var-declaration-per-line":()=>D6(),"operator-assignment":()=>I6(),"operator-linebreak":()=>R6(),"padded-blocks":()=>F6(),"padding-line-between-statements":()=>_6(),"prefer-arrow-callback":()=>B6(),"prefer-const":()=>L6(),"prefer-destructuring":()=>N6(),"prefer-exponentiation-operator":()=>M6(),"prefer-named-capture-group":()=>$6(),"prefer-numeric-literals":()=>j6(),"prefer-object-has-own":()=>q6(),"prefer-object-spread":()=>Q6(),"prefer-promise-reject-errors":()=>U6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>W6(),"prefer-rest-params":()=>G6(),"prefer-spread":()=>z6(),"prefer-template":()=>Z6(),"quote-props":()=>X6(),quotes:()=>Y6(),radix:()=>H6(),"require-atomic-updates":()=>K6(),"require-await":()=>J6(),"require-unicode-regexp":()=>e8(),"require-yield":()=>t8(),"rest-spread-spacing":()=>r8(),semi:()=>n8(),"semi-spacing":()=>s8(),"semi-style":()=>i8(),"sort-imports":()=>a8(),"sort-keys":()=>l8(),"sort-vars":()=>u8(),"space-before-blocks":()=>c8(),"space-before-function-paren":()=>f8(),"space-in-parens":()=>p8(),"space-infix-ops":()=>h8(),"space-unary-ops":()=>d8(),"spaced-comment":()=>m8(),strict:()=>g8(),"switch-colon-spacing":()=>y8(),"symbol-description":()=>b8(),"template-curly-spacing":()=>v8(),"template-tag-spacing":()=>x8(),"unicode-bom":()=>O8(),"use-isnan":()=>S8(),"valid-typeof":()=>E8(),"vars-on-top":()=>C8(),"wrap-iife":()=>w8(),"wrap-regex":()=>k8(),"yield-star-spacing":()=>A8(),yoda:()=>P8()})),Xy}var Yy,UT;function T8(){if(UT)return Yy;UT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,K$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Yy=s,Yy}var Hy,VT;function D8(){if(VT)return Hy;VT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Hy=a,Hy}var Ky,WT;function GT(){if(WT)return Ky;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Ky={startTime:c,endTime:s},Ky}var Jy,zT;function I8(){if(zT)return Jy;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Jy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Jy}var R8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:R8},eb,XT;function YT(){if(XT)return eb;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return eb={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},eb}var tb={},rb={},nb,HT;function F8(){if(HT)return nb;HT=1,nb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return sb}var ib,JT;function B8(){if(JT)return ib;JT=1;var c=F8(),s=_8();ib=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],U;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,V=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}U.push(ue)}}else U=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var U="",Q=!!G.nocase,$=!1,W=[],K=[],te,V=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":U+=d,Q=!0;break;case"?":U+=a,Q=!0;break;default:U+="\\"+te;break}ne.debug("clearStateChar %j %j",te,U),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=U.slice(0,pt.reStart),qt=U.slice(pt.reStart,pt.reEnd-8),Ut=U.slice(pt.reEnd-8,pt.reEnd),tr=U.slice(pt.reEnd);Ut+=tr;var fe=kt.split("(").length-1,Ve=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var U=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=V===te,this.debug("string match",te,V,ne)):(ne=V.match(te),this.debug("pattern match",te,V,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ab}var So={},tD;function N8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=L8(),p=$i(),a=N8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function U(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function V(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,V(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await U(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(rb)),rb}var ob,sD;function iD(){if(sD)return ob;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ob={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ob}var lb,aD;function ub(){if(aD)return lb;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(U){return typeof U=="object"&&U!==null}function p(U){return u(U)&&!Array.isArray(U)}function a(U){return typeof U>"u"}function d(U,Q,$=new Map){let W=$.get(U);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(U,W);const K={...U,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(U,te))continue;const V=U[te],ae=Q[te];p(V)&&p(ae)?K[te]=d(V,ae,$):a(ae)&&(K[te]=V)}return K}function v(U){const Q=Array.isArray(U)?U.slice(0):[U];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(U){for(const Q of Object.keys(U))if(typeof U[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(U,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(U,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(U,Q){if(typeof s.get(Q)>"u")throw new O(U,Q)}function g(U){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(U))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${U}".`)}function f(U){if(!u(U))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(U,Q){const $=Q===void 0?U:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(U){if(!(k.has(U)||typeof U=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(U={},Q={}){return d(U,Q)},validate:"object"},R={merge(U={},Q={}){const $=d(U,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??U[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(U={},Q={}){const $=new Set([...Object.keys(U),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in U&&K in Q&&U[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||U[K]}return W},validate(U){if(U===null||typeof U!="object")throw new TypeError("Expected an object.");if(Array.isArray(U))throw new S(U);for(const Q of Object.keys(U))if(Q!=="__proto__"&&(U[Q]===null||typeof U[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(U){if(typeof U=="string")g(U);else if(U&&typeof U=="object"){if(typeof U.preprocess!="function"||typeof U.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(U={},Q={}){const $={...U,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in U)||!(W in Q))continue;const K=v(U[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(U){f(U);for(const Q of Object.keys(U)){if(Q==="__proto__")continue;const $=U[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(U){return{merge:"replace",validate(){throw new b(U)}}}return lb={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(U=>[U,L(U)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},lb}var cb={},fb,oD;function M8(){if(oD)return fb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return fb={validateLanguageOptions:o},fb}var pb,lD;function uD(){if(lD)return pb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=zl(),p=jc(),a=kl(),{validateLanguageOptions:d}=M8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return pb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},pb}var cD;function $8(){if(cD)return cb;cD=1;const c=QT();return cb.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Pl(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],cb}var hb={},j8="http://json-schema.org/draft-04/schema#",q8="http://json-schema.org/draft-04/schema#",Q8="Core schema meta-schema",U8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",W8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},G8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},z8={id:j8,$schema:q8,description:Q8,definitions:U8,type:V8,properties:W8,dependencies:G8,default:{}},db,fD;function Z8(){if(fD)return db;fD=1;const c=f1(),s=z8;return db=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},db}var pD;function hD(){if(pD)return hb;pD=1;const s=Z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return hb.RuleValidator=o,hb}var mb,dD;function X8(){var x,g;if(dD)return mb;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=ub(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,mb={Config:O},mb}var mD;function Y8(){if(mD)return tb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=ub(),{defaultConfig:p}=$8(),{Config:a}=X8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return tb.FlatConfigArray=O,tb}var gb,gD;function H8(){return gD||(gD=1,gb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),gb}var yb,yD;function bD(){if(yD)return yb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return yb={VFile:u},yb}var bb,vD;function K8(){if(vD)return bb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return bb={ParserService:c},bb}var vb={},xD;function J8(){if(xD)return vb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return vb.FileContext=c,vb}var xb,OD;function e9(){if(OD)return xb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return xb={ProcessorService:u},xb}var Ob,SD;function t9(){var Ue,Sx,Oe,Ex;if(SD)return Ob;SD=1;const c=ao,s=jc(),u=kl(),p=Pl(),a=xL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=tp(),{SourceCode:O}=BE(),x=W$(),{ConfigCommentParser:g}=RE(),f=Z$(),b=H$(),S=T8(),E=gE(),k=D8(),D=I8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=Y8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=ub(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:U,inactiveFlags:Q}=H8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,V=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=K8(),{FileContext:pe}=J8(),{ProcessorService:Be}=e9(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(V.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=V.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,V.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(V.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=V.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Ut(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},V.parseListConfig(V.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ve(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ve(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Ut(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Vt(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Vt(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function hr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ue);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!U.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ue,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ue,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Ut(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},Ob={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},Ob}function r9(){return t9().Linter}var n9=l.Linter=r9();t.Linter=n9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(mH,dc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=vl.define(t);return[r,C_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const yH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class VI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",...Array.isArray(e.class)?e.class:[e.class]]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[OX,gl.of([Fz]),gY(),xX(),pX(xY(new dc.Linter,{languageOptions:{globals:{...dH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),yH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class bH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class vH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(bH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Eu="workshop-data-light@0.4.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Eu+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Eu+e,t(l.current)),l.persist=h=>localStorage.setItem(Eu+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Eu+e),l}class xH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Lo,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??H9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??t4,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const OH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(xH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var pl,na,Ma;class SH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new yU);or(this,"__module",Ds);An(this,pl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=w9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:i4}),zt("span",null,document.title)),zt("a",{innerHTML:r4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(VI,{class:["editor-code",{"is-active":B9(this.state.dataMode)}],ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(VI,{class:["editor-data",{"is-active":this.state.dataMode}],ref:this.ref("data"),content:this.store.data}),zt(vH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Lo,null,zt(Hs,{class:"data-code-toggler",icon:Cu(this.state.dataMode,t=>t?s4:n4),label:Cu(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Lo,null,zt(Lo,{compact:!0},zt(Hs,{icon:Cu(this.state.running,t=>t?e4:J9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames,active:this.state.running})),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30}))),zt(Lo,null,zt(Hs,{icon:K9,title:"Commencer un nouveau programme","event-click":t=>OH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})}),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,pl)),Cr(this,pl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await SU({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}pl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(SH,null)); diff --git a/assets/index-5f56465f.css b/assets/index-5f56465f.css new file mode 100644 index 0000000..b4f416d --- /dev/null +++ b/assets/index-5f56465f.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--body-font-family, inherit);font-size:var(--body-font-size, inherit);font-weight:var(--body-font-weight, inherit);font-style:var(--body-font-style, normal);font-synthesis:var(--body-font-synthesis, none);font-feature-settings:var(--body-font-feature-settings, initial);font-variant:var(--body-font-variant, none);font-kerning:var(--body-font-kerning, auto);line-height:var(--body-line-height, inherit);text-transform:var(--body-text-transform, none);text-underline-offset:var(--body-text-underline-offset, inherit);text-decoration-thickness:var(--body-text-decoration-thickness, from-font);word-spacing:var(--body-word-spacing, normal);letter-spacing:var(--body-letter-spacing, normal);font-variation-settings:var(--body-font-variation-settings, initial);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}a{color:inherit}::selection{color:var(--color-background);background:var(--color-dash)}:root{--gutter: 2rem;--gap: 1rem;--color-text: #222;--color-background: #e0e0e0;--color-dash: #454759;--ui-font-size: 1.4rem;--ui-line-height: 1.2;--ui-color-text: var(--color-background);--ui-color-text-dim: var(--color-text);--ui-color-background: #2d2f3f;--ui-color-background-dim: var(--color-background);--ui-color-accent: #bc93f9;--ui-color-accent-contrast: var(--color-text);--body-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--body-font-size: 1.67rem;--body-line-height: 1.3;--small-font-size: 1.4rem}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes bounce{0%{transform:translateY(-10%) scale(.9,1.1)}20%{transform:translateY(-50%) rotate(60deg)}50%{transform:translateY(-50%) rotate(120deg)}80%{transform:rotate(180deg)}to{transform:scale(1.1,.8) rotate(180deg)}}[class^=ui-modal__content-]{color:var(--color-text)}[class^=ui-toolbar-] hr{border-left-color:var(--color-dash)}.readonly{pointer-events:none}.app{display:grid;grid-template:"header header" "editor scene" "footer footer";grid-template-columns:1fr 20rem;grid-template-rows:var(--ui-height) 1fr var(--ui-height);gap:var(--gap);height:100%;padding:var(--gutter)}@media (min-width: 1280px){.app{grid-template-areas:"header header header" "code data scene" "footer footer footer";grid-template-columns:3fr 2fr 20rem}}.app__header{grid-area:header;width:100%}.app__header,.app__header fieldset{display:flex;align-items:center;gap:var(--ui-gap)}.app__header .app__logo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1.5em;height:1.5em;fill:var(--ui-color-background);animation:rotate 3s infinite linear}.app:not(.is-running) .app__header .app__logo{animation-play-state:paused}.app.has-error .app__header .app__logo{fill:#dd1110;animation:bounce .6s infinite ease;animation-play-state:running}.app__header .app__title{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;flex:1;display:flex;align-items:center;gap:var(--gap);font-size:inherit}.app .editor{grid-area:editor;display:none}.app .editor.is-active{display:flex}@media (min-width: 1280px){.app .editor-code{grid-area:code;display:flex}}@media (min-width: 1280px){.app .editor-data{grid-area:data;display:flex}}@media (min-width: 1280px){.app .data-code-toggler{display:none}}.app .scene{grid-area:scene}.app__footer{grid-area:footer;display:flex;justify-content:space-between}.app__export fieldset{--ui-color-background: var(--color-background);--ui-color-text: var(--color-text);--ui-border: 1px solid var(--color-dash);display:flex;flex-direction:column;gap:var(--ui-gap);min-width:35rem}.app__export fieldset>*{width:100%}.app__export fieldset>*:hover,.app__export fieldset>*:focus{border-color:var(--ui-color-accent)}.app__export fieldset label{color:var(--color-dash)}.app__export input[type=text]{text-align:right}.app__export textarea{padding:var(--ui-padding-container);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--color-text);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius)}.app__export textarea:hover,.app__export textarea:focus{background:var(--ui-color-accent);outline:0}.app__export footer{padding:0;margin-top:var(--gutter)}.app__export footer>*{width:100%;justify-content:center}.editor{display:flex;overflow:hidden}.editor__view{flex:1;overflow:hidden;border-radius:var(--ui-border-radius)}.editor__view .cm-selectionBackground{background:var(--color-dash)!important}.editor__view .cm-activeLine{background-color:inherit}.editor__view .cm-scroller{margin-block:.5em}.editor__view .cm-editor{height:100%;max-height:100%}.editor__view .cm-lint-marker-error{content:url('data:image/svg+xml,%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2212%22%20fill%3D%22%23dd1110%22%20%2F%3E')}.editor__view .cm-lint-marker-warning{content:url('data:image/svg+xml,%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2212%22%20fill%3D%22%23f1fa8c%22%20%2F%3E')}.editor__view .cm-diagnostic{padding:.5em;background:var(--ui-color-background)!important;outline:1px solid var(--color-dash)}.editor__view .cm-gutters{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#2d2f3f;border-right:1px solid var(--color-dash)}.editor__view .cm-lineNumbers .cm-gutterElement{font-family:var(--small-font-family, inherit);font-size:var(--small-font-size, inherit);font-weight:var(--small-font-weight, inherit);font-style:var(--small-font-style, normal);font-synthesis:var(--small-font-synthesis, none);font-feature-settings:var(--small-font-feature-settings, initial);font-variant:var(--small-font-variant, none);font-kerning:var(--small-font-kerning, auto);line-height:var(--small-line-height, inherit);text-transform:var(--small-text-transform, none);text-underline-offset:var(--small-text-underline-offset, inherit);text-decoration-thickness:var(--small-text-decoration-thickness, from-font);word-spacing:var(--small-word-spacing, normal);letter-spacing:var(--small-letter-spacing, normal);font-variation-settings:var(--small-font-variation-settings, initial);display:flex;padding-left:1em;justify-content:flex-end;align-items:center}.editor__view .cm-foldGutter .cm-gutterElement{font-size:smaller;padding-inline:.5em}.editor__view .cm-line{padding-inline:.5em 1em;padding-block:.05em}.scene{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:grid;place-items:center;padding:var(--gutter);cursor:zoom-in;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.scene canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1px;height:auto}.scene.is-zoomed{cursor:zoom-out;background:black}.scene.is-zoomed canvas{position:absolute;inset:var(--gap);width:calc(100% - var(--gap) * 2);height:calc(100% - var(--gap) * 2);border-radius:3px}.canvas{image-rendering:pixelated;-webkit-optimize-contrast:crisp-edges}*{text-decoration-thickness:inherit}.confirm-modal{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;--ui-modal-width: 41rem}.confirm-modal__content:not(:empty){margin-bottom:var(--gutter)}.confirm-modal__toolbar{width:100%}.confirm-modal__toolbar>*{flex:1;justify-content:center} diff --git a/assets/index-651d70c4.css b/assets/index-651d70c4.css new file mode 100644 index 0000000..0ab1590 --- /dev/null +++ b/assets/index-651d70c4.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--body-font-family, inherit);font-size:var(--body-font-size, inherit);font-weight:var(--body-font-weight, inherit);font-style:var(--body-font-style, normal);font-synthesis:var(--body-font-synthesis, none);font-feature-settings:var(--body-font-feature-settings, initial);font-variant:var(--body-font-variant, none);font-kerning:var(--body-font-kerning, auto);line-height:var(--body-line-height, inherit);text-transform:var(--body-text-transform, none);text-underline-offset:var(--body-text-underline-offset, inherit);text-decoration-thickness:var(--body-text-decoration-thickness, from-font);word-spacing:var(--body-word-spacing, normal);letter-spacing:var(--body-letter-spacing, normal);font-variation-settings:var(--body-font-variation-settings, initial);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}a{color:inherit}::selection{color:var(--color-background);background:var(--color-dash)}:root{--gutter: 2rem;--gap: 1rem;--color-text: #222;--color-background: #e0e0e0;--color-dash: #454759;--ui-font-size: 1.4rem;--ui-line-height: 1.2;--ui-color-text: var(--color-background);--ui-color-text-dim: var(--color-text);--ui-color-background: #2d2f3f;--ui-color-background-dim: var(--color-background);--ui-color-accent: #bc93f9;--ui-color-accent-contrast: var(--color-text);--body-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--body-font-size: 1.67rem;--body-line-height: 1.3;--small-font-size: 1.4rem}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes bounce{0%{transform:translateY(-10%) scale(.9,1.1)}20%{transform:translateY(-50%) rotate(60deg)}50%{transform:translateY(-50%) rotate(120deg)}80%{transform:rotate(180deg)}to{transform:scale(1.1,.8) rotate(180deg)}}[class^=ui-modal__content-]{color:var(--color-text)}[class^=ui-toolbar-] hr{border-left-color:var(--color-dash)}.readonly{pointer-events:none}.app{display:grid;grid-template:"header header" "editor scene" "footer footer";grid-template-columns:1fr 20rem;grid-template-rows:var(--ui-height) 1fr var(--ui-height);gap:var(--gap);height:100%;padding:var(--gutter)}@media (min-width: 1280px){.app{grid-template-areas:"header header header" "code data scene" "footer footer footer";grid-template-columns:3fr 2fr 20rem}}.app__header{grid-area:header;width:100%}.app__header,.app__header fieldset{display:flex;align-items:center;gap:var(--ui-gap)}.app__header .app__logo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1.5em;height:1.5em;fill:var(--ui-color-background);animation:rotate 3s infinite linear}.app:not(.is-running) .app__header .app__logo{animation-play-state:paused}.app.has-error .app__header .app__logo{fill:#dd1110;animation:bounce .6s infinite ease;animation-play-state:running}.app__header .app__title{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;flex:1;display:flex;align-items:center;gap:var(--gap);font-size:inherit}.app .editor{grid-area:editor;display:none}.app .editor.is-active{display:flex}@media (min-width: 1280px){.app .editor-code{grid-area:code;display:flex}}@media (min-width: 1280px){.app .editor-data{grid-area:data;display:flex}}@media (min-width: 1280px){.app .data-code-toggler{display:none}}.app .scene{grid-area:scene}.app__footer{grid-area:footer;display:flex;justify-content:space-between}.app__export fieldset{--ui-color-background: var(--color-background);--ui-color-text: var(--color-text);--ui-border: 1px solid var(--color-dash);display:flex;flex-direction:column;gap:var(--ui-gap);min-width:35rem}.app__export fieldset>*{width:100%}.app__export fieldset>*:hover,.app__export fieldset>*:focus{border-color:var(--ui-color-accent)}.app__export fieldset label{color:var(--color-dash)}.app__export input[type=text]{text-align:right}.app__export textarea{padding:var(--ui-padding-container);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--color-text);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius)}.app__export textarea:hover,.app__export textarea:focus{background:var(--ui-color-accent);outline:0}.app__export footer{padding:0;margin-top:var(--gutter)}.app__export footer>*{width:100%;justify-content:center}.editor{display:flex;overflow:hidden}.editor__view{flex:1;overflow:hidden;border-radius:var(--ui-border-radius)}.editor__view .cm-selectionBackground{background:var(--color-dash)!important}.editor__view .cm-activeLine{background-color:inherit}.editor__view .cm-scroller{margin-block:.5em}.editor__view .cm-editor{height:100%;max-height:100%}.editor__view .cm-lint-marker-error{content:url('data:image/svg+xml,%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2212%22%20fill%3D%22%23dd1110%22%20%2F%3E')}.editor__view .cm-diagnostic{padding:.5em;background:var(--ui-color-background)!important;outline:1px solid var(--color-dash)}.editor__view .cm-gutters{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#2d2f3f;border-right:1px solid var(--color-dash)}.editor__view .cm-lineNumbers .cm-gutterElement{font-family:var(--small-font-family, inherit);font-size:var(--small-font-size, inherit);font-weight:var(--small-font-weight, inherit);font-style:var(--small-font-style, normal);font-synthesis:var(--small-font-synthesis, none);font-feature-settings:var(--small-font-feature-settings, initial);font-variant:var(--small-font-variant, none);font-kerning:var(--small-font-kerning, auto);line-height:var(--small-line-height, inherit);text-transform:var(--small-text-transform, none);text-underline-offset:var(--small-text-underline-offset, inherit);text-decoration-thickness:var(--small-text-decoration-thickness, from-font);word-spacing:var(--small-word-spacing, normal);letter-spacing:var(--small-letter-spacing, normal);font-variation-settings:var(--small-font-variation-settings, initial);display:flex;padding-left:1em;justify-content:flex-end;align-items:center}.editor__view .cm-foldGutter .cm-gutterElement{font-size:smaller;padding-inline:.5em}.editor__view .cm-line{padding-inline:.5em 1em;padding-block:.05em}.scene{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:grid;place-items:center;padding:var(--gutter);cursor:zoom-in;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.scene canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1px;height:auto}.scene.is-zoomed{cursor:zoom-out;background:black}.scene.is-zoomed canvas{position:absolute;inset:var(--gap);width:calc(100% - var(--gap) * 2);height:calc(100% - var(--gap) * 2);border-radius:3px}.canvas{image-rendering:pixelated;-webkit-optimize-contrast:crisp-edges}*{text-decoration-thickness:inherit}.confirm-modal{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;--ui-modal-width: 41rem}.confirm-modal__content:not(:empty){margin-bottom:var(--gutter)}.confirm-modal__toolbar{width:100%}.confirm-modal__toolbar>*{flex:1;justify-content:center} diff --git a/assets/index-80c8678e.js b/assets/index-80c8678e.js new file mode 100644 index 0000000..a20c398 --- /dev/null +++ b/assets/index-80c8678e.js @@ -0,0 +1,230 @@ +var n9=Object.defineProperty;var s9=(n,e,t)=>e in n?n9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(s9(n,typeof e!="symbol"?e+"":e,t),t),Cb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Cb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Cb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Cb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function i9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let kb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),Ab=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}kb=t??"",e||(r[n]=kb),(e||a9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,kb)}};function o9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};wb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{Ab(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Ab(e,i)(t,n)}}function l9(n){return Array.isArray(n)?n:[n]}function pl(n,e){if(Array.isArray(n))return u9(n,e);if(n instanceof window.Element)return p9(n);if(n===null||typeof n!="object"||!n.vnode)return c9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return f9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return h9(n,t,e);if(n.isComponent)return AD(n,t,e)}function u9(n,e){n=l9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=O9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":x9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},E9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(E9);function C9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var mc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Qo=!1,wx=!1,kx,fi;function Lu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Qo?null:mc.requestAnimationFrame(Lu),Qo&&(Qo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function w9(n,e){Ax(qa,n,e)&&gc()}function k9(n,e){Ax(ja,n,e)&&gc()}function A9(n,e){Ax(Ki,n,e)&&WI()}function P9(n){Px(qa,n)&&gc()}function T9(n,e){Px(ja,n)&&gc()}function D9(n){Px(Ki,n)&&Tx()}function WI(n){Qo=!1,!xi&&(n=!!n,Ji=null,n?Lu():xi=mc.requestAnimationFrame(Lu))}function I9(){xi||(Qo=!0,Ji=null,xi=mc.requestAnimationFrame(Lu))}function Tx(){xi&&(mc.cancelAnimationFrame(xi),xi=null)}function R9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:A9,addAfter:k9,addBefore:w9,remove:D9,removeAfter:T9,removeBefore:P9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:I9,dispose:R9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Pb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Pb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Pb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Pb(this,e),e=e.next}},F9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends F9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Eu(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},_9=n=>Eu(n,e=>!e),B9="ui-backdrop-1l3kn107",L9={backdrop:B9,"loader-spin":"ui-loader-spin-1l3kn1"};class N9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[L9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const M9="ui-button-1urez107",$9="ui-button__label-1urez161",j9="ui-button__icon-1urez171",Tb={button:M9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:$9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:j9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const q9="ui-input-ada4i107",Q9="ui-input__icon-ada4i150",ko={input:q9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:Q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const V9="ui-modal-1ng3s107",U9="ui-modal__header-1ng3s119",W9="ui-modal__title-1ng3s125",G9="ui-modal__content-1ng3s129",Po={modal:V9,modal__header:U9,modal__title:W9,modal__content:G9,"loader-spin":"ui-loader-spin-1ng3s1"},z9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(N9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:z9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const Z9="ui-toolbar-1r0eh107",X9={toolbar:Z9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Cu extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[X9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const Y9=` + + +`,H9=` + + + +`,K9=` + + + +`,J9=` + + + +`,e4=` + + +`,t4=` + + + + + + +`,FD=` + + + + +`,r4=` + + + + +`,n4=` + + + + +`,_D=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,s4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nd4(m4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},JI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])JI[`[object ${n}]`]=n.toLowerCase();function dr(n){return JI[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:yc,min:eR,max:tR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=yc*2,Db=yc/3,g4=yc/180,y4=180/yc;function rR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const b4="3.1.2",hr=(...n)=>new Ct(...n);hr.version=b4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,x4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,nR=n=>{if(n.match(v4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(x4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Yl}=Math,sR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Yl(e),t=Yl(t),r=Yl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Yl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=sR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return nR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},O4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=O4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Zo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=S4(e,t,r),[C,A,_]=iR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},S4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},iR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=aR(e,t,r),[A,_,B]=E4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function E4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const aR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const C4=(...n)=>new Ct(...n,"lab");Object.assign(hr,{lab:C4,getLabWhitePoint:Zo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:w4}=Math,k4=1e-7,A4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=A4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return P4(...this._rgb.slice(0,3))};const P4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:w4((n+.055)/1.055,2.4)),bn={},Va=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Va(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:T4,cos:D4}=Math,oR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*g4,[e,D4(r)*t,T4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=oR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},I4=(...n)=>{const e=rR(ur(n,"hcl"));return Fx(...e)},{sqrt:R4,atan2:F4,round:_4}=Math,lR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=R4(t*t+r*r);let l=(F4(r,t)*y4+360)%360;return _4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return rR(_x(this._rgb))};const B4=(...n)=>new Ct(...n,"lch"),L4=(...n)=>new Ct(...n,"hcl");Object.assign(hr,{lch:B4,hcl:L4});lr.format.lch=Fx;lr.format.hcl=I4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Va(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Va(this,"black",n,...e)};const N4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=N4;const{sqrt:_b,pow:Oa}=Math,M4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=M4;const $4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=$4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},uR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=uR;bn.hcl=uR;const j4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},q4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return q4(this._rgb)};const Q4=(...n)=>new Ct(...n,"num");Object.assign(hr,{num:Q4});lr.format.num=j4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const V4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=V4;const{floor:U4}=Math,W4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=U4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},G4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=eR(e,t,r),l=tR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return G4(this._rgb)};const z4=(...n)=>new Ct(...n,"hcg");hr.hcg=z4;lr.format.hcg=W4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const Z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=Z4;const{cos:Sa}=Math,X4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Y4,sqrt:H4,acos:K4}=Math,J4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Y4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=H4((e-t)*(e-t)+(e-r)*(t-r)),i=K4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return J4(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsi");hr.hsi=eQ;lr.format.hsi=X4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const tQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=tQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},cR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=eR(e,t,r),l=tR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return cR(this._rgb)};const rQ=(...n)=>new Ct(...n,"hsl");hr.hsl=rQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const nQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=nQ;const{floor:sQ}=Math,iQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=sQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:aQ,max:oQ}=Math,lQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=aQ(e,t,r),l=oQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return lQ(this._rgb)};const uQ=(...n)=>new Ct(...n,"hsv");hr.hsv=uQ;lr.format.hsv=iQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const cQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=cQ;function Nu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=fQ([e,t,r]),[A,_,B]=iR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Nu(t,n);return Nu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=aR(e,t,r);return[...pQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function pQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Nu(e,n);return Nu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const hQ=(...n)=>new Ct(...n,"oklab");Object.assign(hr,{oklab:hQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const dQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=dQ;const mQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=mQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:gQ}=Math,yQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return bQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},bQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:vQ}=Math;function Mu(n){let e="rgb",t=hr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&hr.brewer&&hr.brewer[Ye.toLowerCase()]&&(Ye=hr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=vQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=hr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=hr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=hr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Ur=20;for(;Math.abs(er)>.01&&Ur-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=xQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return hr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=hr(Ye),ot):t},ot}function xQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const OQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=OQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},EQ=n=>{const e=SQ(n);return e.scale=()=>Mu(e),e},{round:fR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(fR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:fR(e):e)};const CQ=(...n)=>new Ct(...n,"rgb");Object.assign(hr,{rgb:CQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=hr(t).rgb(),i=hr(e).rgb();return hr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},wQ=n=>n,kQ=(n,e)=>n*e/255,AQ=(n,e)=>n>e?e:n,PQ=(n,e)=>n>e?n:e,TQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),DQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),IQ=(n,e)=>255*(1-(1-e/255)/(n/255)),RQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(wQ));ms.multiply=Di(Ii(kQ));ms.screen=Di(Ii(TQ));ms.overlay=Di(Ii(DQ));ms.darken=Di(Ii(AQ));ms.lighten=Di(Ii(PQ));ms.dodge=Di(Ii(RQ));ms.burn=Di(Ii(IQ));const{pow:FQ,sin:_Q,cos:BQ}=Math;function LQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=FQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=BQ(_),me=_Q(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return hr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>hr.scale(C),C.hue(t),C}const NQ="0123456789abcdef",{floor:MQ,random:$Q}=Math,jQ=()=>{let n="#";for(let e=0;e<6;e++)n+=NQ.charAt(MQ($Q()*16));return new Ct(n,"hex")},{log:ND,pow:qQ,floor:QQ,abs:VQ}=Math;function pR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>hR(t,r,i),t}function hR(n,e="equal",t=7){dr(n)=="array"&&(n=pR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const UQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,WQ=5e-4,GQ=.1,$D=1.14,Hl=.022,jD=1.414,zQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Va(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Hl?t:t+Math.pow(Hl-t,jD),l=r>=Hl?r:r+Math.pow(Hl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:ZQ,max:XQ,atan2:QD,abs:VD,cos:Kl,sin:UD,exp:YQ,PI:WD}=Math;function HQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=VD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Kl(h(Nt-30))+.24*Kl(h(2*Nt))+.32*Kl(h(3*Nt+6))-.2*Kl(h(4*Nt-63));let Yt=_t-It;Yt=VD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*UD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Ur=1+.045*ot,On=1+.015*ot*At,qr=30*YQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*UD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Ur),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Ur))*(Yt/(i*On)));return XQ(0,ZQ(100,hn))}function KQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const JQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},eV={cool(){return Mu([hr.hsl(180,1,.9),hr.hsl(250,.7,.4)])},hot(){return Mu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},dR=Object.keys(vv),GD=new Map(dR.map(n=>[n.toLowerCase(),n])),tV=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(dR)}}):vv,rV=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,nV=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return nV(this._rgb)};const sV=(...n)=>new Ct(...n,"cmyk");Object.assign(hr,{cmyk:sV});lr.format.cmyk=rV;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const iV=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},aV=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},oV=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},lV=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},mR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},uV=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,cV=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return iV(cR(e),t);if(t.substr(0,3)==="lab"){const r=Zo();Ks("d50");const i=aV(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Zo();Ks("d50");const i=oV(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?lV(Lx(e)):t.substr(0,5)==="oklch"?uV(mR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},gR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=oR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$u=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,bc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,yR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),bR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),vR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),xR=new RegExp("^hsla?\\("+rs+[bc,$u,$u].join(eo)+to+"\\)$"),OR=new RegExp("^hsl?\\("+rs+[bc,$u,$u].join(Nx)+rs+"\\)$"),SR=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ER=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),CR=new RegExp("^lch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),wR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),kR=new RegExp("^oklch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),{round:AR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(AR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(yR))||(e=n.match(bR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(vR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(xR))||(e=n.match(OR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(SR)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=AR(r[i]);return r[3]=+e[4],r}if(e=n.match(ER)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Zo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Zo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(gR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>yR.test(n)||xR.test(n)||ER.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||bR.test(n)||vR.test(n)||OR.test(n)||SR.test(n)||n==="transparent";Ct.prototype.css=function(n){return cV(this._rgb,n)};const fV=(...n)=>new Ct(...n,"css");hr.css=fV;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const pV=(...n)=>new Ct(...n,"gl");hr.gl=pV;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return sR(this._rgb,n)};const hV=(...n)=>new Ct(...n,"hex");hr.hex=hV;lr.format.hex=nR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:Jl}=Math,PR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*Jl(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*Jl(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*Jl(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*Jl(r),i=255),[t,r,i,1]},{round:dV}=Math,mV=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=PR(C);A[2]/A[0]>=r/t?l=C:i=C}return dV(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return mV(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(hr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=PR;Ct.prototype.oklch=function(){return mR(this._rgb)};const gV=(...n)=>new Ct(...n,"oklch");Object.assign(hr,{oklch:gV});lr.format.oklch=gR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(hr,{analyze:pR,average:yQ,bezier:EQ,blend:ms,brewer:tV,Color:Ct,colors:Qa,contrast:UQ,contrastAPCA:zQ,cubehelix:LQ,deltaE:HQ,distance:KQ,input:lr,interpolate:Va,limits:hR,mix:Va,random:jQ,scale:Mu,scales:eV,valid:JQ});class yV{constructor(){or(this,"PROPERTIES",{...h4,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:hr,rgb:(e=0,t=e,r=t=e)=>hr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>hr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{for(let i=Math.round(e);i{this.line(0,this.ledCount,e)},gradient:(e,t,r,i)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))bV(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let r=0;r"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(vV);const xV=xv;var ea={},OV={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ua(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ua(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new TR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new DR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=CV(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new wV(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=wu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Ua(this,e,t);let i=wu(this.text,wu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Ua(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function CV(n){let e=-1;for(let t of n)e+=t.length+1;return e}function wu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class TR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class DR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=TR.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=function(){return this});class wV{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ua(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?IR:AV)(n,e,r)}function IR(n,e,t){if(e==n.length)return e;e&&RR(n.charCodeAt(e))&&FR(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function AV(n,e,t){for(;e>0;){let r=IR(n,e-2,t);if(r=56320&&n<57344}function FR(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!FR(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return RR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Xo(n),C=new Xo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Xo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function BR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new ku([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class ku{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=qu(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new LR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class LR{constructor(e,t){this.inner=e,this.prec=t}}class vc{of(e){return new wv(this,e)}reconfigure(e){return vc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class ju{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of TV(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>PV($e,me,ie))}}let q=_.map(Y=>Y(C));return new ju(e,h,q,C,A,l)}}function TV(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof LR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof ku)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Uo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function qu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const NR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),MR=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),$R=$t.define(),jR=$t.define(),qR=$t.define(),QR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new DV}}class DV{of(e){return new ri(this,e)}}class IV{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new IV(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&BR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function RV(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=UR(e,Ia(l),!1)}return n}function _V(n){let e=n.startState,t=e.facet(qR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const BV=[];function Ia(n){return n==null?BV:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const LV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NV(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||LV.test(t)))return!0}return!1}function MV(n){return e=>{if(!/\S/.test(e))return Br.Space;if(NV(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=ju.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ju.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return BR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(QR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(NR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return MV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=MR;Sr.readOnly=QR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=NR;Sr.changeFilter=$R;Sr.transactionFilter=jR;Sr.transactionExtender=qR;vc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class WR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new WR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new GR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Yo.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yo.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?$V(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function $V(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new GR(h,t,r,l));return i.length==1?i[0]:new Yo(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yo.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){eu(this.active,e),eu(this.activeTo,e),eu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;tu(this.active,t,r),tu(this.activeTo,t,i),tu(this.activeRank,t,l),e&&tu(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&eu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new jV(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class jV{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qV=typeof navigator<"u"&&/Mac/.test(navigator.platform),QV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ho[un]=String.fromCharCode(un);for(var qb in ki)Ho.hasOwnProperty(qb)||(Ho[qb]=ki[qb]);function VV(n){var e=qV&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||QV&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ho:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ko(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Au(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function Jo(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wo(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function xc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function UV(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function zR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function WV(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=UV(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=zR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class zV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function ZR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function HR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!Qu(t))r=oa(t),t=t.parentNode;else return null}}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Vx){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function eF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:Oc,ie_version:rF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:nF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YV=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>YV||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return HV(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(XR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return sF(this,e)}coordsAt(e,t){return aF(this,e,t)}}function HV(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?xc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Vx;function sF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?iF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function aF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function JV(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=oF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new dl(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class hl extends Ht{constructor(e){let{start:t,end:r}=oF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof hl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Vu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}hl.prototype.point=!1;class dl extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof dl&&this.spec.class==e.spec.class&&Vu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}dl.prototype.mapMode=cn.TrackBefore;dl.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&eU(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function oF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function eU(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),tF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Vu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){iF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return sF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(XR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=Jo(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=aF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Go{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ru(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(ru(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(ru(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(ru(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new Go(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function ru(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Ux=Rr.RTL;function lF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function cF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function aU(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Uv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Uv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function fF(n){return[new vi(0,n,0)]}let pF="";function lU(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),pF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),xF=$t.define({combine:n=>n.some(e=>e)}),OF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const nu=sr.define({map:(n,e)=>n.map(e)}),SF=sr.define();function Tn(n,e,t){let r=n.facet(gF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let cU=0;const Lo=$t.define();class Vr{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Vr(cU++,e,r,i,C=>{let A=[Lo.of(C)];return h&&A.push(el.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Vr.define(r=>new e(r),t)}}class Vb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const EF=$t.define(),zx=$t.define(),el=$t.define(),CF=$t.define(),Zx=$t.define(),wF=$t.define();function p2(n,e){let t=n.state.facet(wF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=uU(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const kF=$t.define();function AF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(kF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const No=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Uu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Uu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!yU(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?pU(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=mU(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=Go.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=Go.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=Go.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);eF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(SF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&Au(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&fU(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Wo(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Wo(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&gU(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Ko(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=hU(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?HR:KR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Wo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ko(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?Jo(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=Jo(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new JR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(el).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(CF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=AF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;WV(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function bU(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function xU(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Ub(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=Jo(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Ub(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=vU(e,Qe),ct=xU(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Ub(B,Qe)?B=m2(B,Qe.bottom):q&&Ub(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function TF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&OU(Qe,Je,B)||Qt.chrome&&SU(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function OU(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function SU(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function EU(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=lU(i,l,h,C,t),B=pF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function CU(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function wU(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=TF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(AU(e,r.node,r.offset)?t:0))}}function AU(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class PU{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:IU(e),A=new kU(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=RU(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=TU(n,e,t));return n.state.facet(yF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function TU(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&PF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function DU(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function IU(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function RU(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class FU{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&XU(e.contentDOM.ownerDocument)}handleEvent(e){!qU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_U(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&RF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=IF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BU.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function _U(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const IF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BU="dthko",RF=[16,17,18,20,91,92,224,225],su=6;function iu(n){return Math.max(0,n)*.7+8}function LU(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class NU{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=GV(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&MU(e,t),this.dragging=jU(e,t)&&BF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LU(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=AF(this.view);e.clientX-A.left<=i+su?t=-iu(i-e.clientX):e.clientX+A.right>=h-su&&(t=iu(e.clientX-h)),e.clientY-A.top<=l+su?r=-iu(l-e.clientY):e.clientY+A.bottom>=C-su&&(r=iu(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MU(n,e){let t=n.state.facet(hF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function $U(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function jU(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Ko(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function qU(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),FF=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function QU(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),_F(n,t.value)},50)}function Sc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function _F(n,e){e=Sc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(mF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=WU(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new NU(n,e,t,r)),r&&n.observer.ignore(()=>{ZR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return bU(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function VU(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:VU(n,t,e.clientX,e.clientY)}}const UU=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function BF(n){if(!UU)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function WU(n,e){let t=E2(n,e),r=BF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=GU(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function GU(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Sc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Sc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&$U(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=FF?null:e.clipboardData;return t?(_F(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(QU(n),!1)};function zU(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function ZU(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Sc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=ZU(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=FF?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(zU(n,t),!1)};const LF=ri.define();function NF(n,e){let t=[];for(let r of n.facet(bF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:LF.of(!0)}):null}function MF(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=NF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),MF(n)};ns.blur=n=>{n.observer.clearSelectionRange(),MF(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=IF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function XU(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class YU{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Tu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends $F{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Un||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Un(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Tu&&(A=-2);let Y=new Un(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Tu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Tu)&&(za=!0),Wu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class KU extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Wu(this.left,e),this.right=Wu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const JU=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Un?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Un(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=JU)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let t=new Un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function n7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new YU(t),this.stateDeco=e.facet(el).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new au(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push($o(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(el).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,e7(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=zR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=YR(e.scrollDOM);let me=(this.printing?n7:r7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new HU(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new au(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||$o(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||$o(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return $o(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class au{constructor(e,t){this.from=e,this.to=t}}function i7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function lu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function a7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function $o(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>$o(i,e)):n._content)}const uu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),jF=wi.newName(),qF=wi.newName(),QF={"&light":"."+jF,"&dark":"."+qF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const o7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},QF),l7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class u7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new f7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!Au(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Wo(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ko(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&c7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Au(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Au(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new PU(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=DF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Wo(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function c7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class f7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:SF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ko(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZV(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(nu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Lo).map(i=>new Vb(i));for(let i of this.plugins)i.update(this);this.observer=new u7(this),this.inputState=new FU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(LF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=NF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Uu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(nu)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Gu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(No)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(uu)!=i.state.facet(uu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!DF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(Lo).map(r=>new Vb(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Lo),r=e.state.facet(Lo);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Vb(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(YR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Uu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?qF:jF)+" "+this.state.facet(uu)}updateAttrs(){let e=N2(this,EF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(No);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(o7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>CU(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return EU(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,wU(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),TF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return xc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(vF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p7)return fF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||cF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=oU(e.text,t,r);return this.bidiCache.push(new Gu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ZR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return nu.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return nu.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Vr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[uu.of(r),No.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(No.of(Kv("."+Hv,e,QF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=No;Mt.inputHandler=yF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=OF;Mt.focusChangeEffect=bF;Mt.perLineTextDirection=vF;Mt.exceptionSink=gF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=mF;Mt.dragMovesSelection=dF;Mt.clickAddsSelectionRange=hF;Mt.decorations=el;Mt.outerDecorations=CF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=wF;Mt.scrollMargins=kF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=EF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const p7=4096,L2={};class Gu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const h7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function d7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function g7(n,e,t){return UF(VF(n.state),e,n,t)}let gi=null;const y7=4e3;function b7(n,e=h7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>d7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},y7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function UF(n,e,t,r){Jv=e;let i=VV(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",RF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+cu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+cu(me,e,!0)])||e.shiftKey&&(_e=Ho[e.keyCode])!=i&&_e!=me&&Y(ie[C+cu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+cu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class gl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=WF(e);return[new gl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return v7(e,t,r)}}function WF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function v7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=WF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Ur.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function x7(n,e){return n.constructor==e.constructor&&n.eq(e)}class O7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t!x7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=$t.define();function GF(n){return[Vr.define(e=>new O7(e,n)),Du.of(n)]}const zF=!Qt.ios,tl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function S7(n={}){return[tl.of(n),E7,C7,w7,xF.of(!0)]}function ZF(n){return n.startState.facet(tl)!=n.state.facet(tl)}const E7=GF({above:!0,markers(n){let{state:e}=n,t=e.facet(tl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||zF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of gl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ZF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(tl).cursorBlinkRate+"ms"}const C7=GF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:gl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ZF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const w7=Ri.highest(Mt.theme(ex)),XF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),jo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(XF)?r.value:t,n)}}),k7=Vr.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(jo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(jo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(jo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(jo)!=n&&this.view.dispatch({effects:XF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function A7(){return[jo,k7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function P7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class T7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of P7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",D7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),I7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function R7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Iu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:D7,addSpecialChars:null});return(e.replaceTabs=!R7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function F7(n={}){return[Iu.of(n),_7()]}let Q2=null;function _7(){return Q2||(Q2=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Iu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new T7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new M7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new N7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Iu);n.startState.facet(Iu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const B7="•";function L7(n){return n>=32?B7:n==10?"␤":String.fromCharCode(9216+n)}class N7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=L7(this.code),r=e.state.phrase("Control character")+" "+(I7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class M7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $7(){return q7}const j7=Ht.line({class:"cm-activeLine"}),q7=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(j7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function Q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function V7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function V2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?V7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function U7(n,e){let t=V2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=V2(n,i);if(!C)return r;let A=Q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function W7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?U7(t,r):null)}const G7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},z7={style:"cursor: crosshair"};function Z7(n={}){let[e,t]=G7[n.key||"Alt"],r=Vr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?z7:null})]}const Io="-10000px";class YF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function X7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||X7}}}),U2=new WeakMap,Kx=Vr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new YF(n,Ec,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=U2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||H7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Y7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),H7={x:0,y:0},Ec=$t.define({enables:[Kx,Y7]}),zu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Cc{static create(e){return new Cc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new YF(e,zu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K7=Ec.compute([zu],n=>{let e=n.facet(zu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Cc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class J7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Cc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!eW(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!tW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const fu=4;function eW(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-fu&&e.clientX<=r+fu&&e.clientY>=i-fu&&e.clientY<=l+fu}function tW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function rW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(nW)&&(i=[]);return i},provide:i=>zu.from(i)});return{active:r,extension:[r,Vr.define(i=>new J7(i,n,r,t,e.hoverTime||300)),K7]}}function HF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const nW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function rl(n,e){let t=n.plugin(KF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const KF=Vr.fromClass(class{constructor(n){this.input=n.state.facet(nl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new pu(n,!0,e.topContainer),this.bottom=new pu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new pu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new pu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(nl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class pu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const nl=$t.define({enables:KF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Ru=$t.define(),sW=$t.define(),iW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},zo=$t.define();function JF(n){return[e_(),zo.of(Object.assign(Object.assign({},iW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function e_(n){let e=[aW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const aW=Vr.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Ru),this.view.viewport.from),r=[],i=this.gutters.map(l=>new oW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(zo),t=n.state.facet(zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Ru),n.state.facet(Ru),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new t_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(sW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new t_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class t_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const fW=zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(uW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function pW(n={}){return[Aa.of(n),e_(),fW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hW.range(i)))}return gr.of(e)});function mW(){return dW}const r_=1024;let gW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=gW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const yW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):yW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return OW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function sl(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(n_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new bW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class bW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends s_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function i_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(sl(C,e,t,!1))}}return i?i_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function OW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=r_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Ur=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Vs=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Vs>=0&&C.id==Vs&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Vs,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Vs,_t+1);if(Vs>=0&&si>0&&si-1&&si>0){let El=ie(Ur,$r);On=rO(Ur,hn,dn,0,hn.length,0,Yt-At,El,El)}else On=_e(Ur,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Ur=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Ur,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Fu(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Fu(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class SW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class EW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let CW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=CW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Xu(e);return r=>r.modified.indexOf(t)>-1?r:Xu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let wW=0;class Xu{constructor(e){this.name=e,this.instances=[],this.id=wW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&kW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=AW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Xu.get(C,A));return l}}function kW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function AW(n){let e=[[]];for(let t=0;tr.length-t.length)}function o_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Yu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return l_.add(e)}const l_=new mr;class Yu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function PW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function TW(n,e,t,r=0,i=n.length){let l=new DW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class DW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=IW(e)||Yu.empty,q=PW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function IW(n){let e=n.type.prop(l_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,du=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),mu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),gu=Ft(),re={comment:du,lineComment:Ft(du),blockComment:Ft(du),docComment:Ft(du),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:mu,docString:Ft(mu),character:Ft(mu),attributeValue:Ft(mu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:gu,documentMeta:Ft(gu),annotation:Ft(gu),processingInstruction:Ft(gu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}u_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function c_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class RW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Ku{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Ku(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends a_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Ku.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let f_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(f_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,FW=Vr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=f_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,FW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class _W{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const BW=$t.define(),wc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ju(n){let e=n.facet(wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function il(n,e){let t="",r=n.tabSize,i=n.facet(wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?LW(n,t,e):null}class kc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ju(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const p_=new mr;function LW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return h_(r,n,t)}function h_(n,e,t){for(let r=n;r;r=r.next){let i=MW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function NW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function MW(n){let e=n.type.prop(p_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>d_(h,!0,1,void 0,l&&!NW(h)?i.from:void 0)}return n.parent==null?$W:null}function $W(){return 0}class iO extends kc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return h_(this.context.next,this.base,this.pos)}}function jW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function qW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function QW({closing:n,align:e=!0,units:t=1}){return r=>d_(r,e,t,n)}function d_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?qW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const VW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const UW=200;function WW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+UW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=il(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const GW=$t.define(),m_=new mr;function zW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function XW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function ec(n,e,t){for(let r of n.facet(GW)){let i=r(n,e,t);if(i)return i}return ZW(n,e,t)}function g_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ac=sr.define({map:g_}),yl=sr.define({map:g_});function y_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Ac)&&!YW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new nG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(yl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function YW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function b_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(x_()))}const HW=n=>{for(let e of y_(n)){let t=ec(n.state,e.from,e.to);if(t)return n.dispatch({effects:b_(n.state,[Ac.of(t),v_(n,t)])}),!0}return!1},KW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of y_(n)){let r=tc(n.state,t.from,t.to);r&&e.push(yl.of(r),v_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function v_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(yl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:HW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KW},{key:"Ctrl-Alt-[",run:JW},{key:"Ctrl-Alt-]",run:eG}],rG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,rG)}});function x_(n){let e=[ca,aG];return n&&e.push(aO.of(n)),e}function O_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=tc(n.state,C.from,C.to);A&&n.dispatch({effects:yl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return O_(n,null)}}});class nG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return O_(e,this.value)}}const sG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iG(n={}){let e=Object.assign(Object.assign({},sG),n),t=new nv(e,!0),r=new nv(e,!1),i=Vr.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=tc(h.state,A.from,A.to)?r:ec(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,JF({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=tc(h.state,C.from,C.to);if(_)return h.dispatch({effects:yl.of(_)}),!0;let B=ec(h.state,C.from,C.to);return B?(h.dispatch({effects:Ac.of(B)}),!0):!1}})}),x_()]}const aG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=u_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new bl(e,t||{})}}const lx=$t.define(),S_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(S_)}function E_(n,e){let t=[lG],r;return n instanceof bl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(S_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class oG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)TW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const lG=Ri.high(Vr.fromClass(oG,{decorations:n=>n.decorations})),uG=bl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),cG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),C_=1e4,w_="()[]{}",k_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:w_,maxScanDistance:C_,renderMatch:hG})}}),fG=Ht.mark({class:"cm-matchingBracket"}),pG=Ht.mark({class:"cm-nonmatchingBracket"});function hG(n){let e=[],t=n.matched?fG:pG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const dG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(k_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),mG=[dG,cG];function gG(n={}){return[k_.of(n),mG]}const yG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(yG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||C_,l=r.brackets||w_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return bG(n,e,t,A,B,_,l)}}return vG(n,e,t,h,C.type,i,l)}function bG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const xG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),OG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OG[n]=SG(xG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function SG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[o_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const EG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?CG(n):r.block?kG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const CG=oO(TG,0),wG=oO(A_,0),kG=oO((n,e)=>A_(n,e,PG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function AG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function PG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function A_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>AG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),DG=ri.define(),IG=$t.define(),P_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),T_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(P_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=rc(B,B.length,t.minDepth,A):B=R_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(DG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function RG(n={}){return[T_,P_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?D_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Pc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(T_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const D_=Pc(0,!1),px=Pc(1,!1),FG=Pc(0,!0),_G=Pc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(IG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function rc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function BG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function LG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function I_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],NG=200;function R_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-NG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),rc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function MG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=$G(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function $G(n,e,t){let r=I_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const jG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||jG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const __=n=>F_(n,!vn(n)),B_=n=>F_(n,vn(n));function L_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Tc(t,e))}const QG=n=>L_(n,!vn(n)),VG=n=>L_(n,vn(n));function UG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;UG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const WG=n=>vs(n,e=>Dc(n.state,e,!vn(n))),GG=n=>vs(n,e=>Dc(n.state,e,vn(n)));function N_(n,e){return vs(n,t=>{if(!t.empty)return Tc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const M_=n=>N_(n,!1),$_=n=>N_(n,!0);function j_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Tc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>q_(n,!1),hx=n=>q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const zG=n=>vs(n,e=>Fi(n,e,!0)),ZG=n=>vs(n,e=>Fi(n,e,!1)),XG=n=>vs(n,e=>Fi(n,e,!vn(n))),YG=n=>vs(n,e=>Fi(n,e,vn(n))),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),KG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function JG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headJG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function Q_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>Q_(n,!vn(n)),U_=n=>Q_(n,vn(n));function W_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const tz=n=>W_(n,!vn(n)),rz=n=>W_(n,vn(n)),nz=n=>ss(n,e=>Dc(n.state,e,!vn(n))),sz=n=>ss(n,e=>Dc(n.state,e,vn(n)));function G_(n,e){return ss(n,t=>n.moveVertically(t,e))}const z_=n=>G_(n,!1),Z_=n=>G_(n,!0);function X_(n,e){return ss(n,t=>n.moveVertically(t,e,j_(n).height))}const lI=n=>X_(n,!1),uI=n=>X_(n,!0),iz=n=>ss(n,e=>Fi(n,e,!0)),az=n=>ss(n,e=>Fi(n,e,!1)),oz=n=>ss(n,e=>Fi(n,e,!vn(n))),lz=n=>ss(n,e=>Fi(n,e,vn(n))),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),cz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),pz=({state:n,dispatch:e})=>{let t=Ic(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},hz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},dz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function vl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=yu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=yu(n,h,!1),C=yu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const Y_=(n,e,t)=>vl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iY_(n,!1,!0),H_=n=>Y_(n,!0,!1),K_=(n,e)=>vl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),J_=n=>K_(n,!1),mz=n=>K_(n,!0),gz=n=>vl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headvl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bz=n=>vl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},xz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ic(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function eB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Ic(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Oz=({state:n,dispatch:e})=>eB(n,e,!1),Sz=({state:n,dispatch:e})=>eB(n,e,!0);function tB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Ic(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ez=({state:n,dispatch:e})=>tB(n,e,!1),Cz=({state:n,dispatch:e})=>tB(n,e,!0),wz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ic(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function kz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=rB(!1),Az=rB(!0);function rB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&kz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new kc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Pz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new kc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=il(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(wc)})}),{userEvent:"input.indent"})),!0),sB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=il(n,Math.max(0,l-Ju(n)));for(;h(n.setTabFocusMode(),!0),Dz=[{key:"Ctrl-b",run:__,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:B_,shift:U_},{key:"Ctrl-p",run:M_,shift:z_},{key:"Ctrl-n",run:$_,shift:Z_},{key:"Ctrl-a",run:HG,shift:uz},{key:"Ctrl-e",run:KG,shift:cz},{key:"Ctrl-d",run:H_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:gz},{key:"Ctrl-Alt-h",run:J_},{key:"Ctrl-o",run:vz},{key:"Ctrl-t",run:xz},{key:"Ctrl-v",run:hx}],Iz=[{key:"ArrowLeft",run:__,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:XG,shift:oz,preventDefault:!0},{key:"ArrowRight",run:B_,shift:U_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:VG,shift:rz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:YG,shift:lz,preventDefault:!0},{key:"ArrowUp",run:M_,shift:z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:ZG,shift:az,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:zG,shift:iz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:fz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:H_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:J_},{key:"Mod-Delete",mac:"Alt-Delete",run:mz},{mac:"Mod-Backspace",run:yz},{mac:"Mod-Delete",run:bz}].concat(Dz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:WG,shift:nz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GG,shift:sz},{key:"Alt-ArrowUp",run:Oz},{key:"Shift-Alt-ArrowUp",run:Ez},{key:"Alt-ArrowDown",run:Sz},{key:"Shift-Alt-ArrowDown",run:Cz},{key:"Escape",run:dz},{key:"Mod-Enter",run:Az},{key:"Alt-l",mac:"Ctrl-l",run:pz},{key:"Mod-i",run:hz,preventDefault:!0},{key:"Mod-[",run:sB},{key:"Mod-]",run:nB},{key:"Mod-Alt-\\",run:Pz},{key:"Shift-Mod-k",run:wz},{key:"Shift-Mod-\\",run:ez},{key:"Mod-/",run:EG},{key:"Alt-A",run:wG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Tz}].concat(Iz),Fz={key:"Tab",run:nB,shift:sB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=nc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=nc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(oB.prototype[Symbol.iterator]=lB.prototype[Symbol.iterator]=function(){return this});function _z(n){try{return new RegExp(n,cO),!0}catch{return!1}}function nc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:sc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[sc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const sc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sc)&&(n=t.value);return n},provide:n=>nl.from(n,e=>e?mx:null)}),Bz=n=>{let e=rl(n,mx);if(!e){let t=[sc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Lz])),n.dispatch({effects:t}),e=rl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Lz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Nz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uB=$t.define({combine(n){return bs(n,Nz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mz(n){let e=[Vz,Qz];return n&&e.push(uB.of(n)),e}const $z=Ht.mark({class:"cm-selectionMatch"}),jz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function qz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const Qz=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(uB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&qz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(jz.range(B,q)):(B>=i.to||q<=i.from)&&C.push($z.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Vz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Uz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Wz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Gz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Uz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Wz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class cB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||_z(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Yz(this):new Zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class fB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?zz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function zz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new oB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Xz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function ic(n,e){return n.slice(pn(n,e,!1),e)}function ac(n,e){return n.slice(e,pn(n,e))}function Xz(n){return(e,t,r)=>!r[0].length||(n(ic(r.input,r.index))!=Br.Word||n(ac(r.input,r.index))!=Br.Word)&&(n(ac(r.input,r.index+r[0].length))!=Br.Word||n(ic(r.input,r.index+r[0].length))!=Br.Word)}class Yz extends fB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const al=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(al)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>nl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Hz=Ht.mark({class:"cm-searchMatch"}),Kz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jz=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Kz:Hz)})}return r.finish()}},{decorations:n=>n.decorations});function xl(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):dB(e)}}const oc=xl((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),hB(n),!0}),lc=xl((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),hB(n),!0}),eZ=xl((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),tZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=xl((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),rZ=xl((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new cB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function pB(n){let e=rl(n,pO);return e&&e.dom.querySelector("[main-field]")}function hB(n){let e=pB(n);e&&e==n.root.activeElement&&e.select()}const dB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=pB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:al.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?al.of(gx(n.state,e.query.spec)):sr.appendConfig.of(aZ)]});return!0},mB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=rl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},nZ=[{key:"Mod-f",run:dB,scope:"editor search-panel"},{key:"F3",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:mB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tZ},{key:"Mod-Alt-g",run:Bz},{key:"Mod-d",run:Gz,preventDefault:!0}];class sZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>oc(e),[Qn(e,"next")]),r("prev",()=>lc(e),[Qn(e,"previous")]),r("select",()=>eZ(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>rZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>mB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new cB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:al.of(e)}))}keydown(e){g7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?lc:oc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(al)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const bu=30,vu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-bu),h=Math.min(i,t+bu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-bu;A--)if(!vu.test(C[A-1])&&vu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const iZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aZ=[Oi,Ri.low(Jz),iZ];class gB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(bB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function oZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:oZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function lZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function bB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function uZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function cZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=yB(n)),e}const uc=sr.define(),ol=sr.define();class fZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class pZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function hZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function dZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class mZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=dZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ol.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&yZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew mZ(t,n,e)}function yZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new pZ(q):new fZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=bZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:CZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new cc(SZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(cZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!vZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(OB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new cc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xZ:OZ}}function vZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SZ=[];function vB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=vB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(uc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ol))i=new Wn(i.source,0);else if(l.is(xB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new gB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function EZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):bB(n,!0).test(i)}const xB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),OB=sr.define(),Bn=Hr.define({create(){return cc.start()},update(n,e){return n.update(e)},provide:n=>[Ec.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},uZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const CZ=gZ(Bn,mO);function xu(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:OB.of(C)}),!0}}const wZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:uc.of(!0)}),!0):!1,kZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ol.of(null)}),!0)};class AZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const PZ=50,TZ=1e3,DZ=Vr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=vB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lPZ&&Date.now()-h.time>TZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(uc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new gB(e,t,n.explicitPos==t,this.view),i=new AZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ol.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:xB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&HF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ol.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uc.of(!1)}),20),this.composing=0}}}),IZ=typeof navigator=="object"&&/Win/.test(navigator.platform),RZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(IZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),SB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new FZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let _Z=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),BZ=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?_Z:BZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Ol=sr.define({map(n,e){return n&&n.map(e)}}),LZ=sr.define(),ll=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ol))return t.value;if(t.is(LZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function NZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Ol.of(_)];t.state.field(ll,!1)===void 0&&B.push(sr.appendConfig.of([ll,QZ,VZ,SB]))}t.dispatch(t.state.update(A))}}function EB(n){return({state:e,dispatch:t})=>{let r=e.field(ll,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Ol.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const MZ=({state:n,dispatch:e})=>n.field(ll,!1)?(e(n.update({effects:Ol.of(null)})),!0):!1,$Z=EB(1),jZ=EB(-1),qZ=[{key:"Tab",run:$Z,shift:jZ},{key:"Escape",run:MZ}],kI=$t.define({combine(n){return n.length?n[0]:qZ}}),QZ=Ri.highest(ml.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:NZ(n)})}const VZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ll,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Ol.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ul={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const CB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function UZ(){return[GZ,CB]}const cv="()[]{}<>";function wB(n){for(let e=0;e{if((WZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=XZ(n.state,r);return l?(n.dispatch(l),!0):!1}),zZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=kB(n,n.selection.main.head).brackets||ul.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=YZ(n.doc,h.head);for(let A of r)if(A==C&&Rc(n.doc,h.head)==wB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},ZZ=[{key:"Backspace",run:zZ}];function XZ(n,e){let t=kB(n,n.selection.main.head),r=t.brackets||ul.brackets;for(let i of r){let l=wB(ln(i,0));if(e==i)return l==i?JZ(n,i,r.indexOf(i+i+i)>-1,t):HZ(n,i,l,t.before||ul.before);if(e==l&&AB(n,n.selection.main.from))return KZ(n,i,l)}return null}function AB(n,e){let t=!1;return n.field(CB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Rc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function YZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function HZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Rc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Rc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function JZ(n,e,t,r){let i=r.stringPrefixes||ul.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Rc(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(AB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!eX(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function eX(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function tX(n={}){return[RZ,Bn,fn.of(n),DZ,rX,SB]}const PB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:kZ},{key:"ArrowDown",run:xu(!0)},{key:"ArrowUp",run:xu(!1)},{key:"PageDown",run:xu(!0,"page")},{key:"PageUp",run:xu(!1,"page")},{key:"Enter",run:wZ}],rX=Ri.highest(ml.computeN([fn],n=>n.facet(fn).defaultKeymap?[PB]:[]));class nX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new hX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new nX(i,l,h.diagnostic),!1}),r}function TB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Fc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function DB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(NB))}function sX(n,e){return{effects:DB(n,[Fc.of(e)])}}const Fc=sr.define(),xO=sr.define(),IB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Fc)){let r=e.state.facet(Ls).autoPanel?t.value.length?cl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?cl.open:null,n.selected):t.is(IB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[nl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),iX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function aX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).to_B(n,t,!1)))}const oX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:DB(n.state,[xO.of(!0)])});let t=rl(n,cl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},lX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uX=[{key:"Mod-Shift-m",run:oX,preventDefault:!0},{key:"F8",run:lX}],cX=Vr.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(sX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function fX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function pX(n,e={}){return[Ls.of({source:n,config:e}),cX,NB]}function FB(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function _B(n,e,t){var r;let i=t?FB(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class hX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=_B(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class cl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=FB(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:IB.of(r)})}static open(e){return new cl(e)}}function _u(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Ou(n){return _u(``,'width="6" height="3"')}const dX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ou("#d11")},".cm-lintRange-warning":{backgroundImage:Ou("orange")},".cm-lintRange-info":{backgroundImage:Ou("#999")},".cm-lintRange-hint":{backgroundImage:Ou("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class BB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)gX(e,t,r)),t}}function mX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mX(n,e)}let{hoverTime:i}=n.state.facet(_c),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function yX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new BB(t[i]).range(+i));return gr.of(r,!0)}const bX=JF({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new BB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(_c).markerFilter;for(let r of e.effects)if(r.is(Fc)){let i=r.value;t&&(i=t(i||[],e.state)),n=yX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),LB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=TB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Ec.from(n)}),vX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:_u('')},".cm-lint-marker-warning":{content:_u('')},".cm-lint-marker-error":{content:_u('')}}),NB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([iX.range(e.from,e.to)])}),rW(aX,{hideOn:TB}),dX],_c=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function xX(n={}){return[_c.of(n),yx,bX,vX,LB]}const OX=(()=>[pW(),mW(),F7(),RG(),iG(),S7(),A7(),Sr.allowMultipleSelections.of(!0),WW(),E_(uG,{fallback:!0}),gG(),UZ(),tX(),W7(),Z7(),$7(),Mz(),ml.of([...ZZ,...Rz,...nZ,...qG,...tG,...PB,...uX])])();class fc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new fc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new fc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class SX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class pc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pc(this.stack,this.pos,this.index)}}function qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new Bu;class EX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;MB(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if(MB(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class Sl{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function MB(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||CX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function CX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class wX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class kX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Bu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Bu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Bu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new wX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&DX(i);if(h)return Vn&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Vn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Vn&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Vn&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Vn&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Vn&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Vn&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Vn&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Vn&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Vn&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class TX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class hc extends a_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r_;let h=qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new AX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(hc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const IX=312,RX=313,MI=1,FX=2,_X=3,BX=4,LX=314,NX=316,MX=317,$X=5,jX=6,qX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$B=125,QX=59,xx=47,VX=42,UX=43,WX=45,GX=60,zX=44,ZX=63,XX=46,YX=91,HX=new TX({start:!1,shift(n,e){return e==$X||e==jX||e==NX?n:e==MX},strict:!1}),KX=new Sl((n,e)=>{let{next:t}=n;(t==$B||t==-1||e.context)&&n.acceptToken(LX)},{contextual:!0,fallback:!0}),JX=new Sl((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==VX)||t!=$B&&t!=QX&&t!=-1&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new Sl((n,e)=>{n.next==YX&&!e.context&&n.acceptToken(RX)},{contextual:!0}),tY=new Sl((n,e)=>{let{next:t}=n;if(t==UX||t==WX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:FX)}}else t==ZX&&n.peek(1)==XX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(_X))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const rY=new Sl((n,e)=>{if(n.next!=GX||!e.dialectEnabled(qX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(BX,-t)}),nY=o_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),sY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},iY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aY={__proto__:null,"<":187},oY=hc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:HX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[nY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[JX,eY,tY,rY,2,3,4,5,6,7,8,9,10,11,12,13,14,KX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>sY[n]||-1},{term:339,get:n=>iY[n]||-1},{term:92,get:n=>aY[n]||-1}],tokenPrec:15004}),jB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lY=jB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new SW,qB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const uY=["FunctionDeclaration"],cY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(uY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function QB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=cY[h.name];if(C&&C(h,l)||qB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of QB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function fY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)qB.has(i.name)&&(r=r.concat(QB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Hu.define({name:"javascript",parser:oY.configure({props:[p_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:VW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:QW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),m_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),UB={test:n=>/^JSX/.test(n.name),facet:c_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pY=Ei.configure({dialect:"ts"},"typescript"),hY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[UB]:void 0)]}),dY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[UB]:void 0)]},"typescript");let WB=n=>({label:n,type:"keyword"});const GB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(WB),mY=GB.concat(["declare","implements","private","protected","public"].map(WB));function gY(n={}){let e=n.jsx?n.typescript?dY:hY:n.typescript?pY:Ei,t=n.typescript?lY.concat(mY):jB.concat(GB);return new _W(e,[Ei.data.of({autocomplete:lZ(VB,yB(t))}),Ei.data.of({autocomplete:fY}),n.jsx?vY:[]])}function yY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vY=Mt.inputHandler.of((n,e,t,r,i)=>{if((bY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=yY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function xY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(OY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function OY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},SY={get exports(){return Ox},set exports(n){Ox=n}};const EY={define:!1,require:!1},CY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},wY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},kY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},AY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},PY={assert:!0,expect:!0,should:!0},TY={exports:!0,global:!1,module:!1,require:!1},DY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},IY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},RY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},UY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},GY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},ZY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},XY={$:!1,jQuery:!1},YY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},HY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},KY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},JY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},eH={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},rH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},nH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},sH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},iH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},aH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},oH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},lH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},uH={browser:!1,chrome:!1,opr:!1},cH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},fH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},pH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},hH={amd:EY,applescript:CY,atomtest:wY,browser:kY,builtin:AY,chai:PY,commonjs:TY,couch:DY,devtools:IY,embertest:RY,es2015:FY,es2016:_Y,es2017:BY,es2018:LY,es2019:NY,es2020:MY,es2021:$Y,es2022:jY,es2023:qY,es2024:QY,es2025:VY,es3:UY,es5:WY,greasemonkey:GY,jasmine:zY,jest:ZY,jquery:XY,meteor:YY,mocha:HY,mongo:KY,nashorn:JY,node:eH,nodeBuiltin:tH,phantomjs:rH,prototypejs:nH,protractor:sH,qunit:iH,rhino:aH,serviceworker:oH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:lH,webextensions:uH,worker:cH,wsh:fH,yui:pH};(function(n){n.exports=hH})(SY);const dH=S9(Ox);var dc={},mH={get exports(){return dc},set exports(n){dc=n}},dv,VI;function gH(){return VI||(VI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var HB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bc=function(c){return HB.exec(c).slice(1)};function Cl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Mc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Lc(c){var s=Nc(c),u=JB(c,-1)==="/";return c=SO(Mc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Nc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Lc(Mc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=Cl(c).substr(1),s=Cl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function V(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,V=G.type||j.wrap,te=this.__keys[V],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+V+".");for(W=te.length;(W-=1)>=0;)if($=te[W],U=G[$],!!U){if(Array.isArray(U)){for(K=U.length;(K-=1)>=0;)if(U[K]&&!E(L,U[K])){if(S(V,te[W]))j=new g(U[K],[$,K],"Property",null);else if(b(U[K]))j=new g(U[K],[$,K],null,null);else continue;I.push(j)}}else if(b(U)){if(E(L,U))continue;I.push(new g(U,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,V;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(V,1)):V+=1;if(V===I.length)return a.Break;if(I[V].extendedRange[0]>Q.range[1])return a.Skip}}),V=0,k(F,{leave:function(Q){for(var $;VQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}($c)),$c}var oo={},tL="esrecurse",rL="ECMAScript AST recursive visitor",nL="https://github.com/estools/esrecurse",sL="esrecurse.js",iL="4.3.0",aL={node:">=4.0"},oL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],lL={type:"git",url:"https://github.com/estools/esrecurse.git"},uL={estraverse:"^5.2.0"},cL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},fL="BSD-2-Clause",pL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},hL={presets:["es2015"]},dL={name:tL,description:rL,homepage:nL,main:sL,version:iL,engines:aL,maintainers:oL,repository:lL,dependencies:uL,devDependencies:cL,license:fL,scripts:pL,babel:hL},RO;function mL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class V extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:U}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===U.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===U.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===U.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===U.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===U.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===U.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===U.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===U.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===U.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Vt=256,tr=Re|Se|Vt;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ue=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Ut=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ut.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Vt)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Vt))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vt)>0},Ut.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,V.lastIndex=w,w+=V.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var pr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var w=V.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){V.lastIndex=this.pos;var tt=V.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new pr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ve=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ve&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Vt|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Ut.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new pr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Ut.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Vi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Vi(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Ui(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Ui(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Vc}var NO;function yL(){return NO||(NO=1,function(c){const s=gL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(qc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||qc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(Qc)),Qc.exports}var uo={},MO;function bL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Al(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=qc(),s=yL(),u=bL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var U=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,U.get?U:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],U=W.at(-1),ae={type:o.Template,value:K.slice(te.start,U.end)};return te.loc&&(ae.loc={start:te.loc.start,end:U.loc.end}),te.range&&(ae.start=te.range[0],ae.end=U.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,U=this._acornTokTypes;if(te===U.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===U.privateId)W.type=o.PrivateIdentifier;else if(te===U.semi||te===U.comma||te===U.parenL||te===U.parenR||te===U.braceL||te===U.braceR||te===U.dot||te===U.bracketL||te===U.colon||te===U.question||te===U.bracketR||te===U.ellipsis||te===U.arrow||te===U.jsxTagStart||te===U.incDec||te===U.starstar||te===U.jsxTagEnd||te===U.prefix||te===U.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===U.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===U.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===U.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===U.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===U.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,U=K.tokens,ae=this._tokens,z=()=>{U.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),U.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),U=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:U,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,U,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=U,ce.range=[te,U]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(U,ae){(typeof U!="object"||U===null)&&(U={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=U.sourceType,ue=E(U),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const U=this[k],ae=U.tokens;return U.comments&&(ae.comments=U.comments),ae}finishNode(...U){const ae=super.finishNode(...U);return this[D](ae)}finishNodeAt(...U){const ae=super.finishNodeAt(...U);return this[D](ae)}parse(){const U=this[k],ae=super.parse();if(ae.sourceType=U.originalSourceType,U.comments&&(ae.comments=U.comments),U.tokens&&(ae.tokens=U.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return U.lastToken&&(ae.range&&(ae.range[1]=U.lastToken.range[1]),ae.loc&&(ae.loc.end=U.lastToken.loc.end),ae.end=U.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(U){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(U)}raise(U,ae){const z=W.acorn.getLineInfo(this.input,U),ue=new SyntaxError(ae);throw ue.index=U,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(U,ae){this.raise(U,ae)}unexpected(U){let ae="Unexpected token";if(U!=null){if(this.pos=U,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(U){const ae=super.jsx_readString(U);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](U){return U.type==="TemplateElement"&&this[k].templateElements.push(U),U.type.includes("Function")&&!U.generator&&(U.generator=!1),U}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),V=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=V,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function vL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",U="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[V]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[U]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ve||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Ut}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var xL="eslint",OL="9.12.0",SL="Nicholas C. Zakas ",EL="An AST-based pattern checker for JavaScript.",CL={eslint:"./bin/eslint.js"},wL="./lib/api.js",kL="./lib/types/index.d.ts",AL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},PL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},TL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},DL={"pre-commit":"lint-staged"},IL=["LICENSE","README.md","bin","conf","lib","messages"],RL="eslint/eslint",FL="https://eslint.org/donate",_L="https://eslint.org",BL="https://github.com/eslint/eslint/issues/",LL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},NL={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},ML={jiti:"*"},$L={jiti:{optional:!0}},jL=["ast","lint","javascript","ecmascript","espree"],qL="MIT",QL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:xL,version:OL,author:SL,description:EL,bin:CL,main:wL,types:kL,exports:AL,typesVersions:PL,scripts:TL,gitHooks:DL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:IL,repository:RL,funding:FL,homepage:_L,bugs:BL,dependencies:LL,devDependencies:NL,peerDependencies:ML,peerDependenciesMeta:$L,keywords:jL,license:qL,engines:QL},Pl={},xs=[],Zn=[],UL=typeof Uint8Array<"u"?Uint8Array:Array,Uc=!1;function qO(){Uc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new UL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function GL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function zL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Tl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function VO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var ZL={}.toString,UO=Array.isArray||function(c){return ZL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var XL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Dl();function Dl(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Us(c,s){if(Dl()=Dl())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Dl().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return Fl(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function eN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return cN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return lN(this,s,u);case"latin1":case"binary":return uN(this,s,u);case"base64":return aN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return tN(this,s,u,p);case"utf8":case"utf-8":return rN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return nN(this,s,u,p);case"base64":return sN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function aN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return oN(p)}var KO=4096;function oN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Il(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2};function Rl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Rl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Rl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),VO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),VO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function gN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return WL(hN(c))}function _l(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function bN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||vN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function vN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),Ml(s)?u.showHidden=s:s&&rf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=ON),Nl(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ON(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function SN(c,s){return c}function EN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Nl(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Nl(c,p,u)),p}var a=CN(c,s);if(a)return a;var d=Object.keys(s),v=EN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Yc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Yc(s)}var o="",y=!1,O=["{","}"];if(Kc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Yc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=wN(c,s,u,v,d):g=d.map(function(f){return Hc(c,s,u,v,f,y)}),c.seen.pop(),kN(g,o,O)}function CN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Jc(s))return c.stylize(""+s,"number");if(Ml(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Yc(c){return"["+Error.prototype.toString.call(c)+"]"}function wN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function kN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Kc(c){return Array.isArray(c)}function Ml(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Jc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&ef(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&ef(c)==="[object Date]"}function ha(c){return Li(c)&&(ef(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function $l(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function ef(c){return Object.prototype.toString.call(c)}function tf(c){return c<10?"0"+c.toString(10):c.toString(10)}var AN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function PN(){var c=new Date,s=[tf(c.getHours()),tf(c.getMinutes()),tf(c.getSeconds())].join(":");return[c.getDate(),AN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",PN(),Bl.apply(null,arguments))}function rf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function nf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,V=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=V(xe/je);xe>G*k>>1;Ge+=S)xe=V(xe/G);return V(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>V((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtV(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),V(Ge/nr)>b-ut&&$("overflow"),ut+=V(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnV((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Vt(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ue=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ue))Ce=Ce.replace(Ue,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Vt(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Ut(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var pr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:pr.domainHost,parse:pr.parse,serialize:pr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ve="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ve+"%"+Ve+Ve+"%"+Ve+Ve)+"|"+a("%[89A-Fa-f]"+Ve+"%"+Ve+Ve)+"|"+a("%"+Ve+Ve)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return V[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,U=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;vf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],V=L[3],Q=L[5];return(j<=23&&G<=59&&V<=59||j==23&&G==59&&V==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return vf}var xf,TS;function MN(){return TS||(TS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),xf}var Of,DS;function $N(){return DS||(DS=1,Of=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),Of}var Sf,IS;function jN(){return IS||(IS=1,Sf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),wf}var kf,BS;function UN(){return BS||(BS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),kf}var Af,LS;function WN(){return LS||(LS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),Af}var Pf,NS;function GN(){return NS||(NS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Pf}var Tf,MS;function zN(){return MS||(MS=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Tf}var Df,$S;function ZN(){return $S||($S=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,V=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Df}var If,jS;function qS(){return jS||(jS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),If}var Rf,QS;function VS(){return QS||(QS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,US;function WS(){return US||(US=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,GS;function zS(){return GS||(GS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,ZS;function XN(){return ZS||(ZS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Bf}var Lf,XS;function YN(){return XS||(XS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Lf}var Nf,YS;function HN(){return YS||(YS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Nf}var Mf,HS;function KN(){return HS||(HS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Mf}var $f,KS;function JN(){return KS||(KS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(U),P=s.schema.patternProperties||{},N=Object.keys(P).filter(U),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,V=s.opts.removeAdditional,Q=j||G||V,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ue=s.util.getProperty(z),it=x+Ue,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ue,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Ut=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),$f}var jf,JS;function eM(){return JS||(JS=1,jf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Qf}var Vf,r1;function nM(){return r1||(r1=1,Vf={$ref:MN(),allOf:$N(),anyOf:jN(),$comment:qN(),const:QN(),contains:VN(),dependencies:UN(),enum:WN(),format:GN(),if:zN(),items:ZN(),maximum:qS(),minimum:qS(),maxItems:VS(),minItems:VS(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:XN(),not:YN(),oneOf:HN(),pattern:KN(),properties:JN(),propertyNames:eM(),required:tM(),uniqueItems:rM(),validate:wS()}),Vf}var Uf,n1;function sM(){if(n1)return Uf;n1=1;var c=nM(),s=da().toHash;return Uf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Uf}var Wf,s1;function iM(){if(s1)return Wf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Wf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),V={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...V},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...V},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...V},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...V,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,U=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Vt=new Error(qt,{cause:kt});throw kt.code&&(Vt.code=kt.code),Vt}}validateEnvironment(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Pl.Legacy=Re,Pl}var ql={exports:{}},Ql={exports:{}},Kf,m1;function o$(){if(m1)return Kf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Kf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Kf}var Jf,g1;function y1(){if(g1)return Jf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=o$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ql,Ql.exports)),Ql.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var u$={isatty:v1,ReadStream:x1,WriteStream:O1},c$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:u$,isatty:v1}),f$=i(c$),S1;function p$(){return S1||(S1=1,function(c,s){const u=f$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=gH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?ql.exports=l$():ql.exports=p$()),ql.exports}var ep,C1;function tp(){if(C1)return ep;C1=1;const c=wl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),V=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ve=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ve=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ve=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ve=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ve},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),U=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ve=Object.getOwnPropertyDescriptor(Te,ke);if(Ve)return Ve;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ve=0;Ve":return{value:Te.value>Ve.value};case">=":return{value:Te.value>=Ve.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ve.value};case">>>":return{value:Te.value>>>Ve.value};case"+":return{value:Te.value+Ve.value};case"-":return{value:Te.value-Ve.value};case"*":return{value:Te.value*Ve.value};case"/":return{value:Te.value/Ve.value};case"%":return{value:Te.value%Ve.value};case"**":return{value:Te.value**Ve.value};case"|":return{value:Te.value|Ve.value};case"^":return{value:Te.value^Ve.value};case"&":return{value:Te.value&Ve.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ve=ue(Ie.arguments,ke);if(Ve!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ve)};if(U.has(Pe[de]))return{value:Ve[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ve)};if(U.has(Oe))return{value:Ve[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ve=Te.defs[0];if(Ve.parent&&Ve.parent.kind==="const"&&Ve.node.id.type==="Identifier")return ce(Ve.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ve=ce(Ie.right,ke);if(Ve!=null)return Ve}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ve=pe(Ie,ke);if(Ve!=null&&!z(Te.value,Ve.value))return{value:Te.value[Ve.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ve=ue(Ie.arguments,ke);if(Te!=null&&Ve!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ve)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ve of Ie.properties)if(Ve.type==="Property"){if(Ve.kind!=="init")return null;const lt=pe(Ve,ke),Oe=ce(Ve.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ve.type==="SpreadElement"||Ve.type==="ExperimentalSpreadProperty"){const lt=ce(Ve.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ve=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ve!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ve)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ve=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ve}=Ie;return typeof this[Ve]=="function"?this[Ve](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ve}=Ie;for(const lt of Te[Ve]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ve=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ve},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ve,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ve=Ie|0,lt=ke,Oe=Te,!(Ve>=1))throw new TypeError("'times' should be a positive integer.")}else Ve=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ve>0);return Ve===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Vt=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ve=ke-1;Ve>=0&&Ie.charCodeAt(Ve)===92;--Ve)Te=!Te;return Te}function fe(Ie,ke,Te){const Ve=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}function Ue(Ie,ke,Te){const Ve=[];let lt=0;for(const Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Vt.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ve}=Vt.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ve||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ue(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Ut=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function pr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ve=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ve.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ve=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ve,!0))}for(const Te of this.globalObjectNames){const Ve=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ve,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ve=oe(Te.arguments[0]);if(Ve==null||!Bt(ke,Ve))continue;const lt=ke[Ve],Oe=[Ve];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ve of Te.body){if(!Pt.test(Ve.type)||Ve.source==null)continue;const lt=Ve.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ve,path:Pe,type:se,info:Oe[se]}),Ve.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ve,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ve.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ve,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ve[se]&&(yield{node:Pe,path:Te,type:se,info:Ve[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ve)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ve){let lt=ke;for(;pr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ve,Pe))return;Te=Te.concat(Pe);const de=Ve[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ve[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ve[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ve[Ut]&&(yield{node:Oe,path:Te,type:Ut,info:Ve[Ut]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve),yield*this._iteratePropertyReferences(Oe,Te,Ve));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ve))}*_iterateLhsReferences(ke,Te,Ve){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ve,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ve,Oe))continue;const Pe=Te.concat(Oe),de=Ve[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ve))}*_iterateImportReferences(ke,Te,Ve){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ve,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Ut,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Ut,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:V,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Ut,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=V,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(rp)),rp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Ul,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=lp;function lp(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",lp)}En.notDeepStrictEqual=up;function up(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",up)}En.strictEqual=cp;function cp(c,s,u){c!==s&&Cn(c,s,u,"===",cp)}En.notStrictEqual=fp;function fp(c,s,u){c===s&&Cn(c,s,u,"!==",fp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function b$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=b$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var v$=Object.freeze({__proto__:null,AssertionError:Ul,assert:mo,deepEqual:ap,deepStrictEqual:op,default:En,doesNotThrow:j1,equal:sp,fail:Cn,ifError:q1,notDeepEqual:lp,notDeepStrictEqual:up,notEqual:ip,notStrictEqual:fp,ok:mo,strictEqual:cp,throws:$1}),Wl=i(v$),pp,Q1;function go(){return Q1||(Q1=1,pp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),pp}var yo={},V1;function bo(){return V1||(V1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var hp,U1;function x$(){if(U1)return hp;U1=1;const c=go(),s=bo();return hp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},hp}var dp,W1;function O$(){if(W1)return dp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return dp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},dp}var mp,G1;function gp(){if(G1)return mp;G1=1;const c=go();return mp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},mp}var yp,z1;function S$(){if(z1)return yp;z1=1;const c=gp();return yp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},yp}var bp,Z1;function E$(){if(Z1)return bp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return bp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},Op}var Sp,H1;function w$(){if(H1)return Sp;H1=1;const c=gp();return Sp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Sp}var Ep,K1;function k$(){if(K1)return Ep;K1=1;const c=x$(),s=O$(),u=S$(),p=E$(),a=xp(),d=C$(),v=w$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Ep={forward:new m(a,p),backward:new m(s,c)},Ep}var Cp,J1;function A$(){if(J1)return Cp;J1=1;const c=xp();return Cp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Cp}var wp,eE;function P$(){if(eE)return wp;eE=1;const c=Wl,{isCommentToken:s}=Kr(),u=k$(),p=xp(),a=A$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return wp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Tp}var Dp,lE;function Ip(){if(lE)return Dp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Rp=d,Rp}var Fp,cE;function D$(){if(cE)return Fp;cE=1;const c=Ip(),s=T$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,V=this.thrownForkContext;G.add=f.bind(null,G,V,j),V.add=f.bind(null,V,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const V=this.choiceContext;return V.trueForkContext.addAll(I.trueForkContext),V.falseForkContext.addAll(I.falseForkContext),V.nullishForkContext.addAll(I.nullishForkContext),V.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const V=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,V,I.defaultBodySegments)):j.add(V));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Fp=P,Fp}var _p,fE;function pE(){if(fE)return _p;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return _p=c,_p}var Bp,hE;function I$(){if(hE)return Bp;hE=1;const c=D$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Lp=R,Lp}var Np,mE;function gE(){return mE||(mE=1,Np=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Np}var ji={},Mp={exports:{}},$p={exports:{}},jp,yE;function F$(){if(yE)return jp;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Vp={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)U?te:U}),s=K(function(te,U){return te0?1:0},d=K(function(te,U){return~~(te/U)}),v=K(function(te,U){return te%U}),m=K(function(te,U){return Math.floor(te/U)}),o=K(function(te,U){var ae;return(te%(ae=U)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,U){return Math.pow(te,U)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,U){return Math.atan2(te,U)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},V=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,U){var ae;for(te=Math.abs(te),U=Math.abs(U);U!==0;)ae=te%U,te=U,U=ae;return te}),W=K(function(te,U){return Math.abs(Math.floor(te/$(te,U)*U))}),Up={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:V,odd:Q,gcd:$,lcm:W};function K(te,U){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,zB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,zB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Yp,FE;function V$(){var j;if(FE)return Yp;FE=1;const{isCommentToken:c}=Kr(),s=P$(),u=Gl(),p=tp(),a=nE(),{directivesPattern:d}=iE(),v=R$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=jc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,V){const Q=[];let $=0,W=0;for(;$=V.length||$=V.range[0]||V.range[0]<=G.range[0]&&V.range[1]>=G.range[0]}function F(G,V,Q,$){if(R(V,Q))return!1;const[W,K]=V.range[1]<=Q.range[0]?[V,Q]:[Q,V],te=G.getLastToken(W)||W,U=G.getFirstToken(K)||K;let ae=te;for(;ae!==U;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==U&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,V={},Q={}){for(const $ of new Set([...Object.keys(V),...Object.keys(Q)])){const W=V[$]===void 0?void 0:T(V[$]),te=Q[$]&&Q[$].value||W,U=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=U!==void 0,ae.eslintExplicitGlobalComments=U,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,V){Object.keys(V).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,U,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,U=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=U||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const U=this.scopeManager.acquire(te,K);if(U)return U.type==="function-expression-name"?($.set(Q,U.childScopes[0]),U.childScopes[0]):($.set(Q,U),U)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const U=te.variables.find(ae=>ae.name===Q);if(U)return U.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:U,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(U);if(!(te.type==="Line"&&!ue)){if(U==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${U} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(U){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=U.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(U=>{const{label:ae,value:z}=f.parseDirective(U.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:U.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(U),K[ue].value=ce):K[ue]={comments:[U],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:U.loc}):Q.push({ruleId:null,loc:U.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Yp=L,Yp}var Hp,_E;function BE(){return _E||(_E=1,Hp={SourceCode:V$()}),Hp}var Kp,LE;function zl(){return LE||(LE=1,Kp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Kp}var Jp,NE;function U$(){if(NE)return Jp;NE=1;const c=zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Jp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Jp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function eh(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W$(c){return function(s){if(Array.isArray(s))return th(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return th(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?th(c,s):void 0}}function th(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[V]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[V]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,V,Q,$,W,K,te;function U(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(V=$.length;(V-=1)>=0;)if($[V]){if(S(I,Q[G]))j=new g($[V],[te,V],"Property",new x($,V));else{if(!b($[V]))continue;j=new g($[V],[te,V],null,new x($,V))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||U(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)V.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(V),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var V;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),G$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=pr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,V=pr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=pr(["\\",'"'],!0,!1),U=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=pr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=pr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=pr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=pr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=pr(["/"],!0,!1),qt=Zt(":not(",!1),Vt=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ue=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Ut=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function pr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beUt&&(Ut=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ve(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(V))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Vt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ue)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&VE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&VE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function nh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Zl.VisitorKeys[p]?Zl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function sh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=eh(u,1)[0];if(!d)return!1;for(var v=nh(d,a),m=0;m0&&sh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return oh={getPlaceholderMatcher:c,interpolate:s},oh}var lh,YE;function Y$(){if(YE)return lh;YE=1;const c=Wl,{RuleFixer:s}=Z$(),{interpolate:u}=X$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return lh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},lh}function H$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uh,HE;function K$(){if(HE)return uh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),uh={LazyLoadingRuleMap:s},uh}var ch={exports:{}},xo={},fh={exports:{}},KE;function J$(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}fh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),fh.exports}var ph={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ph.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ph.exports}var hh={exports:{}},tC;function e3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}hh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),hh.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=J$(),xo.code=eC(),xo.keyword=e3()}()),xo}var dh,sC;function iC(){return sC||(sC=1,dh={LATEST_ECMA_VERSION:2025}),dh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=wl(),u=nC(),p=Al(),a=zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=Gl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function V(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function U(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Vt(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ue(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Ut(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ue(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ue):ee.getFirstToken(X,Ue)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ve(ee.left,ee.operator),Ke=be&&ve&&Ve(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ve(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:U,isES5Constructor:G,getUpperFunction:V,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Ut,isDotToken:qt,isQuestionDotToken:Vt,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Vt),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ue),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ue,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=V(Ne);if(Ke===null||!U(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!U(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(U(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},mh}var gh,lC;function r3(){if(lC)return gh;lC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},gh}var yh,uC;function n3(){if(uC)return yh;uC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},yh}var bh,cC;function s3(){if(cC)return bh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return bh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},bh}var vh,fC;function i3(){if(fC)return vh;fC=1;const c=Ze();return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},vh}var xh,pC;function a3(){if(pC)return xh;pC=1;const c=Ze();return xh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},xh}var Oh,hC;function o3(){if(hC)return Oh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},Oh}var Sh,dC;function l3(){if(dC)return Sh;dC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Sh}var Eh,mC;function u3(){return mC||(mC=1,Eh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Eh}var Ch,gC;function c3(){if(gC)return Ch;gC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Ch}var wh,yC;function f3(){if(yC)return wh;yC=1;const c=Ze();return wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},wh}var kh,bC;function p3(){return bC||(bC=1,kh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),kh}var Ah,vC;function h3(){if(vC)return Ah;vC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},Ah}var Ph,xC;function d3(){if(xC)return Ph;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ph={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ph}var Th,OC;function m3(){if(OC)return Th;OC=1;const c=Ze();return Th={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Th}var Dh,SC;function g3(){if(SC)return Dh;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Dh}var Ih,EC;function y3(){if(EC)return Ih;EC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Ih}var Rh,CC;function b3(){if(CC)return Rh;CC=1;const c=Ze();return Rh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Rh}var Fh,wC;function Qi(){if(wC)return Fh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Fh={upperCaseFirst:u,getGraphemeCount:p},Fh}var _h,kC;function v3(){if(kC)return _h;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return _h={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},_h}var Bh,AC;function x3(){if(AC)return Bh;AC=1;const c=Ze();return Bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Bh}var Lh,PC;function O3(){if(PC)return Lh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Lh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Lh}var Nh,TC;function S3(){return TC||(TC=1,Nh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Nh}var Mh,DC;function E3(){if(DC)return Mh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Mh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const V=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+V)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},$h}var jh,RC;function w3(){if(RC)return jh;RC=1;const c=/^no default$/iu;return jh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},jh}var qh,FC;function k3(){return FC||(FC=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),qh}var Qh,_C;function A3(){return _C||(_C=1,Qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),Qh}var Vh,BC;function P3(){if(BC)return Vh;BC=1;const c=Ze();return Vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Vh}var Uh,LC;function Wh(){return LC||(LC=1,Uh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Uh}var Gh,NC;function T3(){if(NC)return Gh;NC=1;const c=Ze(),s=Wh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Gh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Gh}var zh,MC;function D3(){return MC||(MC=1,zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),zh}var Zh,$C;function I3(){if($C)return Zh;$C=1;const c=Ze();return Zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Zh}var Xh,jC;function R3(){if(jC)return Xh;jC=1;const{getStaticValue:c}=Kr();return Xh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Xh}var Yh,qC;function F3(){if(qC)return Yh;qC=1;const c=Ze();return Yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Hh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Hh}var Kh,VC;function B3(){if(VC)return Kh;VC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Kh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Kh}var Jh,UC;function L3(){return UC||(UC=1,Jh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Jh}var ed,WC;function N3(){return WC||(WC=1,ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return sd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},sd}var id,YC;function Q3(){if(YC)return id;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},id}var ad,HC;function V3(){return HC||(HC=1,ad={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),ad}var od,KC;function U3(){return KC||(KC=1,od={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),od}var ld,JC;function W3(){if(JC)return ld;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ld={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ld}var ud,ew;function G3(){if(ew)return ud;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ud={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ud}var cd,tw;function z3(){if(tw)return cd;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return cd={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},cd}var fd,rw;function Z3(){return rw||(rw=1,fd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),fd}var pd,nw;function X3(){if(nw)return pd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},pd}var hd,sw;function Y3(){if(sw)return hd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return hd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function V(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function U(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:U}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||U(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(U,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[U.range[1]-U.loc.end.column,U.range[1]-U.loc.end.column+z+ue]:[U.range[0]-U.loc.start.column,U.range[0]-U.loc.start.column+z+ue];s.report({node:U,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(U,ae){const z=ae?o.getLastToken(U):o.getFirstToken(U),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(U,ae){const z=ae===!0?o.getLastToken(U,1):o.getTokenBefore(U),ue=ae===!0?U.loc.end.line:U.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(U,ae){const z=g(U,!1);if(U.type!=="ArrayExpression"&&U.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab),U.type==="IfStatement"&&U.alternate){const ue=o.getTokenBefore(U.alternate);b(ue,ae),f(U.alternate)||b(U.alternate,ae)}if(U.type==="TryStatement"&&U.handler){const ue=o.getFirstToken(U.handler);b(ue,ae)}if(U.type==="TryStatement"&&U.finalizer){const ue=o.getTokenBefore(U.finalizer);b(ue,ae)}if(U.type==="DoWhileStatement"){const ue=o.getTokenAfter(U.body);b(ue,ae)}}function S(U,ae){U.forEach(z=>b(z,ae))}function E(U,ae){const z=o.getLastToken(U),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(U,!0)&&x(U,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(U,ae){const z=o.getLastToken(U,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(U,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(U,ae){const z=g(U,!1);(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab,{line:U.loc.start.line,column:U.loc.start.column})}function T(U,ae,z){let ue=U.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(U){return T(U,"VariableDeclarator")}function F(U,ae){return ae&&ae.parent.loc.start.line===U.loc.start.line&&ae.parent.declarations.length>1}function P(U){const ae=U.parent;return ae.arguments.length>=2&&ae.arguments[1]===U?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(U){const ae=U.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==U)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(U){const ae=U.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(U.body,z),E(U,z-ue)}function L(U){const ae=o.getLastToken(U),z=U.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(U){if(L(U))return;let ae=U.type==="ArrayExpression"?U.elements:U.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(U);if(f(U)){const ce=U.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==U.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=U.parent.type==="ObjectExpression"?U.parent.properties:U.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(U)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(U,z)}else z=g(U).goodChar;m[U.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[U.type],F(U,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===U.loc.end.line)&&E(U,z+(F(U,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(U){return U.type==="BlockStatement"||U.type==="ClassBody"||U.body&&U.body.type==="BlockStatement"||U.consequent&&U.consequent.type==="BlockStatement"}function V(U){if(L(U))return;if(U.parent&&(U.parent.type==="FunctionExpression"||U.parent.type==="FunctionDeclaration"||U.parent.type==="ArrowFunctionExpression")){I(U);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];U.parent&&ue.includes(U.parent.type)&&G(U)?ae=g(U.parent).goodChar:U.parent&&U.parent.type==="CatchClause"?ae=g(U.parent.parent).goodChar:ae=g(U).goodChar,U.type==="IfStatement"&&U.consequent.type!=="BlockStatement"?z=[U.consequent]:Array.isArray(U.body)?z=U.body:z=[U.body],z.length>0&&S(z,ae+v),U.type==="BlockStatement"&&E(U,ae)}function Q(U){return U.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==U.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(U){const ae=Q(U),z=g(U).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[U.kind];if(S(ae,ne),o.getLastToken(U).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(U,g(ce).goodChar):E(U,ne-v)}function W(U){U.body.type!=="BlockStatement"&&V(U)}function K(U,ae){const z=U.type==="SwitchStatement"?U:U.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(U){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(U).replace(o.getText(U.argument),"");return ae.test(z)}return{Program(U){U.body.length>0&&S(U.body,g(U).goodChar)},ClassBody:V,BlockStatement:V,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(U){U.consequent.type!=="BlockStatement"&&U.consequent.loc.start.line>U.loc.start.line&&V(U)},VariableDeclaration(U){U.declarations.at(-1).loc.start.line>U.declarations[0].loc.start.line&&$(U)},ObjectExpression(U){j(U)},ArrayExpression(U){j(U)},MemberExpression(U){if(typeof m.MemberExpression>"u"||L(U)||T(U,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(U,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(U).goodChar+v*m.MemberExpression,z=[U.property],ue=o.getTokenBefore(U.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(U){const ae=g(U).goodChar,z=K(U,ae);S(U.cases,z),E(U,ae)},SwitchCase(U){if(L(U))return;const ae=K(U);S(U.consequent,ae+v)},FunctionDeclaration(U){L(U)||(m.FunctionDeclaration.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(U){L(U)||(m.FunctionExpression.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(U){if(L(U))return;const ae=g(U).goodChar;te(U)?k(U,ae):b(U,ae)},CallExpression(U){L(U)||(m.CallExpression.arguments==="first"&&U.arguments.length?S(U.arguments.slice(1),U.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(U.arguments,g(U).goodChar+v*m.CallExpression.arguments))}}}},dd}var md,aw;function K3(){if(aw)return md;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return md={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const U=W.length-K;if((U&&te==="strict"||U<0&&te==="minimum"||U>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=U>0,pe=Math.abs(U),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),U,ae,z;f&&$>1?(U=f.beforeColon,ae=f.afterColon,z=f.mode):(U=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?U:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,U,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):V(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},yd}var bd,uw;function t5(){if(uw)return bd;uw=1;const c=Ze(),s=Wh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:V,ExportNamedDeclaration:U,ExportDefaultDeclaration:U,ExportAllDeclaration:U,FunctionDeclaration:G,ImportDeclaration:U,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:V,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},bd}var vd,cw;function r5(){if(cw)return vd;cw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},vd}var xd,fw;function n5(){if(fw)return xd;fw=1;const c=Ze();return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},xd}var Od,pw;function s5(){if(pw)return Od;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function V($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const U=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&V($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(U<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(U)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},Od}var Sd,hw;function i5(){if(hw)return Sd;hw=1;const c=Ze();return Sd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Sd}var Ed,dw;function a5(){if(dw)return Ed;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Ed}var Cd,mw;function o5(){if(mw)return Cd;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Cd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),V=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||V)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield V.insertTextBefore(W,I.operator),yield V.removeRange([R.range[0],P.range[0]]),yield V.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield V.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Cd}var wd,gw;function l5(){return gw||(gw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),wd}var kd,yw;function u5(){return yw||(yw=1,kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),kd}var Ad,bw;function c5(){if(bw)return Ad;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return Ad={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(V,Q){let $=0;return V.replace(/\t/gu,(W,K)=>{const te=K+$,U=Q?te%Q:0,ae=Q-U;$+=ae-1}),Array.from(V).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(V,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===V.length)}function D(V,Q,$){const W=$.loc.start,K=$.loc.end,te=!V.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===V.length)}function T(V){if(!V||!V.parent||V.type!=="JSXEmptyExpression"||V.parent.type!=="JSXExpressionContainer")return!1;const Q=V.parent;return Q.loc.start.line===Q.loc.end.line}function R(V,Q){return V.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(V,Q,$){Array.isArray(V[Q])||(V[Q]=[]),V[Q].push($)}function P(){return a.ast.tokens.filter(V=>V.type==="String"||V.type==="JSXText"&&a.getNodeByRangeIndex(V.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(V=>V.type==="Template")}function I(){return a.ast.tokens.filter(V=>V.type==="RegularExpression")}function L(V){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?V.at(-1)!==$.parent&&V.push($.parent):V.push(Q)}),V}function G(V){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),U=N(),ae=L(U),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:V,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:V,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},Ad}var Pd,vw;function f5(){if(vw)return Pd;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Pd}var Td,xw;function p5(){if(xw)return Td;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Td}var Dd,Ow;function h5(){return Ow||(Ow=1,Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Dd}var Id,Sw;function d5(){if(Sw)return Id;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Id}var Rd,Ew;function m5(){if(Ew)return Rd;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Rd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Rd}var Fd,Cw;function g5(){if(Cw)return Fd;Cw=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Fd}var _d,ww;function y5(){if(ww)return _d;ww=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const V=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=V+K.length;return G.replaceTextRange([V,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=V+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const U=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=U.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([V,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},_d}var Bd,kw;function b5(){if(kw)return Bd;kw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Bd}var Ld,Aw;function v5(){if(Aw)return Ld;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Ld={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Ld}var Nd,Pw;function x5(){if(Pw)return Nd;Pw=1;const c=Ze();return Nd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Nd}var Md,Tw;function O5(){if(Tw)return Md;Tw=1;const c=Ze();return Md={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Md}var $d,Dw;function S5(){return Dw||(Dw=1,$d={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),$d}var jd,Iw;function E5(){if(Iw)return jd;Iw=1;const c=Ze();return jd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},jd}var qd,Rw;function C5(){if(Rw)return qd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return qd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},qd}var Qd,Fw;function w5(){if(Fw)return Qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return Qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},Qd}var Vd,_w;function k5(){return _w||(_w=1,Vd={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Vd}var Ud,Bw;function A5(){if(Bw)return Ud;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Ud={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Ud}var Wd,Lw;function P5(){if(Lw)return Wd;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Wd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Wd}var Gd,Nw;function T5(){return Nw||(Nw=1,Gd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Gd}var zd,Mw;function D5(){return Mw||(Mw=1,zd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),zd}var Zd,$w;function I5(){return $w||($w=1,Zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Zd}var Xd,jw;function R5(){if(jw)return Xd;jw=1;const c=Ze();return Xd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Xd}var Yd,qw;function F5(){if(qw)return Yd;qw=1;const c=Ze();return Yd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Yd}var Hd,Qw;function _5(){return Qw||(Qw=1,Hd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Hd}var Kd,Vw;function B5(){if(Vw)return Kd;Vw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Kd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Kd}var Jd,Uw;function L5(){if(Uw)return Jd;Uw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Jd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Jd}var em,Ww;function N5(){if(Ww)return em;Ww=1;const c=Ze();return em={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},em}var tm,Gw;function M5(){if(Gw)return tm;Gw=1;const c=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},tm}var rm,zw;function $5(){if(zw)return rm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return rm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},rm}var nm,Zw;function j5(){if(Zw)return nm;Zw=1;const{isConstant:c}=Ze();return nm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},nm}var sm,Xw;function q5(){return Xw||(Xw=1,sm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),sm}var im,Yw;function Q5(){return Yw||(Yw=1,im={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,V=33,Q=35,$=36,W=37,K=38,te=40,U=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Vt=66,tr=68,fe=70,Ue=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Ut=98,ir=99,Ot=100,Zt=102,pr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ve=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,U,be,ve,at,ht,dt]),Xn=new Set([K,V,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,U,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,V,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Vi(nt){return ws(nt)||bt(nt)}class Ui{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===U&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==V)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(V))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==U&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ue)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ve)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Vi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Ui(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Ui(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Ui,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var am,Kw;function V5(){if(Kw)return am;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return am={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},am}var om,Jw;function U5(){return Jw||(Jw=1,om={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,ek;function W5(){return ek||(ek=1,lm={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),lm}var um,tk;function G5(){return tk||(tk=1,um={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),um}var cm,rk;function z5(){return rk||(rk=1,cm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),cm}var fm,nk;function Z5(){if(nk)return fm;nk=1;const c=Ze();return fm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},fm}var pm,sk;function X5(){if(sk)return pm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return pm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},pm}var hm,ik;function Y5(){if(ik)return hm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},hm}var dm,ak;function H5(){if(ak)return dm;ak=1;const c=Ze();return dm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},dm}var mm,ok;function K5(){if(ok)return mm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return mm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},mm}var gm,lk;function Oo(){if(lk)return gm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return gm=s,gm}var ym,uk;function J5(){if(uk)return ym;uk=1;const c=Ze(),s=Oo();return ym={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),V=p.getTokenBefore(G);if(V.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===V.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},ym}var bm,ck;function ej(){if(ck)return bm;ck=1;const c=Ze();return bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},bm}var vm,fk;function tj(){if(fk)return vm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return vm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},vm}var xm,pk;function rj(){if(pk)return xm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return xm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},xm}var Om,hk;function nj(){if(hk)return Om;hk=1;const c=Ze();return Om={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},Om}var Sm,dk;function sj(){return dk||(dk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Sm}var Em,mk;function ij(){return mk||(mk=1,Em={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Em}var Cm,gk;function aj(){if(gk)return Cm;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Cm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Cm}var wm,yk;function oj(){if(yk)return wm;yk=1;const c=Ze();return wm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},wm}var km,bk;function lj(){if(bk)return km;bk=1;const c=Ze();return km={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},km}var Am,vk;function uj(){if(vk)return Am;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},Am}var Pm,xk;function cj(){if(xk)return Pm;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Pm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ue||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function V(fe){for(let Ue=fe;Ue;Ue=Ue.parent)if(Ue.type==="ReturnStatement"||Ue.type==="ArrowFunctionExpression"&&Ue.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ue=p.getLastToken(fe),mt=p.getTokenBefore(Ue);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ue)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ue.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ue.range[1],mt.range[0]);return Bt.replaceTextRange([Ue.range[0],mt.range[1]],(te(fe)?" ":"")+se+(U(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ue=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ue=Ue.object,mt=Ue.type;return mt==="CallExpression"}function Be(fe){const Ue=fe.callee;j(Ue,d(fe))&&(L(Ue)||!(ae(fe)||Ue.type==="NewExpression"&&!Q(Ue)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ue.type==="MemberExpression"&&pe(Ue)||!fe.optional&&Ue.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ue=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ue||mt===Ue&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ue||Pt===Ue&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ue=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ue,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ue)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ue){const mt=[fe];let Pt=fe;for(;Pt!==Ue;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ue){return Se(Ue,fe).reverse()}function Me(fe,Ue){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ue);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ue);case"MemberExpression":return fe.computed&&fe.property===Ue;case"ConditionalExpression":return fe.consequent===Ue;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ue,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ue),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ue=>Ue.node===fe)}function qt(fe){T.reports=T.reports.filter(Ue=>Ue.node!==fe)}function Vt(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Vt(fe.parent):!1}function tr({left:fe,operator:Ue,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ue)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ue=>Ue&&j(Ue,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ue=>z(Ue)&&I(Ue)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ue=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ue);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ue)&&a.add(Ue),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ue=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ue.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ue.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ue.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&a.add(Ue)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ue=>{const mt=we(fe,Ue);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ue=>Ue.value&&j(Ue.value,k)).forEach(Ue=>ne(Ue.value))},ObjectPattern(fe){fe.properties.filter(Ue=>{const mt=Ue.value;return z(mt)&&I(mt)}).forEach(Ue=>ne(Ue.value))},Property(fe){if(fe.computed){const{key:Ue}=fe;Ue&&j(Ue,k)&&ne(Ue)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ue=fe.argument;z(Ue)&&I(Ue)&&ne(Ue)},ReturnStatement(fe){const Ue=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ue,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ue=d(fe);fe.expressions.filter(mt=>j(mt,Ue)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ue=p.getFirstToken(fe);K(Ue,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ue}=fe,mt=p.getLastToken(fe);Ue.loc.end.line===mt.loc.start.line?ce(fe):L(Ue)&&ne(Ue)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ue=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ue,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ue=>Ue&&I(Ue)).forEach(ne)},AssignmentPattern(fe){const{left:Ue,right:mt}=fe;z(Ue)&&I(Ue)&&ne(Ue),mt&&j(mt,k)&&ne(mt)}}}},Dm}var Im,Ek;function hj(){if(Ek)return Im;Ek=1;const c=Oo(),s=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Im}var Rm,Ck;function dj(){if(Ck)return Rm;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Rm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Rm}var Fm,wk;function mj(){if(wk)return Fm;wk=1;const c=Ze();return Fm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Fm}var _m,kk;function gj(){if(kk)return _m;kk=1;const c=Ze();return _m={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},_m}var Bm,Ak;function yj(){return Ak||(Ak=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Bm}var Lm,Pk;function bj(){if(Pk)return Lm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Lm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Lm}var Nm,Tk;function vj(){return Tk||(Tk=1,Nm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Nm}var Mm,Dk;function xj(){if(Dk)return Mm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Mm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Mm}var $m,Ik;function Oj(){if(Ik)return $m;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return $m={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},$m}var jm,Rk;function Sj(){if(Rk)return jm;Rk=1;const c=Ze();return jm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},jm}var qm,Fk;function Ej(){if(Fk)return qm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return qm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},qm}var Qm,_k;function Cj(){if(_k)return Qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return Qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},Qm}var Vm,Bk;function wj(){if(Bk)return Vm;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Vm={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Vm}var Um,Lk;function kj(){if(Lk)return Um;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Um={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const V=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:V,column:Q.index},end:{line:V,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let V=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],V+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),V=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Um}var Wm,Nk;function Aj(){if(Nk)return Wm;Nk=1;const{getStaticPropertyName:c}=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Wm}var Gm,Mk;function Pj(){if(Mk)return Gm;Mk=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Gm}var zm,$k;function Tj(){if($k)return zm;$k=1;const c=Ze();return zm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},zm}var Zm,jk;function Dj(){return jk||(jk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Zm}var Xm,qk;function Ij(){return qk||(qk=1,Xm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Xm}var Ym,Qk;function Rj(){if(Qk)return Ym;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Ym={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Ym}var Hm,Vk;function Fj(){return Vk||(Vk=1,Hm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Hm}var Km,Uk;function _j(){if(Uk)return Km;Uk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Km={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),eg}var tg,zk;function Nj(){return zk||(zk=1,tg=function(s){return s>=127462&&s<=127487}),tg}var rg,Zk;function Mj(){return Zk||(Zk=1,rg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),rg}var ng,Xk;function $j(){if(Xk)return ng;Xk=1;const c=Bj(),s=Lj(),u=Nj(),p=Mj();return ng={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},ng}var sg,Yk;function ig(){if(Yk)return sg;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return sg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},sg}var ag,Hk;function jj(){if(Hk)return ag;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ag={parseStringLiteral:o,parseTemplateToken:y},ag}var og,Kk;function qj(){if(Kk)return og;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=$j(),x=Ze(),{isValidWithUnicodeFlag:g}=ig(),{parseStringLiteral:f,parseTemplateToken:b}=jj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,V=I[j].end,Q=N.slice(G,V);return R(P,Q)}return og={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var V;const N=(V=P.options[0])==null?void 0:V.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let U=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return U??(U=f(ce)),F(ne,ce,U)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return U??(U=b(ce)),F(ne,ce,U)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];U??(U=b(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];U??(U=f(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,U;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),U=a(z,$);else{if(ue.regex)continue;te=String(ue.value),U=""}typeof U=="string"&&G(ae,te,U,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},og}var lg,Jk;function Qj(){if(Jk)return lg;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},lg}var ug,eA;function Vj(){return eA||(eA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),ug}var cg,tA;function Uj(){return tA||(tA=1,cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),cg}var fg,rA;function Wj(){return rA||(rA=1,fg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),fg}var pg,nA;function Gj(){if(nA)return pg;nA=1;const c=Ze();return pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},pg}var hg,sA;function zj(){if(sA)return hg;sA=1;const c=Ze();return hg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},hg}var dg,iA;function Zj(){return iA||(iA=1,dg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),dg}var mg,aA;function Xj(){return aA||(aA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),mg}var gg,oA;function Yj(){return oA||(oA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),gg}var yg,lA;function Hj(){return lA||(lA=1,yg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),yg}var bg,uA;function Kj(){return uA||(uA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),bg}var vg,cA;function Jj(){return cA||(cA=1,vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),vg}var xg,fA;function eq(){if(fA)return xg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return xg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},xg}var Og,pA;function tq(){if(pA)return Og;pA=1;const c=["Symbol","BigInt"];return Og={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},Og}var Sg,hA;function rq(){if(hA)return Sg;hA=1;const c=Ze();return Sg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Sg}var Eg,dA;function nq(){return dA||(dA=1,Eg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Eg}var Cg,mA;function sq(){return mA||(mA=1,Cg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Cg}var wg,gA;function iq(){if(gA)return wg;gA=1;const{getVariableByName:c}=Ze();return wg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},wg}var kg,yA;function aq(){if(yA)return kg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return kg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},kg}var Ag,bA;function oq(){if(bA)return Ag;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return Ag={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},Ag}var Pg,vA;function lq(){if(vA)return Pg;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Pg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Pg}var Tg,xA;function uq(){return xA||(xA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Tg}var Dg,OA;function cq(){return OA||(OA=1,Dg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Dg}var Ig,SA;function fq(){if(SA)return Ig;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Ig={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Ig}var Rg,EA;function pq(){return EA||(EA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Rg}var Fg,CA;function hq(){if(CA)return Fg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Fg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Fg}var _g,wA;function dq(){return wA||(wA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),_g}var Bg,kA;function mq(){return kA||(kA=1,Bg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Bg}var Lg,AA;function gq(){if(AA)return Lg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Lg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Lg}var Ng,PA;function yq(){if(PA)return Ng;PA=1;const{getStaticPropertyName:c}=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Ng}var Mg,TA;function bq(){if(TA)return Mg;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Mg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Mg}var $g,DA;function vq(){if(DA)return $g;DA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},$g}var jg,IA;function xq(){if(IA)return jg;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return jg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},jg}var qg,RA;function Oq(){if(RA)return qg;RA=1;const c=Ze();return qg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},qg}var Qg,FA;function Sq(){return FA||(FA=1,Qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),Qg}var Vg,_A;function BA(){if(_A)return Vg;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,U)=>Object.defineProperty(K,te,{value:U}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,U,ae)=>U.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,U)=>te+6{const ae=U.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,U,ae,z)=>te===p?`\\[${U}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(U)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let U=T[K];return U||(U=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=U),te?new RegExp(U,"i"):new RegExp(U)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,U,ae,z){this.origin=te,this.pattern=U,this.negative=ae,this.regex=z}}const L=(K,te)=>{const U=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(U,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,U)=>F(K)?K?G.isNotRelative(K)?U(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:U("path must not be empty",TypeError):U(`path must be a string, but got \`${te}\``,TypeError),V=K=>y.test(K);G.isNotRelative=V,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:U=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=U,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const U=L(te,this._ignoreCase);this._added=!0,this._rules.push(U)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,U){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!U)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,U,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,U,ae,z)}_t(te,U,ae,z){if(te in U)return U[te];if(z||(z=te.split(O)),z.pop(),!z.length)return U[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,U,ae,z);return U[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Vg=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=U=>/^\\\\\?\\/.test(U)||/["<>|\u0000-\u001F]+/u.test(U)?U:U.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=U=>te.test(U)||V(U)}return Vg}var Ug,LA;function Eq(){if(LA)return Ug;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Ug={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Ug}var Wg,NA;function Cq(){if(NA)return Wg;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Wg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Wg}var Gg,MA;function wq(){if(MA)return Gg;MA=1;const c=Ze();return Gg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Gg}var zg,$A;function kq(){return $A||($A=1,zg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),zg}var Zg,jA;function Aq(){if(jA)return Zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Zg}var Xg,qA;function Pq(){if(qA)return Xg;qA=1;const c=Ze();return Xg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Xg}var Yg,QA;function Tq(){if(QA)return Yg;QA=1;const c=Ze();return Yg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Yg}var Hg,VA;function Dq(){if(VA)return Hg;VA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Kg}var Jg,WA;function Rq(){if(WA)return Jg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Jg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Jg}var e0,GA;function Fq(){if(GA)return e0;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return e0={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},e0}var t0,zA;function _q(){if(zA)return t0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return t0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,V=>u.has(V.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},t0}var r0,ZA;function Bq(){if(ZA)return r0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return r0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},r0}var n0,XA;function Lq(){return XA||(XA=1,n0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},a0}var o0,JA;function jq(){return JA||(JA=1,o0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),o0}var l0,eP;function qq(){return eP||(eP=1,l0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),l0}var u0,tP;function Qq(){if(tP)return u0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return u0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},u0}var c0,rP;function Vq(){if(rP)return c0;rP=1;const c=Ze();return c0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},c0}var f0,nP;function Uq(){if(nP)return f0;nP=1;const c=Ze();return f0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&V{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},p0}var h0,iP;function Gq(){if(iP)return h0;iP=1;const c=Ze();return h0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},h0}var d0,aP;function zq(){return aP||(aP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),d0}var m0,oP;function Zq(){return oP||(oP=1,m0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let V=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(V.type);)V=V.parent;f(G)&&!S(G)&&!g(G)&&!(y&&V.type==="ArrayPattern")&&!(O&&V.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),m0}var g0,lP;function Xq(){if(lP)return g0;lP=1;const c=Ze();return g0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},g0}var y0,uP;function Yq(){if(uP)return y0;uP=1;const c=tp(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},y0}var b0,cP;function Hq(){if(cP)return b0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return b0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return v0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},v0}var x0,pP;function Jq(){if(pP)return x0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return x0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},x0}var O0,hP;function e6(){if(hP)return O0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return O0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},O0}var S0,dP;function t6(){if(dP)return S0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return S0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},S0}var E0,mP;function r6(){if(mP)return E0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return E0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},E0}var C0,gP;function n6(){if(gP)return C0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return C0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},w0}var k0,bP;function i6(){return bP||(bP=1,k0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),k0}var A0,vP;function a6(){if(vP)return A0;vP=1;const c=Ze();return A0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(V){if(a.destructuredArrayIgnorePattern&&V.name.parent.type==="ArrayPattern")return"array-destructure";switch(V.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(V){let Q,$;switch(V){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${V}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"defined",additional:$}}function y(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"assigned a value",additional:$}}function O(V,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:V.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(V){const Q=V.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(V){return V.type==="Property"&&V.parent.type==="ObjectPattern"&&p.test(V.parent.properties.at(-1).type)}function b(V){if(a.ignoreRestSiblings){const Q=V.defs.some(W=>f(W.name.parent)),$=V.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(V){return V.isRead()}function E(V,Q){let $=V.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(V){const Q=[];return V.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(V,Q){return V.range[0]>=Q.range[0]&&V.range[1]<=Q.range[1]}function T(V){const Q=V.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===V?T(Q):!0:!1}function R(V,Q){const $=V.identifier,W=$.parent,K=V.from.variableScope,te=V.resolved.scope.variableScope,U=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!U?W.right:null}function F(V,Q){let $=V,W=V.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(V,Q){const $=c.getUpperFunction(V);return $&&D($,Q)&&F($,Q)}function N(V,Q){const $=V.identifier,W=$.parent;return V.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(V){let Q=V.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(V){if(V.eslintUsed)return!0;const Q=k(V),$=Q.length>0;let W=null;return V.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(V){const Q=V.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(V)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(V,Q){const $=V.variables,W=V.childScopes;let K,te;if(V.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(U))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"variable")});continue}}!L(U)&&!g(U)&&!b(U)&&Q.push(U)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let U;te.length>0&&(U=te.at(-1)),s.report({node:U?U.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:V,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},A0}var P0,xP;function o6(){if(xP)return P0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return P0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},T0}var D0,SP;function u6(){if(SP)return D0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return D0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const V=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=V.length-1;do Q--,$--;while(T[Q]===V[$]);const W=$+1,K=V.slice(0,W),te=V.slice(W),U=te.find(o),ae=U&&U.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},D0}var I0,EP;function c6(){if(EP)return I0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},I0}var R0,CP;function f6(){return CP||(CP=1,R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),R0}var F0,wP;function p6(){if(wP)return F0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},F0}var _0,kP;function h6(){if(kP)return _0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},_0}var B0,AP;function d6(){if(AP)return B0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return L0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const V=P[0];if(I==="^"&&V.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!V.negate||V.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},N0}var M0,DP;function y6(){if(DP)return M0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return M0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},M0}var $0,IP;function b6(){if(IP)return $0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return $0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},$0}var j0,RP;function v6(){return RP||(RP=1,j0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),j0}var q0,FP;function x6(){if(FP)return q0;FP=1;const c=zl(),s=Ze(),u=40;return q0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},q0}var Q0,_P;function O6(){if(_P)return Q0;_P=1;const c=Ze();return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},Q0}var V0,BP;function S6(){return BP||(BP=1,V0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),V0}var U0,LP;function E6(){if(LP)return U0;LP=1;const c={enum:["beside","below","any"]};return U0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},U0}var W0,NP;function C6(){if(NP)return W0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},W0}var G0,MP;function w6(){if(MP)return G0;MP=1;const c=Ze();return G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},G0}var z0,$P;function k6(){return $P||($P=1,z0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+U;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${U}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function V(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":V,"FunctionDeclaration:exit":V,"FunctionExpression:exit":V,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},Z0}var X0,qP;function P6(){if(qP)return X0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return X0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!V||G.required&&V?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(V=>V.range[0]===I.parent.range[0]),G=L[j-1];return V=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(V.replaceText($,",")):W.push(V.insertTextAfter($,",")),W.push(V.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const V=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(V.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(V.loc.start.line>G.loc.end.line||V.type==="Line"||V.type==="Block"){let $=V;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),V=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&V&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},X0}var Y0,QP;function T6(){return QP||(QP=1,Y0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Y0}var H0,VP;function D6(){if(VP)return H0;VP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return H0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},H0}var K0,UP;function I6(){if(UP)return K0;UP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},K0}var J0,WP;function R6(){if(WP)return J0;WP=1;const c=Ze();return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},J0}var ey,GP;function F6(){if(GP)return ey;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),U=j(K,Q);te.verify(D,K,Q,U)}F.prevNode=Q}function V(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:V,"SwitchCase:exit":N}}},ey}var ty,zP;function _6(){if(zP)return ty;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ty={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ty}var ry,ZP;function B6(){if(ZP)return ry;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EV.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const V=L.declarations[0];if(V.init){const Q=V.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(V=>V.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let V=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?V+=Q.id.properties.length:Q.id.type==="ArrayPattern"?V+=Q.id.elements.length:V+=1}),G=G&&T===V}I.forEach(V=>{f.report({node:V,messageId:"useConst",data:V,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ry}var ny,XP;function L6(){if(XP)return ny;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ny={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ny}var sy,YP;function N6(){if(YP)return sy;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return sy={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},sy}var iy,HP;function M6(){if(HP)return iy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return iy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},iy}var ay,KP;function $6(){if(KP)return ay;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return ay={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},ay}var oy,JP;function j6(){if(JP)return oy;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return oy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},oy}var ly,eT;function q6(){if(eT)return ly;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const V=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),V[1]),L.range[1]];yield T.removeRange(V),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ly={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ly}var uy,tT;function Q6(){if(tT)return uy;tT=1;const c=Ze();return uy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},uy}var cy,rT;function V6(){return rT||(rT=1,cy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),cy}var fy,nT;function U6(){if(nT)return fy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ig();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return fy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function V($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:U}of K.iterateGlobalReferences(te))if(b&&F(U)){const ae=U.arguments[0];if(U.arguments.length===2){const z=[],ue=D(U.arguments[1])||"";V(U,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&V(U,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:U,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(U,Q(U,`/${Be}/${pe}`))}}))})}else{const z=[];V(U,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:U,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(U,Q(U,ue))}}))})}}else if(R(U)){let ae=D(U.arguments[0]),z=!1,ue;if(U.arguments[1]&&(ue=D(U.arguments[1])),V(U,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},dy}var my,oT;function Z6(){if(oT)return my;oT=1;const c=Al(),s=Ze(),u=Wh();return my={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},my}var gy,lT;function X6(){if(lT)return gy;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},gy}var yy,uT;function Y6(){if(uT)return yy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return yy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},yy}var by,cT;function H6(){if(cT)return by;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return by={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},by}var vy,fT;function K6(){if(fT)return vy;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return vy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},vy}var xy,pT;function J6(){if(pT)return xy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ig();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return xy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},xy}var Oy,hT;function e8(){return hT||(hT=1,Oy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),Oy}var Sy,dT;function t8(){return dT||(dT=1,Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Sy}var Ey,mT;function r8(){if(mT)return Ey;mT=1;const c=Oo(),s=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,V,Q;L?(G="extraSemi",Q=j.loc,V=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},V=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:V})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),V=j||G;L&&V?g(I,!0):!L&&!V&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Ey}var Cy,gT;function n8(){if(gT)return Cy;gT=1;const c=Ze();return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Cy}var wy,yT;function s8(){if(yT)return wy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},wy}var ky,bT;function i8(){return bT||(bT=1,ky={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),ky}var Ay={exports:{}},vT;function a8(){if(vT)return Ay.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ty}var Dy,ST;function u8(){if(ST)return Dy;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Dy}var Iy,ET;function c8(){if(ET)return Iy;ET=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Iy}var Ry,CT;function f8(){if(CT)return Ry;CT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Ry}var Fy,wT;function p8(){if(wT)return Fy;wT=1;const{isEqToken:c}=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Fy}var _y,kT;function h8(){if(kT)return _y;kT=1;const c=Ze();return _y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},_y}var By,AT;function d8(){if(AT)return By;AT=1;const c=zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return By={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},By}var Ly,PT;function m8(){if(PT)return Ly;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},Ly}var Ny,TT;function g8(){if(TT)return Ny;TT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ny}var My,DT;function y8(){if(DT)return My;DT=1;const c=Ze();return My={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},My}var $y,IT;function b8(){if(IT)return $y;IT=1;const c=Ze();return $y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},$y}var jy,RT;function v8(){return RT||(RT=1,jy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),jy}var qy,FT;function x8(){return FT||(FT=1,qy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),qy}var Qy,_T;function O8(){if(_T)return Qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return Qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},Qy}var Vy,BT;function S8(){if(BT)return Vy;BT=1;const c=Ze();return Vy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Vy}var Uy,LT;function E8(){return LT||(LT=1,Uy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Gy}var zy,$T;function k8(){return $T||($T=1,zy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),zy}var Zy,jT;function A8(){if(jT)return Zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,V=>V.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Zy}var Xy,qT;function QT(){if(qT)return Xy;qT=1;const{LazyLoadingRuleMap:c}=K$();return Xy=new c(Object.entries({"accessor-pairs":()=>t3(),"array-bracket-newline":()=>r3(),"array-bracket-spacing":()=>n3(),"array-callback-return":()=>s3(),"array-element-newline":()=>i3(),"arrow-body-style":()=>a3(),"arrow-parens":()=>o3(),"arrow-spacing":()=>l3(),"block-scoped-var":()=>u3(),"block-spacing":()=>c3(),"brace-style":()=>f3(),"callback-return":()=>p3(),camelcase:()=>h3(),"capitalized-comments":()=>d3(),"class-methods-use-this":()=>m3(),"comma-dangle":()=>g3(),"comma-spacing":()=>y3(),"comma-style":()=>b3(),complexity:()=>v3(),"computed-property-spacing":()=>x3(),"consistent-return":()=>O3(),"consistent-this":()=>S3(),"constructor-super":()=>E3(),curly:()=>C3(),"default-case":()=>w3(),"default-case-last":()=>k3(),"default-param-last":()=>A3(),"dot-location":()=>P3(),"dot-notation":()=>T3(),"eol-last":()=>D3(),eqeqeq:()=>I3(),"for-direction":()=>R3(),"func-call-spacing":()=>F3(),"func-name-matching":()=>_3(),"func-names":()=>B3(),"func-style":()=>L3(),"function-call-argument-newline":()=>N3(),"function-paren-newline":()=>M3(),"generator-star-spacing":()=>$3(),"getter-return":()=>j3(),"global-require":()=>q3(),"grouped-accessor-pairs":()=>Q3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>U3(),"id-blacklist":()=>W3(),"id-denylist":()=>G3(),"id-length":()=>z3(),"id-match":()=>Z3(),"implicit-arrow-linebreak":()=>X3(),indent:()=>Y3(),"indent-legacy":()=>H3(),"init-declarations":()=>K3(),"jsx-quotes":()=>J3(),"key-spacing":()=>e5(),"keyword-spacing":()=>t5(),"line-comment-position":()=>r5(),"linebreak-style":()=>n5(),"lines-around-comment":()=>s5(),"lines-around-directive":()=>i5(),"lines-between-class-members":()=>a5(),"logical-assignment-operators":()=>o5(),"max-classes-per-file":()=>l5(),"max-depth":()=>u5(),"max-len":()=>c5(),"max-lines":()=>f5(),"max-lines-per-function":()=>p5(),"max-nested-callbacks":()=>h5(),"max-params":()=>d5(),"max-statements":()=>m5(),"max-statements-per-line":()=>g5(),"multiline-comment-style":()=>y5(),"multiline-ternary":()=>b5(),"new-cap":()=>v5(),"new-parens":()=>x5(),"newline-after-var":()=>O5(),"newline-before-return":()=>S5(),"newline-per-chained-call":()=>E5(),"no-alert":()=>C5(),"no-array-constructor":()=>w5(),"no-async-promise-executor":()=>k5(),"no-await-in-loop":()=>A5(),"no-bitwise":()=>P5(),"no-buffer-constructor":()=>T5(),"no-caller":()=>D5(),"no-case-declarations":()=>I5(),"no-catch-shadow":()=>R5(),"no-class-assign":()=>F5(),"no-compare-neg-zero":()=>_5(),"no-cond-assign":()=>B5(),"no-confusing-arrow":()=>L5(),"no-console":()=>N5(),"no-const-assign":()=>M5(),"no-constant-binary-expression":()=>$5(),"no-constant-condition":()=>j5(),"no-constructor-return":()=>q5(),"no-continue":()=>Q5(),"no-control-regex":()=>V5(),"no-debugger":()=>U5(),"no-delete-var":()=>W5(),"no-div-regex":()=>G5(),"no-dupe-args":()=>z5(),"no-dupe-class-members":()=>Z5(),"no-dupe-else-if":()=>X5(),"no-dupe-keys":()=>Y5(),"no-duplicate-case":()=>H5(),"no-duplicate-imports":()=>K5(),"no-else-return":()=>J5(),"no-empty":()=>ej(),"no-empty-character-class":()=>tj(),"no-empty-function":()=>rj(),"no-empty-pattern":()=>nj(),"no-empty-static-block":()=>sj(),"no-eq-null":()=>ij(),"no-eval":()=>aj(),"no-ex-assign":()=>oj(),"no-extend-native":()=>lj(),"no-extra-bind":()=>uj(),"no-extra-boolean-cast":()=>cj(),"no-extra-label":()=>fj(),"no-extra-parens":()=>pj(),"no-extra-semi":()=>hj(),"no-fallthrough":()=>dj(),"no-floating-decimal":()=>mj(),"no-func-assign":()=>gj(),"no-global-assign":()=>yj(),"no-implicit-coercion":()=>bj(),"no-implicit-globals":()=>vj(),"no-implied-eval":()=>xj(),"no-import-assign":()=>Oj(),"no-inline-comments":()=>Sj(),"no-inner-declarations":()=>Ej(),"no-invalid-regexp":()=>Cj(),"no-invalid-this":()=>wj(),"no-irregular-whitespace":()=>kj(),"no-iterator":()=>Aj(),"no-label-var":()=>Pj(),"no-labels":()=>Tj(),"no-lone-blocks":()=>Dj(),"no-lonely-if":()=>Ij(),"no-loop-func":()=>Rj(),"no-loss-of-precision":()=>Fj(),"no-magic-numbers":()=>_j(),"no-misleading-character-class":()=>qj(),"no-mixed-operators":()=>Qj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Uj(),"no-multi-assign":()=>Wj(),"no-multi-spaces":()=>Gj(),"no-multi-str":()=>zj(),"no-multiple-empty-lines":()=>Zj(),"no-native-reassign":()=>Xj(),"no-negated-condition":()=>Yj(),"no-negated-in-lhs":()=>Hj(),"no-nested-ternary":()=>Kj(),"no-new":()=>Jj(),"no-new-func":()=>eq(),"no-new-native-nonconstructor":()=>tq(),"no-new-object":()=>rq(),"no-new-require":()=>nq(),"no-new-symbol":()=>sq(),"no-new-wrappers":()=>iq(),"no-nonoctal-decimal-escape":()=>aq(),"no-obj-calls":()=>oq(),"no-object-constructor":()=>lq(),"no-octal":()=>uq(),"no-octal-escape":()=>cq(),"no-param-reassign":()=>fq(),"no-path-concat":()=>pq(),"no-plusplus":()=>hq(),"no-process-env":()=>dq(),"no-process-exit":()=>mq(),"no-promise-executor-return":()=>gq(),"no-proto":()=>yq(),"no-prototype-builtins":()=>bq(),"no-redeclare":()=>vq(),"no-regex-spaces":()=>xq(),"no-restricted-exports":()=>Oq(),"no-restricted-globals":()=>Sq(),"no-restricted-imports":()=>Eq(),"no-restricted-modules":()=>Cq(),"no-restricted-properties":()=>wq(),"no-restricted-syntax":()=>kq(),"no-return-assign":()=>Aq(),"no-return-await":()=>Pq(),"no-script-url":()=>Tq(),"no-self-assign":()=>Dq(),"no-self-compare":()=>Iq(),"no-sequences":()=>Rq(),"no-setter-return":()=>Fq(),"no-shadow":()=>_q(),"no-shadow-restricted-names":()=>Bq(),"no-spaced-func":()=>Lq(),"no-sparse-arrays":()=>Nq(),"no-sync":()=>Mq(),"no-tabs":()=>$q(),"no-template-curly-in-string":()=>jq(),"no-ternary":()=>qq(),"no-this-before-super":()=>Qq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Uq(),"no-undef":()=>Wq(),"no-undef-init":()=>Gq(),"no-undefined":()=>zq(),"no-underscore-dangle":()=>Zq(),"no-unexpected-multiline":()=>Xq(),"no-unmodified-loop-condition":()=>Yq(),"no-unneeded-ternary":()=>Hq(),"no-unreachable":()=>Kq(),"no-unreachable-loop":()=>Jq(),"no-unsafe-finally":()=>e6(),"no-unsafe-negation":()=>t6(),"no-unsafe-optional-chaining":()=>r6(),"no-unused-expressions":()=>n6(),"no-unused-labels":()=>s6(),"no-unused-private-class-members":()=>i6(),"no-unused-vars":()=>a6(),"no-use-before-define":()=>o6(),"no-useless-assignment":()=>l6(),"no-useless-backreference":()=>u6(),"no-useless-call":()=>c6(),"no-useless-catch":()=>f6(),"no-useless-computed-key":()=>p6(),"no-useless-concat":()=>h6(),"no-useless-constructor":()=>d6(),"no-useless-escape":()=>m6(),"no-useless-rename":()=>g6(),"no-useless-return":()=>y6(),"no-var":()=>b6(),"no-void":()=>v6(),"no-warning-comments":()=>x6(),"no-whitespace-before-property":()=>O6(),"no-with":()=>S6(),"nonblock-statement-body-position":()=>E6(),"object-curly-newline":()=>C6(),"object-curly-spacing":()=>w6(),"object-property-newline":()=>k6(),"object-shorthand":()=>A6(),"one-var":()=>P6(),"one-var-declaration-per-line":()=>T6(),"operator-assignment":()=>D6(),"operator-linebreak":()=>I6(),"padded-blocks":()=>R6(),"padding-line-between-statements":()=>F6(),"prefer-arrow-callback":()=>_6(),"prefer-const":()=>B6(),"prefer-destructuring":()=>L6(),"prefer-exponentiation-operator":()=>N6(),"prefer-named-capture-group":()=>M6(),"prefer-numeric-literals":()=>$6(),"prefer-object-has-own":()=>j6(),"prefer-object-spread":()=>q6(),"prefer-promise-reject-errors":()=>Q6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>U6(),"prefer-rest-params":()=>W6(),"prefer-spread":()=>G6(),"prefer-template":()=>z6(),"quote-props":()=>Z6(),quotes:()=>X6(),radix:()=>Y6(),"require-atomic-updates":()=>H6(),"require-await":()=>K6(),"require-unicode-regexp":()=>J6(),"require-yield":()=>e8(),"rest-spread-spacing":()=>t8(),semi:()=>r8(),"semi-spacing":()=>n8(),"semi-style":()=>s8(),"sort-imports":()=>i8(),"sort-keys":()=>o8(),"sort-vars":()=>l8(),"space-before-blocks":()=>u8(),"space-before-function-paren":()=>c8(),"space-in-parens":()=>f8(),"space-infix-ops":()=>p8(),"space-unary-ops":()=>h8(),"spaced-comment":()=>d8(),strict:()=>m8(),"switch-colon-spacing":()=>g8(),"symbol-description":()=>y8(),"template-curly-spacing":()=>b8(),"template-tag-spacing":()=>v8(),"unicode-bom":()=>x8(),"use-isnan":()=>O8(),"valid-typeof":()=>S8(),"vars-on-top":()=>E8(),"wrap-iife":()=>C8(),"wrap-regex":()=>w8(),"yield-star-spacing":()=>k8(),yoda:()=>A8()})),Xy}var Yy,VT;function P8(){if(VT)return Yy;VT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,H$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Yy=s,Yy}var Hy,UT;function T8(){if(UT)return Hy;UT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Hy=a,Hy}var Ky,WT;function GT(){if(WT)return Ky;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Ky={startTime:c,endTime:s},Ky}var Jy,zT;function D8(){if(zT)return Jy;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Jy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Jy}var I8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:I8},eb,XT;function YT(){if(XT)return eb;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return eb={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},eb}var tb={},rb={},nb,HT;function R8(){if(HT)return nb;HT=1,nb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return sb}var ib,JT;function _8(){if(JT)return ib;JT=1;var c=R8(),s=F8();ib=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],V;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,U=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}V.push(ue)}}else V=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var V="",Q=!!G.nocase,$=!1,W=[],K=[],te,U=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":V+=d,Q=!0;break;case"?":V+=a,Q=!0;break;default:V+="\\"+te;break}ne.debug("clearStateChar %j %j",te,V),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=V.slice(0,pt.reStart),qt=V.slice(pt.reStart,pt.reEnd-8),Vt=V.slice(pt.reEnd-8,pt.reEnd),tr=V.slice(pt.reEnd);Vt+=tr;var fe=kt.split("(").length-1,Ue=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var V=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=U===te,this.debug("string match",te,U,ne)):(ne=U.match(te),this.debug("pattern match",te,U,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ab}var So={},tD;function L8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=B8(),p=$i(),a=L8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function V(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function U(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,U(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await V(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(rb)),rb}var ob,sD;function iD(){if(sD)return ob;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ob={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ob}var lb,aD;function ub(){if(aD)return lb;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(V){return typeof V=="object"&&V!==null}function p(V){return u(V)&&!Array.isArray(V)}function a(V){return typeof V>"u"}function d(V,Q,$=new Map){let W=$.get(V);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(V,W);const K={...V,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(V,te))continue;const U=V[te],ae=Q[te];p(U)&&p(ae)?K[te]=d(U,ae,$):a(ae)&&(K[te]=U)}return K}function v(V){const Q=Array.isArray(V)?V.slice(0):[V];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(V){for(const Q of Object.keys(V))if(typeof V[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(V,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(V,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(V,Q){if(typeof s.get(Q)>"u")throw new O(V,Q)}function g(V){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(V))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${V}".`)}function f(V){if(!u(V))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(V,Q){const $=Q===void 0?V:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(V){if(!(k.has(V)||typeof V=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(V={},Q={}){return d(V,Q)},validate:"object"},R={merge(V={},Q={}){const $=d(V,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??V[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(V={},Q={}){const $=new Set([...Object.keys(V),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in V&&K in Q&&V[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||V[K]}return W},validate(V){if(V===null||typeof V!="object")throw new TypeError("Expected an object.");if(Array.isArray(V))throw new S(V);for(const Q of Object.keys(V))if(Q!=="__proto__"&&(V[Q]===null||typeof V[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(V){if(typeof V=="string")g(V);else if(V&&typeof V=="object"){if(typeof V.preprocess!="function"||typeof V.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(V={},Q={}){const $={...V,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in V)||!(W in Q))continue;const K=v(V[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(V){f(V);for(const Q of Object.keys(V)){if(Q==="__proto__")continue;const $=V[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(V){return{merge:"replace",validate(){throw new b(V)}}}return lb={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(V=>[V,L(V)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},lb}var cb={},fb,oD;function N8(){if(oD)return fb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return fb={validateLanguageOptions:o},fb}var pb,lD;function uD(){if(lD)return pb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=Gl(),p=jc(),a=wl(),{validateLanguageOptions:d}=N8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return pb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},pb}var cD;function M8(){if(cD)return cb;cD=1;const c=QT();return cb.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Al(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],cb}var hb={},$8="http://json-schema.org/draft-04/schema#",j8="http://json-schema.org/draft-04/schema#",q8="Core schema meta-schema",Q8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",U8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},W8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},G8={id:$8,$schema:j8,description:q8,definitions:Q8,type:V8,properties:U8,dependencies:W8,default:{}},db,fD;function z8(){if(fD)return db;fD=1;const c=f1(),s=G8;return db=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},db}var pD;function hD(){if(pD)return hb;pD=1;const s=z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return hb.RuleValidator=o,hb}var mb,dD;function Z8(){var x,g;if(dD)return mb;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=ub(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,mb={Config:O},mb}var mD;function X8(){if(mD)return tb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=ub(),{defaultConfig:p}=M8(),{Config:a}=Z8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return tb.FlatConfigArray=O,tb}var gb,gD;function Y8(){return gD||(gD=1,gb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),gb}var yb,yD;function bD(){if(yD)return yb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return yb={VFile:u},yb}var bb,vD;function H8(){if(vD)return bb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return bb={ParserService:c},bb}var vb={},xD;function K8(){if(xD)return vb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return vb.FileContext=c,vb}var xb,OD;function J8(){if(OD)return xb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return xb={ProcessorService:u},xb}var Ob,SD;function e9(){var Ve,Sx,Oe,Ex;if(SD)return Ob;SD=1;const c=ao,s=jc(),u=wl(),p=Al(),a=vL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=tp(),{SourceCode:O}=BE(),x=U$(),{ConfigCommentParser:g}=RE(),f=z$(),b=Y$(),S=P8(),E=gE(),k=T8(),D=D8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=X8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=ub(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:V,inactiveFlags:Q}=Y8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,U=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=H8(),{FileContext:pe}=K8(),{ProcessorService:Be}=J8(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(U.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=U.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,U.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(U.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=U.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Vt(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},U.parseListConfig(U.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ue(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ue(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Vt(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Ut(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Ut(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function pr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ve);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!V.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ve,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ve,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Vt(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},Ob={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},Ob}function t9(){return e9().Linter}var r9=l.Linter=t9();t.Linter=r9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(mH,dc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=bl.define(t);return[r,E_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const yH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class UI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",...Array.isArray(e.class)?e.class:[e.class]]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[OX,ml.of([Fz]),gY(),xX(),pX(xY(new dc.Linter,{languageOptions:{globals:{...dH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),yH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class bH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class vH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(bH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Su="workshop-data-light@0.2.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Su+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Su+e,t(l.current)),l.persist=h=>localStorage.setItem(Su+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Su+e),l}class xH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Cu,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??Y9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??e4,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const OH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(xH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var fl,na,Ma;class SH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new yV);or(this,"__module",Ds);An(this,fl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=C9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:s4}),zt("span",null,document.title)),zt("a",{innerHTML:t4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(UI,{class:["editor-code",{"is-active":_9(this.state.dataMode)}],ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(UI,{class:["editor-data",{"is-active":this.state.dataMode}],ref:this.ref("data"),content:this.store.data}),zt(vH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Cu,null,zt(Hs,{class:"data-code-toggler",icon:Eu(this.state.dataMode,t=>t?n4:r4),label:Eu(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Hs,{icon:H9,title:"Commencer un nouveau programme","event-click":t=>OH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),zt(Cu,null,zt(Cu,{compact:!0},zt(Hs,{icon:Eu(this.state.running,t=>t?J9:K9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames}),zt("hr",null),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,fl)),Cr(this,fl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await SV({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}fl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(SH,null)); diff --git a/assets/index-8356b2ba.js b/assets/index-8356b2ba.js new file mode 100644 index 0000000..0749911 --- /dev/null +++ b/assets/index-8356b2ba.js @@ -0,0 +1,230 @@ +var n9=Object.defineProperty;var s9=(n,e,t)=>e in n?n9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(s9(n,typeof e!="symbol"?e+"":e,t),t),Eb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Eb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Eb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Eb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function i9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let wb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),kb=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}wb=t??"",e||(r[n]=wb),(e||a9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,wb)}};function o9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};Cb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{kb(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&kb(e,i)(t,n)}}function l9(n){return Array.isArray(n)?n:[n]}function pl(n,e){if(Array.isArray(n))return u9(n,e);if(n instanceof window.Element)return p9(n);if(n===null||typeof n!="object"||!n.vnode)return c9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return f9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return h9(n,t,e);if(n.isComponent)return AD(n,t,e)}function u9(n,e){n=l9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=O9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":x9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},E9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(E9);function C9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var dc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Qo=!1,wx=!1,kx,fi;function Bu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Qo?null:dc.requestAnimationFrame(Bu),Qo&&(Qo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function w9(n,e){Ax(qa,n,e)&&mc()}function k9(n,e){Ax(ja,n,e)&&mc()}function A9(n,e){Ax(Ki,n,e)&&WI()}function P9(n){Px(qa,n)&&mc()}function T9(n,e){Px(ja,n)&&mc()}function D9(n){Px(Ki,n)&&Tx()}function WI(n){Qo=!1,!xi&&(n=!!n,Ji=null,n?Bu():xi=dc.requestAnimationFrame(Bu))}function I9(){xi||(Qo=!0,Ji=null,xi=dc.requestAnimationFrame(Bu))}function Tx(){xi&&(dc.cancelAnimationFrame(xi),xi=null)}function R9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:A9,addAfter:k9,addBefore:w9,remove:D9,removeAfter:T9,removeBefore:P9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:I9,dispose:R9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Ab(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Ab(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Ab(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Ab(this,e),e=e.next}},F9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends F9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Pb(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},_9="ui-backdrop-1l3kn107",B9={backdrop:_9,"loader-spin":"ui-loader-spin-1l3kn1"};class L9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[B9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const N9="ui-button-1urez107",M9="ui-button__label-1urez161",$9="ui-button__icon-1urez171",Tb={button:N9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:M9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:$9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const j9="ui-input-ada4i107",q9="ui-input__icon-ada4i150",ko={input:j9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const Q9="ui-modal-1ng3s107",V9="ui-modal__header-1ng3s119",U9="ui-modal__title-1ng3s125",W9="ui-modal__content-1ng3s129",Po={modal:Q9,modal__header:V9,modal__title:U9,modal__content:W9,"loader-spin":"ui-loader-spin-1ng3s1"},G9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(L9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:G9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const z9="ui-toolbar-1r0eh107",Z9={toolbar:z9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Eu extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[Z9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const X9=` + + +`,Y9=` + + + +`,H9=` + + + +`,K9=` + + + +`,J9=` + + +`,e4=` + + + + + + +`,FD=` + + + + +`,t4=` + + + + +`,r4=` + + + + +`,_D=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,n4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nh4(d4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},JI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])JI[`[object ${n}]`]=n.toLowerCase();function dr(n){return JI[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:gc,min:eR,max:tR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=gc*2,Db=gc/3,m4=gc/180,g4=180/gc;function rR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const y4="3.1.2",hr=(...n)=>new Ct(...n);hr.version=y4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},b4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,v4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,nR=n=>{if(n.match(b4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(v4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Yl}=Math,sR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Yl(e),t=Yl(t),r=Yl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Yl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=sR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return nR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},x4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=x4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Zo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=O4(e,t,r),[C,A,_]=iR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},O4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},iR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=aR(e,t,r),[A,_,B]=S4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function S4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const aR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const E4=(...n)=>new Ct(...n,"lab");Object.assign(hr,{lab:E4,getLabWhitePoint:Zo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:C4}=Math,w4=1e-7,k4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=k4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return A4(...this._rgb.slice(0,3))};const A4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:C4((n+.055)/1.055,2.4)),bn={},Va=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Va(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:P4,cos:T4}=Math,oR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*m4,[e,T4(r)*t,P4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=oR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},D4=(...n)=>{const e=rR(ur(n,"hcl"));return Fx(...e)},{sqrt:I4,atan2:R4,round:F4}=Math,lR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=I4(t*t+r*r);let l=(R4(r,t)*g4+360)%360;return F4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return rR(_x(this._rgb))};const _4=(...n)=>new Ct(...n,"lch"),B4=(...n)=>new Ct(...n,"hcl");Object.assign(hr,{lch:_4,hcl:B4});lr.format.lch=Fx;lr.format.hcl=D4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Va(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Va(this,"black",n,...e)};const L4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=L4;const{sqrt:_b,pow:Oa}=Math,N4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=N4;const M4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=M4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},uR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=uR;bn.hcl=uR;const $4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},j4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return j4(this._rgb)};const q4=(...n)=>new Ct(...n,"num");Object.assign(hr,{num:q4});lr.format.num=$4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const Q4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=Q4;const{floor:V4}=Math,U4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=V4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},W4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=eR(e,t,r),l=tR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return W4(this._rgb)};const G4=(...n)=>new Ct(...n,"hcg");hr.hcg=G4;lr.format.hcg=U4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=z4;const{cos:Sa}=Math,Z4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:X4,sqrt:Y4,acos:H4}=Math,K4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=X4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=Y4((e-t)*(e-t)+(e-r)*(t-r)),i=H4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return K4(this._rgb)};const J4=(...n)=>new Ct(...n,"hsi");hr.hsi=J4;lr.format.hsi=Z4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const eQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=eQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},cR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=eR(e,t,r),l=tR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return cR(this._rgb)};const tQ=(...n)=>new Ct(...n,"hsl");hr.hsl=tQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const rQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=rQ;const{floor:nQ}=Math,sQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=nQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:iQ,max:aQ}=Math,oQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=iQ(e,t,r),l=aQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return oQ(this._rgb)};const lQ=(...n)=>new Ct(...n,"hsv");hr.hsv=lQ;lr.format.hsv=sQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const uQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=uQ;function Lu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=cQ([e,t,r]),[A,_,B]=iR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function cQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Lu(t,n);return Lu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=aR(e,t,r);return[...fQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Lu(e,n);return Lu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const pQ=(...n)=>new Ct(...n,"oklab");Object.assign(hr,{oklab:pQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const hQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=hQ;const dQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=dQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:mQ}=Math,gQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return yQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},yQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:bQ}=Math;function Nu(n){let e="rgb",t=hr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&hr.brewer&&hr.brewer[Ye.toLowerCase()]&&(Ye=hr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=bQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=hr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=hr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=hr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Ur=20;for(;Math.abs(er)>.01&&Ur-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=vQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return hr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=hr(Ye),ot):t},ot}function vQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const xQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=xQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},SQ=n=>{const e=OQ(n);return e.scale=()=>Nu(e),e},{round:fR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(fR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:fR(e):e)};const EQ=(...n)=>new Ct(...n,"rgb");Object.assign(hr,{rgb:EQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=hr(t).rgb(),i=hr(e).rgb();return hr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},CQ=n=>n,wQ=(n,e)=>n*e/255,kQ=(n,e)=>n>e?e:n,AQ=(n,e)=>n>e?n:e,PQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),TQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),DQ=(n,e)=>255*(1-(1-e/255)/(n/255)),IQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(CQ));ms.multiply=Di(Ii(wQ));ms.screen=Di(Ii(PQ));ms.overlay=Di(Ii(TQ));ms.darken=Di(Ii(kQ));ms.lighten=Di(Ii(AQ));ms.dodge=Di(Ii(IQ));ms.burn=Di(Ii(DQ));const{pow:RQ,sin:FQ,cos:_Q}=Math;function BQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=RQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=_Q(_),me=FQ(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return hr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>hr.scale(C),C.hue(t),C}const LQ="0123456789abcdef",{floor:NQ,random:MQ}=Math,$Q=()=>{let n="#";for(let e=0;e<6;e++)n+=LQ.charAt(NQ(MQ()*16));return new Ct(n,"hex")},{log:ND,pow:jQ,floor:qQ,abs:QQ}=Math;function pR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>hR(t,r,i),t}function hR(n,e="equal",t=7){dr(n)=="array"&&(n=pR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const VQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,UQ=5e-4,WQ=.1,$D=1.14,Hl=.022,jD=1.414,GQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Va(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Hl?t:t+Math.pow(Hl-t,jD),l=r>=Hl?r:r+Math.pow(Hl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:zQ,max:ZQ,atan2:QD,abs:VD,cos:Kl,sin:UD,exp:XQ,PI:WD}=Math;function YQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=VD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Kl(h(Nt-30))+.24*Kl(h(2*Nt))+.32*Kl(h(3*Nt+6))-.2*Kl(h(4*Nt-63));let Yt=_t-It;Yt=VD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*UD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Ur=1+.045*ot,On=1+.015*ot*At,qr=30*XQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*UD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Ur),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Ur))*(Yt/(i*On)));return ZQ(0,zQ(100,hn))}function HQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const KQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},JQ={cool(){return Nu([hr.hsl(180,1,.9),hr.hsl(250,.7,.4)])},hot(){return Nu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},dR=Object.keys(vv),GD=new Map(dR.map(n=>[n.toLowerCase(),n])),eV=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(dR)}}):vv,tV=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,rV=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return rV(this._rgb)};const nV=(...n)=>new Ct(...n,"cmyk");Object.assign(hr,{cmyk:nV});lr.format.cmyk=tV;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const sV=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},iV=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},aV=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},oV=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},mR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},lV=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,uV=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return sV(cR(e),t);if(t.substr(0,3)==="lab"){const r=Zo();Ks("d50");const i=iV(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Zo();Ks("d50");const i=aV(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?oV(Lx(e)):t.substr(0,5)==="oklch"?lV(mR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},gR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=oR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Mu=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,yc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,yR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),bR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),vR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),xR=new RegExp("^hsla?\\("+rs+[yc,Mu,Mu].join(eo)+to+"\\)$"),OR=new RegExp("^hsl?\\("+rs+[yc,Mu,Mu].join(Nx)+rs+"\\)$"),SR=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ER=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),CR=new RegExp("^lch\\("+rs+[ds,ds,yc].join(eo)+to+"\\)$"),wR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),kR=new RegExp("^oklch\\("+rs+[ds,ds,yc].join(eo)+to+"\\)$"),{round:AR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(AR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(yR))||(e=n.match(bR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(vR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(xR))||(e=n.match(OR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(SR)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=AR(r[i]);return r[3]=+e[4],r}if(e=n.match(ER)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Zo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Zo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(gR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>yR.test(n)||xR.test(n)||ER.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||bR.test(n)||vR.test(n)||OR.test(n)||SR.test(n)||n==="transparent";Ct.prototype.css=function(n){return uV(this._rgb,n)};const cV=(...n)=>new Ct(...n,"css");hr.css=cV;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const fV=(...n)=>new Ct(...n,"gl");hr.gl=fV;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return sR(this._rgb,n)};const pV=(...n)=>new Ct(...n,"hex");hr.hex=pV;lr.format.hex=nR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:Jl}=Math,PR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*Jl(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*Jl(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*Jl(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*Jl(r),i=255),[t,r,i,1]},{round:hV}=Math,dV=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=PR(C);A[2]/A[0]>=r/t?l=C:i=C}return hV(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return dV(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(hr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=PR;Ct.prototype.oklch=function(){return mR(this._rgb)};const mV=(...n)=>new Ct(...n,"oklch");Object.assign(hr,{oklch:mV});lr.format.oklch=gR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(hr,{analyze:pR,average:gQ,bezier:SQ,blend:ms,brewer:eV,Color:Ct,colors:Qa,contrast:VQ,contrastAPCA:GQ,cubehelix:BQ,deltaE:YQ,distance:HQ,input:lr,interpolate:Va,limits:hR,mix:Va,random:$Q,scale:Nu,scales:JQ,valid:KQ});class gV{constructor(){or(this,"PROPERTIES",{...p4,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:hr,rgb:(e=0,t=e,r=t=e)=>hr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>hr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{for(let i=Math.round(e);i{this.line(0,this.ledCount,e)},gradient:(e,t,r,i)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))yV(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let r=0;r"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(bV);const vV=xv;var ea={},xV={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ua(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ua(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new TR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new DR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=EV(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new CV(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=Cu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Ua(this,e,t);let i=Cu(this.text,Cu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Ua(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function EV(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Cu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class TR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class DR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=TR.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=function(){return this});class CV{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ua(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?IR:kV)(n,e,r)}function IR(n,e,t){if(e==n.length)return e;e&&RR(n.charCodeAt(e))&&FR(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function kV(n,e,t){for(;e>0;){let r=IR(n,e-2,t);if(r=56320&&n<57344}function FR(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!FR(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return RR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Xo(n),C=new Xo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Xo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function BR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new wu([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new wu(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new wu(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class wu{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=ju(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new LR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class LR{constructor(e,t){this.inner=e,this.prec=t}}class bc{of(e){return new wv(this,e)}reconfigure(e){return bc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class $u{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of PV(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>AV($e,me,ie))}}let q=_.map(Y=>Y(C));return new $u(e,h,q,C,A,l)}}function PV(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof LR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof wu)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Uo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function ju(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const NR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),MR=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),$R=$t.define(),jR=$t.define(),qR=$t.define(),QR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new TV}}class TV{of(e){return new ri(this,e)}}class DV{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new DV(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&BR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function IV(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=UR(e,Ia(l),!1)}return n}function FV(n){let e=n.startState,t=e.facet(qR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const _V=[];function Ia(n){return n==null?_V:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const BV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function LV(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||BV.test(t)))return!0}return!1}function NV(n){return e=>{if(!/\S/.test(e))return Br.Space;if(LV(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=$u.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=$u.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return BR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(QR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(NR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return NV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=MR;Sr.readOnly=QR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=NR;Sr.changeFilter=$R;Sr.transactionFilter=jR;Sr.transactionExtender=qR;bc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class WR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new WR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new GR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Yo.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yo.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?MV(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function MV(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new GR(h,t,r,l));return i.length==1?i[0]:new Yo(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yo.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){eu(this.active,e),eu(this.activeTo,e),eu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;tu(this.active,t,r),tu(this.activeTo,t,i),tu(this.activeRank,t,l),e&&tu(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&eu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new $V(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class $V{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},jV=typeof navigator<"u"&&/Mac/.test(navigator.platform),qV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ho[un]=String.fromCharCode(un);for(var qb in ki)Ho.hasOwnProperty(qb)||(Ho[qb]=ki[qb]);function QV(n){var e=jV&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||qV&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ho:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ko(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function ku(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function Jo(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wo(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function vc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function VV(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function zR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function UV(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=VV(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=zR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class GV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function ZR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function HR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!qu(t))r=oa(t),t=t.parentNode;else return null}}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Vx){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function eF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:xc,ie_version:rF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:nF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const XV=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>XV||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return YV(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(XR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return sF(this,e)}coordsAt(e,t){return aF(this,e,t)}}function YV(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?vc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Vx;function sF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?iF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function aF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function KV(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=oF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new dl(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class hl extends Ht{constructor(e){let{start:t,end:r}=oF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof hl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Qu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}hl.prototype.point=!1;class dl extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof dl&&this.spec.class==e.spec.class&&Qu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}dl.prototype.mapMode=cn.TrackBefore;dl.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&JV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function oF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function JV(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),tF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Qu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){iF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return sF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(XR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=Jo(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=aF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Go{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ru(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(ru(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(ru(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(ru(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new Go(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function ru(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Ux=Rr.RTL;function lF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function cF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function iU(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Uv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Uv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function fF(n){return[new vi(0,n,0)]}let pF="";function oU(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),pF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),xF=$t.define({combine:n=>n.some(e=>e)}),OF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const nu=sr.define({map:(n,e)=>n.map(e)}),SF=sr.define();function Tn(n,e,t){let r=n.facet(gF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let uU=0;const Lo=$t.define();class Vr{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Vr(uU++,e,r,i,C=>{let A=[Lo.of(C)];return h&&A.push(el.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Vr.define(r=>new e(r),t)}}class Vb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const EF=$t.define(),zx=$t.define(),el=$t.define(),CF=$t.define(),Zx=$t.define(),wF=$t.define();function p2(n,e){let t=n.state.facet(wF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=lU(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const kF=$t.define();function AF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(kF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const No=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Vu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Vu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!gU(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?fU(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=dU(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=Go.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=Go.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=Go.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);eF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(SF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&ku(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&cU(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Wo(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Wo(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&mU(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Ko(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=pU(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?HR:KR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Wo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ko(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?Jo(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=Jo(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new JR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(el).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(CF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=AF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;UV(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function yU(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function vU(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Ub(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=Jo(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Ub(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=bU(e,Qe),ct=vU(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Ub(B,Qe)?B=m2(B,Qe.bottom):q&&Ub(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function TF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&xU(Qe,Je,B)||Qt.chrome&&OU(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function xU(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function OU(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function SU(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=oU(i,l,h,C,t),B=pF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function EU(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function CU(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=TF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Au(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(kU(e,r.node,r.offset)?t:0))}}function kU(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class AU{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:DU(e),A=new wU(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=IU(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=PU(n,e,t));return n.state.facet(yF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function PU(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&PF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function TU(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function DU(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function IU(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class RU{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&ZU(e.contentDOM.ownerDocument)}handleEvent(e){!jU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=FU(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&RF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=IF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||_U.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function FU(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const IF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],_U="dthko",RF=[16,17,18,20,91,92,224,225],su=6;function iu(n){return Math.max(0,n)*.7+8}function BU(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class LU{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=WV(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&NU(e,t),this.dragging=$U(e,t)&&BF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&BU(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=AF(this.view);e.clientX-A.left<=i+su?t=-iu(i-e.clientX):e.clientX+A.right>=h-su&&(t=iu(e.clientX-h)),e.clientY-A.top<=l+su?r=-iu(l-e.clientY):e.clientY+A.bottom>=C-su&&(r=iu(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function NU(n,e){let t=n.state.facet(hF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function MU(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function $U(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Ko(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function jU(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),FF=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function qU(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),_F(n,t.value)},50)}function Oc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function _F(n,e){e=Oc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(mF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=UU(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new LU(n,e,t,r)),r&&n.observer.ignore(()=>{ZR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return yU(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function QU(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:QU(n,t,e.clientX,e.clientY)}}const VU=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function BF(n){if(!VU)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function UU(n,e){let t=E2(n,e),r=BF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=WU(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function WU(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Oc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Oc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&MU(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=FF?null:e.clipboardData;return t?(_F(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(qU(n),!1)};function GU(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function zU(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Oc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=zU(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=FF?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(GU(n,t),!1)};const LF=ri.define();function NF(n,e){let t=[];for(let r of n.facet(bF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:LF.of(!0)}):null}function MF(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=NF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),MF(n)};ns.blur=n=>{n.observer.clearSelectionRange(),MF(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=IF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function ZU(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class XU{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Pu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends $F{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Un||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Un(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Pu&&(A=-2);let Y=new Un(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Pu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Pu)&&(za=!0),Uu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class HU extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Uu(this.left,e),this.right=Uu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const KU=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Un?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Un(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=KU)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let t=new Un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function r7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new XU(t),this.stateDeco=e.facet(el).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new au(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push($o(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(el).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,JU(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=zR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=YR(e.scrollDOM);let me=(this.printing?r7:t7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new YU(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new au(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||$o(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||$o(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return $o(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class au{constructor(e,t){this.from=e,this.to=t}}function s7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function lu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function i7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function $o(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>$o(i,e)):n._content)}const uu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),jF=wi.newName(),qF=wi.newName(),QF={"&light":"."+jF,"&dark":"."+qF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const a7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},QF),o7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class l7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new GV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new c7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!ku(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Wo(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ko(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&u7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=ku(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&ku(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new AU(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=DF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Wo(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function u7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class c7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:SF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ko(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||zV(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(nu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Lo).map(i=>new Vb(i));for(let i of this.plugins)i.update(this);this.observer=new l7(this),this.inputState=new RU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(LF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=NF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Vu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(nu)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Wu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(No)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(uu)!=i.state.facet(uu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!DF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(Lo).map(r=>new Vb(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Lo),r=e.state.facet(Lo);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Vb(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(YR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Vu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?qF:jF)+" "+this.state.facet(uu)}updateAttrs(){let e=N2(this,EF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(No);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(a7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>EU(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return SU(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,CU(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),TF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return vc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(vF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>f7)return fF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||cF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=aU(e.text,t,r);return this.bidiCache.push(new Wu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ZR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return nu.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return nu.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Vr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[uu.of(r),No.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(No.of(Kv("."+Hv,e,QF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=No;Mt.inputHandler=yF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=OF;Mt.focusChangeEffect=bF;Mt.perLineTextDirection=vF;Mt.exceptionSink=gF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=mF;Mt.dragMovesSelection=dF;Mt.clickAddsSelectionRange=hF;Mt.decorations=el;Mt.outerDecorations=CF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=wF;Mt.scrollMargins=kF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=EF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const f7=4096,L2={};class Wu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const p7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function h7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function m7(n,e,t){return UF(VF(n.state),e,n,t)}let gi=null;const g7=4e3;function y7(n,e=p7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>h7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},g7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function UF(n,e,t,r){Jv=e;let i=QV(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",RF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+cu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+cu(me,e,!0)])||e.shiftKey&&(_e=Ho[e.keyCode])!=i&&_e!=me&&Y(ie[C+cu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+cu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class gl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=WF(e);return[new gl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return b7(e,t,r)}}function WF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function b7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=WF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Ur.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function v7(n,e){return n.constructor==e.constructor&&n.eq(e)}class x7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Tu)!=e.state.facet(Tu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Tu);for(;t!v7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Tu=$t.define();function GF(n){return[Vr.define(e=>new x7(e,n)),Tu.of(n)]}const zF=!Qt.ios,tl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function O7(n={}){return[tl.of(n),S7,E7,C7,xF.of(!0)]}function ZF(n){return n.startState.facet(tl)!=n.state.facet(tl)}const S7=GF({above:!0,markers(n){let{state:e}=n,t=e.facet(tl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||zF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of gl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ZF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(tl).cursorBlinkRate+"ms"}const E7=GF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:gl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ZF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const C7=Ri.highest(Mt.theme(ex)),XF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),jo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(XF)?r.value:t,n)}}),w7=Vr.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(jo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(jo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(jo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(jo)!=n&&this.view.dispatch({effects:XF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function k7(){return[jo,w7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function A7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class P7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of A7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",T7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),D7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function I7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Du=$t.define({combine(n){let e=bs(n,{render:null,specialChars:T7,addSpecialChars:null});return(e.replaceTabs=!I7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function R7(n={}){return[Du.of(n),F7()]}let Q2=null;function F7(){return Q2||(Q2=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Du)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new P7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new N7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new L7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Du);n.startState.facet(Du)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const _7="•";function B7(n){return n>=32?_7:n==10?"␤":String.fromCharCode(9216+n)}class L7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=B7(this.code),r=e.state.phrase("Control character")+" "+(D7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class N7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function M7(){return j7}const $7=Ht.line({class:"cm-activeLine"}),j7=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push($7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function Q7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function V2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?Q7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function V7(n,e){let t=V2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=V2(n,i);if(!C)return r;let A=q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function U7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?V7(t,r):null)}const W7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},G7={style:"cursor: crosshair"};function z7(n={}){let[e,t]=W7[n.key||"Alt"],r=Vr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?G7:null})]}const Io="-10000px";class YF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function Z7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||Z7}}}),U2=new WeakMap,Kx=Vr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new YF(n,Sc,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=U2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||Y7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),X7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Y7={x:0,y:0},Sc=$t.define({enables:[Kx,X7]}),Gu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Ec{static create(e){return new Ec(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new YF(e,Gu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const H7=Sc.compute([Gu],n=>{let e=n.facet(Gu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Ec.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class K7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Ec.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!J7(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!eW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const fu=4;function J7(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-fu&&e.clientX<=r+fu&&e.clientY>=i-fu&&e.clientY<=l+fu}function eW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function tW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(rW)&&(i=[]);return i},provide:i=>Gu.from(i)});return{active:r,extension:[r,Vr.define(i=>new K7(i,n,r,t,e.hoverTime||300)),H7]}}function HF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const rW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function rl(n,e){let t=n.plugin(KF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const KF=Vr.fromClass(class{constructor(n){this.input=n.state.facet(nl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new pu(n,!0,e.topContainer),this.bottom=new pu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new pu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new pu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(nl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class pu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const nl=$t.define({enables:KF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Iu=$t.define(),nW=$t.define(),sW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},zo=$t.define();function JF(n){return[e_(),zo.of(Object.assign(Object.assign({},sW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function e_(n){let e=[iW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const iW=Vr.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Iu),this.view.viewport.from),r=[],i=this.gutters.map(l=>new aW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(zo),t=n.state.facet(zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Iu),n.state.facet(Iu),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class aW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new t_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(nW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new t_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class t_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),oW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const cW=zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(lW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(uW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function fW(n={}){return[Aa.of(n),e_(),cW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(pW.range(i)))}return gr.of(e)});function dW(){return hW}const r_=1024;let mW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=mW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const gW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):gW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return xW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function sl(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(n_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new yW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class yW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends s_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function i_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(sl(C,e,t,!1))}}return i?i_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function xW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=r_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Ur=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Vs=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Vs>=0&&C.id==Vs&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Vs,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Vs,_t+1);if(Vs>=0&&si>0&&si-1&&si>0){let El=ie(Ur,$r);On=rO(Ur,hn,dn,0,hn.length,0,Yt-At,El,El)}else On=_e(Ur,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Ur=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Ur,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Ru(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Ru(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class OW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class SW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let EW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=EW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Zu(e);return r=>r.modified.indexOf(t)>-1?r:Zu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let CW=0;class Zu{constructor(e){this.name=e,this.instances=[],this.id=CW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&wW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=kW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Zu.get(C,A));return l}}function wW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function kW(n){let e=[[]];for(let t=0;tr.length-t.length)}function o_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Xu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return l_.add(e)}const l_=new mr;class Xu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function AW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function PW(n,e,t,r=0,i=n.length){let l=new TW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class TW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=DW(e)||Xu.empty,q=AW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function DW(n){let e=n.type.prop(l_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,du=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),mu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),gu=Ft(),re={comment:du,lineComment:Ft(du),blockComment:Ft(du),docComment:Ft(du),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:mu,docString:Ft(mu),character:Ft(mu),attributeValue:Ft(mu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:gu,documentMeta:Ft(gu),annotation:Ft(gu),processingInstruction:Ft(gu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}u_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function c_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Yu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class IW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Hu{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Hu(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new IW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends a_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Hu.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let f_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(f_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,RW=Vr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=f_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,RW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class FW{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const _W=$t.define(),Cc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ku(n){let e=n.facet(Cc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function il(n,e){let t="",r=n.tabSize,i=n.facet(Cc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?BW(n,t,e):null}class wc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ku(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const p_=new mr;function BW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return h_(r,n,t)}function h_(n,e,t){for(let r=n;r;r=r.next){let i=NW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function LW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function NW(n){let e=n.type.prop(p_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>d_(h,!0,1,void 0,l&&!LW(h)?i.from:void 0)}return n.parent==null?MW:null}function MW(){return 0}class iO extends wc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if($W(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return h_(this.context.next,this.base,this.pos)}}function $W(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function jW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function qW({closing:n,align:e=!0,units:t=1}){return r=>d_(r,e,t,n)}function d_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?jW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const QW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const VW=200;function UW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+VW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=il(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const WW=$t.define(),m_=new mr;function GW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function ZW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Ju(n,e,t){for(let r of n.facet(WW)){let i=r(n,e,t);if(i)return i}return zW(n,e,t)}function g_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const kc=sr.define({map:g_}),yl=sr.define({map:g_});function y_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(kc)&&!XW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new rG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(yl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function XW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function b_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(x_()))}const YW=n=>{for(let e of y_(n)){let t=Ju(n.state,e.from,e.to);if(t)return n.dispatch({effects:b_(n.state,[kc.of(t),v_(n,t)])}),!0}return!1},HW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of y_(n)){let r=ec(n.state,t.from,t.to);r&&e.push(yl.of(r),v_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function v_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const KW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(yl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},eG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:YW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:HW},{key:"Ctrl-Alt-[",run:KW},{key:"Ctrl-Alt-]",run:JW}],tG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,tG)}});function x_(n){let e=[ca,iG];return n&&e.push(aO.of(n)),e}function O_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=ec(n.state,C.from,C.to);A&&n.dispatch({effects:yl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return O_(n,null)}}});class rG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return O_(e,this.value)}}const nG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function sG(n={}){let e=Object.assign(Object.assign({},nG),n),t=new nv(e,!0),r=new nv(e,!1),i=Vr.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=ec(h.state,A.from,A.to)?r:Ju(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,JF({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=ec(h.state,C.from,C.to);if(_)return h.dispatch({effects:yl.of(_)}),!0;let B=Ju(h.state,C.from,C.to);return B?(h.dispatch({effects:kc.of(B)}),!0):!1}})}),x_()]}const iG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=u_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new bl(e,t||{})}}const lx=$t.define(),S_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(S_)}function E_(n,e){let t=[oG],r;return n instanceof bl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(S_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class aG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)PW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const oG=Ri.high(Vr.fromClass(aG,{decorations:n=>n.decorations})),lG=bl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),uG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),C_=1e4,w_="()[]{}",k_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:w_,maxScanDistance:C_,renderMatch:pG})}}),cG=Ht.mark({class:"cm-matchingBracket"}),fG=Ht.mark({class:"cm-nonmatchingBracket"});function pG(n){let e=[],t=n.matched?cG:fG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const hG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(k_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),dG=[hG,uG];function mG(n={}){return[k_.of(n),dG]}const gG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(gG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||C_,l=r.brackets||w_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return yG(n,e,t,A,B,_,l)}}return bG(n,e,t,h,C.type,i,l)}function yG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const vG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),xG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xG[n]=OG(vG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function OG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[o_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const SG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?EG(n):r.block?wG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const EG=oO(PG,0),CG=oO(A_,0),wG=oO((n,e)=>A_(n,e,AG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function kG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function AG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function A_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>kG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),TG=ri.define(),DG=$t.define(),P_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),T_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(P_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=tc(B,B.length,t.minDepth,A):B=R_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(TG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function IG(n={}){return[T_,P_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?D_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Ac(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(T_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const D_=Ac(0,!1),px=Ac(1,!1),RG=Ac(0,!0),FG=Ac(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(DG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function tc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function _G(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function BG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function I_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],LG=200;function R_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),tc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function NG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=MG(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function MG(n,e,t){let r=I_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const $G=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||$G.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Pc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const __=n=>F_(n,!vn(n)),B_=n=>F_(n,vn(n));function L_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Pc(t,e))}const qG=n=>L_(n,!vn(n)),QG=n=>L_(n,vn(n));function VG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Tc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;VG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const UG=n=>vs(n,e=>Tc(n.state,e,!vn(n))),WG=n=>vs(n,e=>Tc(n.state,e,vn(n)));function N_(n,e){return vs(n,t=>{if(!t.empty)return Pc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const M_=n=>N_(n,!1),$_=n=>N_(n,!0);function j_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Pc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>q_(n,!1),hx=n=>q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const GG=n=>vs(n,e=>Fi(n,e,!0)),zG=n=>vs(n,e=>Fi(n,e,!1)),ZG=n=>vs(n,e=>Fi(n,e,!vn(n))),XG=n=>vs(n,e=>Fi(n,e,vn(n))),YG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function KG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headKG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function Q_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>Q_(n,!vn(n)),U_=n=>Q_(n,vn(n));function W_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const ez=n=>W_(n,!vn(n)),tz=n=>W_(n,vn(n)),rz=n=>ss(n,e=>Tc(n.state,e,!vn(n))),nz=n=>ss(n,e=>Tc(n.state,e,vn(n)));function G_(n,e){return ss(n,t=>n.moveVertically(t,e))}const z_=n=>G_(n,!1),Z_=n=>G_(n,!0);function X_(n,e){return ss(n,t=>n.moveVertically(t,e,j_(n).height))}const lI=n=>X_(n,!1),uI=n=>X_(n,!0),sz=n=>ss(n,e=>Fi(n,e,!0)),iz=n=>ss(n,e=>Fi(n,e,!1)),az=n=>ss(n,e=>Fi(n,e,!vn(n))),oz=n=>ss(n,e=>Fi(n,e,vn(n))),lz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),cz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),fz=({state:n,dispatch:e})=>{let t=Dc(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},pz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},hz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function vl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=yu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=yu(n,h,!1),C=yu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const Y_=(n,e,t)=>vl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iY_(n,!1,!0),H_=n=>Y_(n,!0,!1),K_=(n,e)=>vl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),J_=n=>K_(n,!1),dz=n=>K_(n,!0),mz=n=>vl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headvl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),yz=n=>vl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},vz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Dc(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function eB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Dc(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const xz=({state:n,dispatch:e})=>eB(n,e,!1),Oz=({state:n,dispatch:e})=>eB(n,e,!0);function tB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Dc(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Sz=({state:n,dispatch:e})=>tB(n,e,!1),Ez=({state:n,dispatch:e})=>tB(n,e,!0),Cz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Dc(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function wz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=rB(!1),kz=rB(!0);function rB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&wz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new wc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Az=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new wc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=il(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Cc)})}),{userEvent:"input.indent"})),!0),sB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=il(n,Math.max(0,l-Ku(n)));for(;h(n.setTabFocusMode(),!0),Tz=[{key:"Ctrl-b",run:__,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:B_,shift:U_},{key:"Ctrl-p",run:M_,shift:z_},{key:"Ctrl-n",run:$_,shift:Z_},{key:"Ctrl-a",run:YG,shift:lz},{key:"Ctrl-e",run:HG,shift:uz},{key:"Ctrl-d",run:H_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:mz},{key:"Ctrl-Alt-h",run:J_},{key:"Ctrl-o",run:bz},{key:"Ctrl-t",run:vz},{key:"Ctrl-v",run:hx}],Dz=[{key:"ArrowLeft",run:__,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:qG,shift:ez,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ZG,shift:az,preventDefault:!0},{key:"ArrowRight",run:B_,shift:U_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:XG,shift:oz,preventDefault:!0},{key:"ArrowUp",run:M_,shift:z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:zG,shift:iz,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:GG,shift:sz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:cz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:H_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:J_},{key:"Mod-Delete",mac:"Alt-Delete",run:dz},{mac:"Mod-Backspace",run:gz},{mac:"Mod-Delete",run:yz}].concat(Tz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Iz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:UG,shift:rz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:WG,shift:nz},{key:"Alt-ArrowUp",run:xz},{key:"Shift-Alt-ArrowUp",run:Sz},{key:"Alt-ArrowDown",run:Oz},{key:"Shift-Alt-ArrowDown",run:Ez},{key:"Escape",run:hz},{key:"Mod-Enter",run:kz},{key:"Alt-l",mac:"Ctrl-l",run:fz},{key:"Mod-i",run:pz,preventDefault:!0},{key:"Mod-[",run:sB},{key:"Mod-]",run:nB},{key:"Mod-Alt-\\",run:Az},{key:"Shift-Mod-k",run:Cz},{key:"Shift-Mod-\\",run:JG},{key:"Mod-/",run:SG},{key:"Alt-A",run:CG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Pz}].concat(Dz),Rz={key:"Tab",run:nB,shift:sB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=rc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=rc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(oB.prototype[Symbol.iterator]=lB.prototype[Symbol.iterator]=function(){return this});function Fz(n){try{return new RegExp(n,cO),!0}catch{return!1}}function rc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:nc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[nc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const nc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(nc)&&(n=t.value);return n},provide:n=>nl.from(n,e=>e?mx:null)}),_z=n=>{let e=rl(n,mx);if(!e){let t=[nc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Bz])),n.dispatch({effects:t}),e=rl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Bz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Lz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uB=$t.define({combine(n){return bs(n,Lz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Nz(n){let e=[Qz,qz];return n&&e.push(uB.of(n)),e}const Mz=Ht.mark({class:"cm-selectionMatch"}),$z=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function jz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const qz=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(uB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&jz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push($z.range(B,q)):(B>=i.to||q<=i.from)&&C.push(Mz.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Qz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Uz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Wz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Vz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Uz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new nZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class cB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Fz(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Xz(this):new zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class fB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?Gz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Gz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new oB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Zz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function sc(n,e){return n.slice(pn(n,e,!1),e)}function ic(n,e){return n.slice(e,pn(n,e))}function Zz(n){return(e,t,r)=>!r[0].length||(n(sc(r.input,r.index))!=Br.Word||n(ic(r.input,r.index))!=Br.Word)&&(n(ic(r.input,r.index+r[0].length))!=Br.Word||n(sc(r.input,r.index+r[0].length))!=Br.Word)}class Xz extends fB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const al=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(al)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>nl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Yz=Ht.mark({class:"cm-searchMatch"}),Hz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Kz=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Hz:Yz)})}return r.finish()}},{decorations:n=>n.decorations});function xl(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):dB(e)}}const ac=xl((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),hB(n),!0}),oc=xl((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),hB(n),!0}),Jz=xl((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),eZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=xl((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),tZ=xl((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new cB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function pB(n){let e=rl(n,pO);return e&&e.dom.querySelector("[main-field]")}function hB(n){let e=pB(n);e&&e==n.root.activeElement&&e.select()}const dB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=pB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:al.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?al.of(gx(n.state,e.query.spec)):sr.appendConfig.of(iZ)]});return!0},mB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=rl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},rZ=[{key:"Mod-f",run:dB,scope:"editor search-panel"},{key:"F3",run:ac,shift:oc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ac,shift:oc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:mB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:eZ},{key:"Mod-Alt-g",run:_z},{key:"Mod-d",run:Wz,preventDefault:!0}];class nZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ac(e),[Qn(e,"next")]),r("prev",()=>oc(e),[Qn(e,"previous")]),r("select",()=>Jz(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>tZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>mB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new cB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:al.of(e)}))}keydown(e){m7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?oc:ac)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(al)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const bu=30,vu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-bu),h=Math.min(i,t+bu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-bu;A--)if(!vu.test(C[A-1])&&vu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const sZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),iZ=[Oi,Ri.low(Kz),sZ];class gB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(bB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function aZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:aZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function oZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function bB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function lZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function uZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=yB(n)),e}const lc=sr.define(),ol=sr.define();class cZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class fZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function pZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function hZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class dZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=hZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ol.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&gZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew dZ(t,n,e)}function gZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function yZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new fZ(q):new cZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=yZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:EZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class uc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new uc(OZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(uZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!bZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(OB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new uc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?vZ:xZ}}function bZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const OZ=[];function vB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=vB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(lc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ol))i=new Wn(i.source,0);else if(l.is(xB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return SZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new gB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function SZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):bB(n,!0).test(i)}const xB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),OB=sr.define(),Bn=Hr.define({create(){return uc.start()},update(n,e){return n.update(e)},provide:n=>[Sc.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},lZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const EZ=mZ(Bn,mO);function xu(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:OB.of(C)}),!0}}const CZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:lc.of(!0)}),!0):!1,wZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ol.of(null)}),!0)};class kZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const AZ=50,PZ=1e3,TZ=Vr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=vB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lAZ&&Date.now()-h.time>PZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(lc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new gB(e,t,n.explicitPos==t,this.view),i=new kZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ol.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:xB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&HF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ol.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:lc.of(!1)}),20),this.composing=0}}}),DZ=typeof navigator=="object"&&/Win/.test(navigator.platform),IZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(DZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),SB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class RZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new RZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let FZ=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),_Z=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?FZ:_Z).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Ol=sr.define({map(n,e){return n&&n.map(e)}}),BZ=sr.define(),ll=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ol))return t.value;if(t.is(BZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function LZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Ol.of(_)];t.state.field(ll,!1)===void 0&&B.push(sr.appendConfig.of([ll,qZ,QZ,SB]))}t.dispatch(t.state.update(A))}}function EB(n){return({state:e,dispatch:t})=>{let r=e.field(ll,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Ol.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const NZ=({state:n,dispatch:e})=>n.field(ll,!1)?(e(n.update({effects:Ol.of(null)})),!0):!1,MZ=EB(1),$Z=EB(-1),jZ=[{key:"Tab",run:MZ,shift:$Z},{key:"Escape",run:NZ}],kI=$t.define({combine(n){return n.length?n[0]:jZ}}),qZ=Ri.highest(ml.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:LZ(n)})}const QZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ll,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Ol.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ul={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const CB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function VZ(){return[WZ,CB]}const cv="()[]{}<>";function wB(n){for(let e=0;e{if((UZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=ZZ(n.state,r);return l?(n.dispatch(l),!0):!1}),GZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=kB(n,n.selection.main.head).brackets||ul.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=XZ(n.doc,h.head);for(let A of r)if(A==C&&Ic(n.doc,h.head)==wB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},zZ=[{key:"Backspace",run:GZ}];function ZZ(n,e){let t=kB(n,n.selection.main.head),r=t.brackets||ul.brackets;for(let i of r){let l=wB(ln(i,0));if(e==i)return l==i?KZ(n,i,r.indexOf(i+i+i)>-1,t):YZ(n,i,l,t.before||ul.before);if(e==l&&AB(n,n.selection.main.from))return HZ(n,i,l)}return null}function AB(n,e){let t=!1;return n.field(CB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Ic(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function XZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function YZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Ic(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function HZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Ic(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t,r){let i=r.stringPrefixes||ul.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Ic(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(AB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!JZ(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function JZ(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function eX(n={}){return[IZ,Bn,fn.of(n),TZ,tX,SB]}const PB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:wZ},{key:"ArrowDown",run:xu(!0)},{key:"ArrowUp",run:xu(!1)},{key:"PageDown",run:xu(!0,"page")},{key:"PageUp",run:xu(!1,"page")},{key:"Enter",run:CZ}],tX=Ri.highest(ml.computeN([fn],n=>n.facet(fn).defaultKeymap?[PB]:[]));class rX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new pX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new rX(i,l,h.diagnostic),!1}),r}function TB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Rc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function DB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(NB))}function nX(n,e){return{effects:DB(n,[Rc.of(e)])}}const Rc=sr.define(),xO=sr.define(),IB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Rc)){let r=e.state.facet(Ls).autoPanel?t.value.length?cl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?cl.open:null,n.selected):t.is(IB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[nl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),sX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function iX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).to_B(n,t,!1)))}const aX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:DB(n.state,[xO.of(!0)])});let t=rl(n,cl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},oX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},lX=[{key:"Mod-Shift-m",run:aX,preventDefault:!0},{key:"F8",run:oX}],uX=Vr.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(nX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function cX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function fX(n,e={}){return[Ls.of({source:n,config:e}),uX,NB]}function FB(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function _B(n,e,t){var r;let i=t?FB(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class pX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=_B(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class cl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=FB(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:IB.of(r)})}static open(e){return new cl(e)}}function Fu(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Ou(n){return Fu(``,'width="6" height="3"')}const hX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ou("#d11")},".cm-lintRange-warning":{backgroundImage:Ou("orange")},".cm-lintRange-info":{backgroundImage:Ou("#999")},".cm-lintRange-hint":{backgroundImage:Ou("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class BB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)mX(e,t,r)),t}}function dX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,dX(n,e)}let{hoverTime:i}=n.state.facet(Fc),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function gX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new BB(t[i]).range(+i));return gr.of(r,!0)}const yX=JF({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new BB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(Fc).markerFilter;for(let r of e.effects)if(r.is(Rc)){let i=r.value;t&&(i=t(i||[],e.state)),n=gX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),LB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=TB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Sc.from(n)}),bX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Fu('')},".cm-lint-marker-warning":{content:Fu('')},".cm-lint-marker-error":{content:Fu('')}}),NB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([sX.range(e.from,e.to)])}),tW(iX,{hideOn:TB}),hX],Fc=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function vX(n={}){return[Fc.of(n),yx,yX,bX,LB]}const xX=(()=>[fW(),dW(),R7(),IG(),sG(),O7(),k7(),Sr.allowMultipleSelections.of(!0),UW(),E_(lG,{fallback:!0}),mG(),VZ(),eX(),U7(),z7(),M7(),Nz(),ml.of([...zZ,...Iz,...rZ,...jG,...eG,...PB,...lX])])();class cc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new cc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new cc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new OX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class OX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class fc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new fc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new fc(this.stack,this.pos,this.index)}}function qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class _u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new _u;class SX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;MB(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if(MB(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class Sl{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function MB(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||EX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function EX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class CX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class wX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new _u)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new _u,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new _u,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new CX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&TX(i);if(h)return Vn&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Vn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Vn&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Vn&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Vn&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Vn&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Vn&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Vn&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Vn&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Vn&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class PX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class pc extends a_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r_;let h=qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new kX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(pc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const DX=312,IX=313,MI=1,RX=2,FX=3,_X=4,BX=314,LX=316,NX=317,MX=5,$X=6,jX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$B=125,qX=59,xx=47,QX=42,VX=43,UX=45,WX=60,GX=44,zX=63,ZX=46,XX=91,YX=new PX({start:!1,shift(n,e){return e==MX||e==$X||e==LX?n:e==NX},strict:!1}),HX=new Sl((n,e)=>{let{next:t}=n;(t==$B||t==-1||e.context)&&n.acceptToken(BX)},{contextual:!0,fallback:!0}),KX=new Sl((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==QX)||t!=$B&&t!=qX&&t!=-1&&!e.context&&n.acceptToken(DX)},{contextual:!0}),JX=new Sl((n,e)=>{n.next==XX&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new Sl((n,e)=>{let{next:t}=n;if(t==VX||t==UX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:RX)}}else t==zX&&n.peek(1)==ZX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(FX))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const tY=new Sl((n,e)=>{if(n.next!=WX||!e.dialectEnabled(jX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==GX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(_X,-t)}),rY=o_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),nY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},sY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},iY={__proto__:null,"<":187},aY=pc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:YX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[rY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[KX,JX,eY,tY,2,3,4,5,6,7,8,9,10,11,12,13,14,HX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>nY[n]||-1},{term:339,get:n=>sY[n]||-1},{term:92,get:n=>iY[n]||-1}],tokenPrec:15004}),jB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],oY=jB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new OW,qB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const lY=["FunctionDeclaration"],uY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(lY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function QB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=uY[h.name];if(C&&C(h,l)||qB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of QB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function cY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)qB.has(i.name)&&(r=r.concat(QB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Yu.define({name:"javascript",parser:aY.configure({props:[p_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:QW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:qW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),m_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":GW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),UB={test:n=>/^JSX/.test(n.name),facet:c_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},fY=Ei.configure({dialect:"ts"},"typescript"),pY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[UB]:void 0)]}),hY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[UB]:void 0)]},"typescript");let WB=n=>({label:n,type:"keyword"});const GB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(WB),dY=GB.concat(["declare","implements","private","protected","public"].map(WB));function mY(n={}){let e=n.jsx?n.typescript?hY:pY:n.typescript?fY:Ei,t=n.typescript?oY.concat(dY):jB.concat(GB);return new FW(e,[Ei.data.of({autocomplete:oZ(VB,yB(t))}),Ei.data.of({autocomplete:cY}),n.jsx?bY:[]])}function gY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const yY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),bY=Mt.inputHandler.of((n,e,t,r,i)=>{if((yY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=gY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function vY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(xY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function xY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},OY={get exports(){return Ox},set exports(n){Ox=n}};const SY={define:!1,require:!1},EY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},CY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},wY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},kY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},AY={assert:!0,expect:!0,should:!0},PY={exports:!0,global:!1,module:!1,require:!1},TY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},DY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},IY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},RY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},UY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},GY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},ZY={$:!1,jQuery:!1},XY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},YY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},HY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},KY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},JY={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},eH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},rH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},nH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},sH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},iH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},aH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},oH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},lH={browser:!1,chrome:!1,opr:!1},uH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},cH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},fH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},pH={amd:SY,applescript:EY,atomtest:CY,browser:wY,builtin:kY,chai:AY,commonjs:PY,couch:TY,devtools:DY,embertest:IY,es2015:RY,es2016:FY,es2017:_Y,es2018:BY,es2019:LY,es2020:NY,es2021:MY,es2022:$Y,es2023:jY,es2024:qY,es2025:QY,es3:VY,es5:UY,greasemonkey:WY,jasmine:GY,jest:zY,jquery:ZY,meteor:XY,mocha:YY,mongo:HY,nashorn:KY,node:JY,nodeBuiltin:eH,phantomjs:tH,prototypejs:rH,protractor:nH,qunit:sH,rhino:iH,serviceworker:aH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:oH,webextensions:lH,worker:uH,wsh:cH,yui:fH};(function(n){n.exports=pH})(OY);const hH=S9(Ox);var hc={},dH={get exports(){return hc},set exports(n){hc=n}},dv,VI;function mH(){return VI||(VI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var HB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,_c=function(c){return HB.exec(c).slice(1)};function Cl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Nc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Bc(c){var s=Lc(c),u=JB(c,-1)==="/";return c=SO(Nc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Lc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Bc(Nc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=Cl(c).substr(1),s=Cl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function V(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,V=G.type||j.wrap,te=this.__keys[V],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+V+".");for(W=te.length;(W-=1)>=0;)if($=te[W],U=G[$],!!U){if(Array.isArray(U)){for(K=U.length;(K-=1)>=0;)if(U[K]&&!E(L,U[K])){if(S(V,te[W]))j=new g(U[K],[$,K],"Property",null);else if(b(U[K]))j=new g(U[K],[$,K],null,null);else continue;I.push(j)}}else if(b(U)){if(E(L,U))continue;I.push(new g(U,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,V;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(V,1)):V+=1;if(V===I.length)return a.Break;if(I[V].extendedRange[0]>Q.range[1])return a.Skip}}),V=0,k(F,{leave:function(Q){for(var $;VQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}(Mc)),Mc}var oo={},tL="esrecurse",rL="ECMAScript AST recursive visitor",nL="https://github.com/estools/esrecurse",sL="esrecurse.js",iL="4.3.0",aL={node:">=4.0"},oL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],lL={type:"git",url:"https://github.com/estools/esrecurse.git"},uL={estraverse:"^5.2.0"},cL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},fL="BSD-2-Clause",pL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},hL={presets:["es2015"]},dL={name:tL,description:rL,homepage:nL,main:sL,version:iL,engines:aL,maintainers:oL,repository:lL,dependencies:uL,devDependencies:cL,license:fL,scripts:pL,babel:hL},RO;function mL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class V extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:U}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===U.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===U.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===U.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===U.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===U.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===U.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===U.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===U.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===U.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Vt=256,tr=Re|Se|Vt;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ue=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Ut=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ut.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Vt)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Vt))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vt)>0},Ut.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,V.lastIndex=w,w+=V.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var pr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var w=V.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){V.lastIndex=this.pos;var tt=V.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new pr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ve=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ve&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Vt|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Ut.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new pr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Ut.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Vi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Vi(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Ui(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Ui(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Qc}var NO;function yL(){return NO||(NO=1,function(c){const s=gL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(jc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||jc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(qc)),qc.exports}var uo={},MO;function bL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Al(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=jc(),s=yL(),u=bL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var U=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,U.get?U:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],U=W.at(-1),ae={type:o.Template,value:K.slice(te.start,U.end)};return te.loc&&(ae.loc={start:te.loc.start,end:U.loc.end}),te.range&&(ae.start=te.range[0],ae.end=U.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,U=this._acornTokTypes;if(te===U.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===U.privateId)W.type=o.PrivateIdentifier;else if(te===U.semi||te===U.comma||te===U.parenL||te===U.parenR||te===U.braceL||te===U.braceR||te===U.dot||te===U.bracketL||te===U.colon||te===U.question||te===U.bracketR||te===U.ellipsis||te===U.arrow||te===U.jsxTagStart||te===U.incDec||te===U.starstar||te===U.jsxTagEnd||te===U.prefix||te===U.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===U.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===U.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===U.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===U.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===U.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,U=K.tokens,ae=this._tokens,z=()=>{U.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),U.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),U=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:U,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,U,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=U,ce.range=[te,U]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(U,ae){(typeof U!="object"||U===null)&&(U={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=U.sourceType,ue=E(U),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const U=this[k],ae=U.tokens;return U.comments&&(ae.comments=U.comments),ae}finishNode(...U){const ae=super.finishNode(...U);return this[D](ae)}finishNodeAt(...U){const ae=super.finishNodeAt(...U);return this[D](ae)}parse(){const U=this[k],ae=super.parse();if(ae.sourceType=U.originalSourceType,U.comments&&(ae.comments=U.comments),U.tokens&&(ae.tokens=U.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return U.lastToken&&(ae.range&&(ae.range[1]=U.lastToken.range[1]),ae.loc&&(ae.loc.end=U.lastToken.loc.end),ae.end=U.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(U){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(U)}raise(U,ae){const z=W.acorn.getLineInfo(this.input,U),ue=new SyntaxError(ae);throw ue.index=U,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(U,ae){this.raise(U,ae)}unexpected(U){let ae="Unexpected token";if(U!=null){if(this.pos=U,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(U){const ae=super.jsx_readString(U);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](U){return U.type==="TemplateElement"&&this[k].templateElements.push(U),U.type.includes("Function")&&!U.generator&&(U.generator=!1),U}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),V=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=V,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function vL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",U="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[V]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[U]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ve||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Ut}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var xL="eslint",OL="9.12.0",SL="Nicholas C. Zakas ",EL="An AST-based pattern checker for JavaScript.",CL={eslint:"./bin/eslint.js"},wL="./lib/api.js",kL="./lib/types/index.d.ts",AL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},PL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},TL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},DL={"pre-commit":"lint-staged"},IL=["LICENSE","README.md","bin","conf","lib","messages"],RL="eslint/eslint",FL="https://eslint.org/donate",_L="https://eslint.org",BL="https://github.com/eslint/eslint/issues/",LL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},NL={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},ML={jiti:"*"},$L={jiti:{optional:!0}},jL=["ast","lint","javascript","ecmascript","espree"],qL="MIT",QL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:xL,version:OL,author:SL,description:EL,bin:CL,main:wL,types:kL,exports:AL,typesVersions:PL,scripts:TL,gitHooks:DL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:IL,repository:RL,funding:FL,homepage:_L,bugs:BL,dependencies:LL,devDependencies:NL,peerDependencies:ML,peerDependenciesMeta:$L,keywords:jL,license:qL,engines:QL},Pl={},xs=[],Zn=[],UL=typeof Uint8Array<"u"?Uint8Array:Array,Vc=!1;function qO(){Vc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new UL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function GL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function zL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Tl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function VO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var ZL={}.toString,UO=Array.isArray||function(c){return ZL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var XL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Dl();function Dl(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Us(c,s){if(Dl()=Dl())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Dl().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return Fl(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function eN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return cN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return lN(this,s,u);case"latin1":case"binary":return uN(this,s,u);case"base64":return aN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return tN(this,s,u,p);case"utf8":case"utf-8":return rN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return nN(this,s,u,p);case"base64":return sN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function aN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return oN(p)}var KO=4096;function oN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Il(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2};function Rl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Rl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Rl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),VO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),VO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function gN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return WL(hN(c))}function _l(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function bN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||vN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function vN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),Ml(s)?u.showHidden=s:s&&tf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=ON),Nl(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ON(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function SN(c,s){return c}function EN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Nl(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Nl(c,p,u)),p}var a=CN(c,s);if(a)return a;var d=Object.keys(s),v=EN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Xc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Xc(s)}var o="",y=!1,O=["{","}"];if(Hc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Xc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=wN(c,s,u,v,d):g=d.map(function(f){return Yc(c,s,u,v,f,y)}),c.seen.pop(),kN(g,o,O)}function CN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Kc(s))return c.stylize(""+s,"number");if(Ml(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Xc(c){return"["+Error.prototype.toString.call(c)+"]"}function wN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function kN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Hc(c){return Array.isArray(c)}function Ml(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Kc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&Jc(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&Jc(c)==="[object Date]"}function ha(c){return Li(c)&&(Jc(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function $l(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function Jc(c){return Object.prototype.toString.call(c)}function ef(c){return c<10?"0"+c.toString(10):c.toString(10)}var AN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function PN(){var c=new Date,s=[ef(c.getHours()),ef(c.getMinutes()),ef(c.getSeconds())].join(":");return[c.getDate(),AN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",PN(),Bl.apply(null,arguments))}function tf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function rf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,V=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=V(xe/je);xe>G*k>>1;Ge+=S)xe=V(xe/G);return V(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>V((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtV(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),V(Ge/nr)>b-ut&&$("overflow"),ut+=V(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnV((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Vt(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ue=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ue))Ce=Ce.replace(Ue,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Vt(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Ut(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var pr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:pr.domainHost,parse:pr.parse,serialize:pr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ve="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ve+"%"+Ve+Ve+"%"+Ve+Ve)+"|"+a("%[89A-Fa-f]"+Ve+"%"+Ve+Ve)+"|"+a("%"+Ve+Ve)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return V[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,U=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;bf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],V=L[3],Q=L[5];return(j<=23&&G<=59&&V<=59||j==23&&G==59&&V==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return bf}var vf,TS;function MN(){return TS||(TS=1,vf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),vf}var xf,DS;function $N(){return DS||(DS=1,xf=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),xf}var Of,IS;function jN(){return IS||(IS=1,Of=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),Cf}var wf,BS;function UN(){return BS||(BS=1,wf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),wf}var kf,LS;function WN(){return LS||(LS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),kf}var Af,NS;function GN(){return NS||(NS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Af}var Pf,MS;function zN(){return MS||(MS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Pf}var Tf,$S;function ZN(){return $S||($S=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,V=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Tf}var Df,jS;function qS(){return jS||(jS=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Df}var If,QS;function VS(){return QS||(QS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),If}var Rf,US;function WS(){return US||(US=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,GS;function zS(){return GS||(GS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,ZS;function XN(){return ZS||(ZS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,XS;function YN(){return XS||(XS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Bf}var Lf,YS;function HN(){return YS||(YS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Lf}var Nf,HS;function KN(){return HS||(HS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Nf}var Mf,KS;function JN(){return KS||(KS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(U),P=s.schema.patternProperties||{},N=Object.keys(P).filter(U),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,V=s.opts.removeAdditional,Q=j||G||V,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ue=s.util.getProperty(z),it=x+Ue,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ue,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Ut=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),Mf}var $f,JS;function eM(){return JS||(JS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),qf}var Qf,r1;function nM(){return r1||(r1=1,Qf={$ref:MN(),allOf:$N(),anyOf:jN(),$comment:qN(),const:QN(),contains:VN(),dependencies:UN(),enum:WN(),format:GN(),if:zN(),items:ZN(),maximum:qS(),minimum:qS(),maxItems:VS(),minItems:VS(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:XN(),not:YN(),oneOf:HN(),pattern:KN(),properties:JN(),propertyNames:eM(),required:tM(),uniqueItems:rM(),validate:wS()}),Qf}var Vf,n1;function sM(){if(n1)return Vf;n1=1;var c=nM(),s=da().toHash;return Vf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Vf}var Uf,s1;function iM(){if(s1)return Uf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Uf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),V={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...V},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...V},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...V},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...V,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,U=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Vt=new Error(qt,{cause:kt});throw kt.code&&(Vt.code=kt.code),Vt}}validateEnvironment(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Pl.Legacy=Re,Pl}var ql={exports:{}},Ql={exports:{}},Hf,m1;function o$(){if(m1)return Hf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Hf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Hf}var Kf,g1;function y1(){if(g1)return Kf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=o$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ql,Ql.exports)),Ql.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var u$={isatty:v1,ReadStream:x1,WriteStream:O1},c$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:u$,isatty:v1}),f$=i(c$),S1;function p$(){return S1||(S1=1,function(c,s){const u=f$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=mH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?ql.exports=l$():ql.exports=p$()),ql.exports}var Jf,C1;function ep(){if(C1)return Jf;C1=1;const c=wl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),V=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ve=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ve=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ve=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ve=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ve},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),U=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ve=Object.getOwnPropertyDescriptor(Te,ke);if(Ve)return Ve;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ve=0;Ve":return{value:Te.value>Ve.value};case">=":return{value:Te.value>=Ve.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ve.value};case">>>":return{value:Te.value>>>Ve.value};case"+":return{value:Te.value+Ve.value};case"-":return{value:Te.value-Ve.value};case"*":return{value:Te.value*Ve.value};case"/":return{value:Te.value/Ve.value};case"%":return{value:Te.value%Ve.value};case"**":return{value:Te.value**Ve.value};case"|":return{value:Te.value|Ve.value};case"^":return{value:Te.value^Ve.value};case"&":return{value:Te.value&Ve.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ve=ue(Ie.arguments,ke);if(Ve!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ve)};if(U.has(Pe[de]))return{value:Ve[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ve)};if(U.has(Oe))return{value:Ve[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ve=Te.defs[0];if(Ve.parent&&Ve.parent.kind==="const"&&Ve.node.id.type==="Identifier")return ce(Ve.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ve=ce(Ie.right,ke);if(Ve!=null)return Ve}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ve=pe(Ie,ke);if(Ve!=null&&!z(Te.value,Ve.value))return{value:Te.value[Ve.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ve=ue(Ie.arguments,ke);if(Te!=null&&Ve!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ve)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ve of Ie.properties)if(Ve.type==="Property"){if(Ve.kind!=="init")return null;const lt=pe(Ve,ke),Oe=ce(Ve.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ve.type==="SpreadElement"||Ve.type==="ExperimentalSpreadProperty"){const lt=ce(Ve.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ve=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ve!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ve)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ve=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ve}=Ie;return typeof this[Ve]=="function"?this[Ve](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ve}=Ie;for(const lt of Te[Ve]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ve=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ve},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ve,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ve=Ie|0,lt=ke,Oe=Te,!(Ve>=1))throw new TypeError("'times' should be a positive integer.")}else Ve=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ve>0);return Ve===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Vt=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ve=ke-1;Ve>=0&&Ie.charCodeAt(Ve)===92;--Ve)Te=!Te;return Te}function fe(Ie,ke,Te){const Ve=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}function Ue(Ie,ke,Te){const Ve=[];let lt=0;for(const Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Vt.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ve}=Vt.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ve||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ue(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Ut=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function pr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ve=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ve.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ve=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ve,!0))}for(const Te of this.globalObjectNames){const Ve=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ve,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ve=oe(Te.arguments[0]);if(Ve==null||!Bt(ke,Ve))continue;const lt=ke[Ve],Oe=[Ve];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ve of Te.body){if(!Pt.test(Ve.type)||Ve.source==null)continue;const lt=Ve.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ve,path:Pe,type:se,info:Oe[se]}),Ve.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ve,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ve.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ve,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ve[se]&&(yield{node:Pe,path:Te,type:se,info:Ve[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ve)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ve){let lt=ke;for(;pr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ve,Pe))return;Te=Te.concat(Pe);const de=Ve[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ve[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ve[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ve[Ut]&&(yield{node:Oe,path:Te,type:Ut,info:Ve[Ut]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve),yield*this._iteratePropertyReferences(Oe,Te,Ve));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ve))}*_iterateLhsReferences(ke,Te,Ve){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ve,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ve,Oe))continue;const Pe=Te.concat(Oe),de=Ve[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ve))}*_iterateImportReferences(ke,Te,Ve){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ve,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Ut,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Ut,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:V,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Ut,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=V,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(tp)),tp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Ul,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=op;function op(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",op)}En.notDeepStrictEqual=lp;function lp(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",lp)}En.strictEqual=up;function up(c,s,u){c!==s&&Cn(c,s,u,"===",up)}En.notStrictEqual=cp;function cp(c,s,u){c===s&&Cn(c,s,u,"!==",cp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function b$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=b$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var v$=Object.freeze({__proto__:null,AssertionError:Ul,assert:mo,deepEqual:ip,deepStrictEqual:ap,default:En,doesNotThrow:j1,equal:np,fail:Cn,ifError:q1,notDeepEqual:op,notDeepStrictEqual:lp,notEqual:sp,notStrictEqual:cp,ok:mo,strictEqual:up,throws:$1}),Wl=i(v$),fp,Q1;function go(){return Q1||(Q1=1,fp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),fp}var yo={},V1;function bo(){return V1||(V1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var pp,U1;function x$(){if(U1)return pp;U1=1;const c=go(),s=bo();return pp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},pp}var hp,W1;function O$(){if(W1)return hp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return hp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},hp}var dp,G1;function mp(){if(G1)return dp;G1=1;const c=go();return dp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},dp}var gp,z1;function S$(){if(z1)return gp;z1=1;const c=mp();return gp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},gp}var yp,Z1;function E$(){if(Z1)return yp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return yp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},xp}var Op,H1;function w$(){if(H1)return Op;H1=1;const c=mp();return Op=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Op}var Sp,K1;function k$(){if(K1)return Sp;K1=1;const c=x$(),s=O$(),u=S$(),p=E$(),a=vp(),d=C$(),v=w$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Sp={forward:new m(a,p),backward:new m(s,c)},Sp}var Ep,J1;function A$(){if(J1)return Ep;J1=1;const c=vp();return Ep=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Ep}var Cp,eE;function P$(){if(eE)return Cp;eE=1;const c=Wl,{isCommentToken:s}=Kr(),u=k$(),p=vp(),a=A$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return Cp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Pp}var Tp,lE;function Dp(){if(lE)return Tp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Ip=d,Ip}var Rp,cE;function D$(){if(cE)return Rp;cE=1;const c=Dp(),s=T$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,V=this.thrownForkContext;G.add=f.bind(null,G,V,j),V.add=f.bind(null,V,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const V=this.choiceContext;return V.trueForkContext.addAll(I.trueForkContext),V.falseForkContext.addAll(I.falseForkContext),V.nullishForkContext.addAll(I.nullishForkContext),V.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const V=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,V,I.defaultBodySegments)):j.add(V));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Rp=P,Rp}var Fp,fE;function pE(){if(fE)return Fp;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return Fp=c,Fp}var _p,hE;function I$(){if(hE)return _p;hE=1;const c=D$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Bp=R,Bp}var Lp,mE;function gE(){return mE||(mE=1,Lp=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Lp}var ji={},Np={exports:{}},Mp={exports:{}},$p,yE;function F$(){if(yE)return $p;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Qp={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)U?te:U}),s=K(function(te,U){return te0?1:0},d=K(function(te,U){return~~(te/U)}),v=K(function(te,U){return te%U}),m=K(function(te,U){return Math.floor(te/U)}),o=K(function(te,U){var ae;return(te%(ae=U)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,U){return Math.pow(te,U)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,U){return Math.atan2(te,U)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},V=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,U){var ae;for(te=Math.abs(te),U=Math.abs(U);U!==0;)ae=te%U,te=U,U=ae;return te}),W=K(function(te,U){return Math.abs(Math.floor(te/$(te,U)*U))}),Vp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:V,odd:Q,gcd:$,lcm:W};function K(te,U){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,zB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,zB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Xp,FE;function V$(){var j;if(FE)return Xp;FE=1;const{isCommentToken:c}=Kr(),s=P$(),u=Gl(),p=ep(),a=nE(),{directivesPattern:d}=iE(),v=R$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=$c(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,V){const Q=[];let $=0,W=0;for(;$=V.length||$=V.range[0]||V.range[0]<=G.range[0]&&V.range[1]>=G.range[0]}function F(G,V,Q,$){if(R(V,Q))return!1;const[W,K]=V.range[1]<=Q.range[0]?[V,Q]:[Q,V],te=G.getLastToken(W)||W,U=G.getFirstToken(K)||K;let ae=te;for(;ae!==U;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==U&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,V={},Q={}){for(const $ of new Set([...Object.keys(V),...Object.keys(Q)])){const W=V[$]===void 0?void 0:T(V[$]),te=Q[$]&&Q[$].value||W,U=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=U!==void 0,ae.eslintExplicitGlobalComments=U,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,V){Object.keys(V).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,U,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,U=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=U||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const U=this.scopeManager.acquire(te,K);if(U)return U.type==="function-expression-name"?($.set(Q,U.childScopes[0]),U.childScopes[0]):($.set(Q,U),U)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const U=te.variables.find(ae=>ae.name===Q);if(U)return U.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:U,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(U);if(!(te.type==="Line"&&!ue)){if(U==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${U} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(U){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=U.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(U=>{const{label:ae,value:z}=f.parseDirective(U.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:U.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(U),K[ue].value=ce):K[ue]={comments:[U],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:U.loc}):Q.push({ruleId:null,loc:U.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Xp=L,Xp}var Yp,_E;function BE(){return _E||(_E=1,Yp={SourceCode:V$()}),Yp}var Hp,LE;function zl(){return LE||(LE=1,Hp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Hp}var Kp,NE;function U$(){if(NE)return Kp;NE=1;const c=zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Kp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Kp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function Jp(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W$(c){return function(s){if(Array.isArray(s))return eh(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return eh(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?eh(c,s):void 0}}function eh(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[V]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[V]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,V,Q,$,W,K,te;function U(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(V=$.length;(V-=1)>=0;)if($[V]){if(S(I,Q[G]))j=new g($[V],[te,V],"Property",new x($,V));else{if(!b($[V]))continue;j=new g($[V],[te,V],null,new x($,V))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||U(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)V.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(V),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var V;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),G$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=pr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,V=pr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=pr(["\\",'"'],!0,!1),U=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=pr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=pr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=pr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=pr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=pr(["/"],!0,!1),qt=Zt(":not(",!1),Vt=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ue=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Ut=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function pr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beUt&&(Ut=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ve(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(V))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Vt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ue)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&VE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&VE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function rh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Zl.VisitorKeys[p]?Zl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function nh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=Jp(u,1)[0];if(!d)return!1;for(var v=rh(d,a),m=0;m0&&nh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return ah={getPlaceholderMatcher:c,interpolate:s},ah}var oh,YE;function Y$(){if(YE)return oh;YE=1;const c=Wl,{RuleFixer:s}=Z$(),{interpolate:u}=X$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return oh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},oh}function H$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var lh,HE;function K$(){if(HE)return lh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),lh={LazyLoadingRuleMap:s},lh}var uh={exports:{}},xo={},ch={exports:{}},KE;function J$(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}ch.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),ch.exports}var fh={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}fh.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),fh.exports}var ph={exports:{}},tC;function e3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}ph.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),ph.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=J$(),xo.code=eC(),xo.keyword=e3()}()),xo}var hh,sC;function iC(){return sC||(sC=1,hh={LATEST_ECMA_VERSION:2025}),hh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=wl(),u=nC(),p=Al(),a=zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=Gl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function V(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function U(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Vt(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ue(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Ut(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ue(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ue):ee.getFirstToken(X,Ue)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ve(ee.left,ee.operator),Ke=be&&ve&&Ve(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ve(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:U,isES5Constructor:G,getUpperFunction:V,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Ut,isDotToken:qt,isQuestionDotToken:Vt,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Vt),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ue),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ue,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=V(Ne);if(Ke===null||!U(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!U(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(U(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},dh}var mh,lC;function r3(){if(lC)return mh;lC=1;const c=Ze();return mh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},mh}var gh,uC;function n3(){if(uC)return gh;uC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},gh}var yh,cC;function s3(){if(cC)return yh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return yh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},yh}var bh,fC;function i3(){if(fC)return bh;fC=1;const c=Ze();return bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},bh}var vh,pC;function a3(){if(pC)return vh;pC=1;const c=Ze();return vh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},vh}var xh,hC;function o3(){if(hC)return xh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return xh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},xh}var Oh,dC;function l3(){if(dC)return Oh;dC=1;const c=Ze();return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Oh}var Sh,mC;function u3(){return mC||(mC=1,Sh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Sh}var Eh,gC;function c3(){if(gC)return Eh;gC=1;const c=Ze();return Eh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Eh}var Ch,yC;function f3(){if(yC)return Ch;yC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},Ch}var wh,bC;function p3(){return bC||(bC=1,wh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),wh}var kh,vC;function h3(){if(vC)return kh;vC=1;const c=Ze();return kh={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},kh}var Ah,xC;function d3(){if(xC)return Ah;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ah={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ah}var Ph,OC;function m3(){if(OC)return Ph;OC=1;const c=Ze();return Ph={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Ph}var Th,SC;function g3(){if(SC)return Th;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Th={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Th}var Dh,EC;function y3(){if(EC)return Dh;EC=1;const c=Ze();return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Dh}var Ih,CC;function b3(){if(CC)return Ih;CC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Ih}var Rh,wC;function Qi(){if(wC)return Rh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Rh={upperCaseFirst:u,getGraphemeCount:p},Rh}var Fh,kC;function v3(){if(kC)return Fh;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Fh={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},Fh}var _h,AC;function x3(){if(AC)return _h;AC=1;const c=Ze();return _h={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},_h}var Bh,PC;function O3(){if(PC)return Bh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Bh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Bh}var Lh,TC;function S3(){return TC||(TC=1,Lh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Lh}var Nh,DC;function E3(){if(DC)return Nh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Nh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const V=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+V)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},Mh}var $h,RC;function w3(){if(RC)return $h;RC=1;const c=/^no default$/iu;return $h={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},$h}var jh,FC;function k3(){return FC||(FC=1,jh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),jh}var qh,_C;function A3(){return _C||(_C=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),qh}var Qh,BC;function P3(){if(BC)return Qh;BC=1;const c=Ze();return Qh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Qh}var Vh,LC;function Uh(){return LC||(LC=1,Vh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Vh}var Wh,NC;function T3(){if(NC)return Wh;NC=1;const c=Ze(),s=Uh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Wh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Wh}var Gh,MC;function D3(){return MC||(MC=1,Gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),Gh}var zh,$C;function I3(){if($C)return zh;$C=1;const c=Ze();return zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},zh}var Zh,jC;function R3(){if(jC)return Zh;jC=1;const{getStaticValue:c}=Kr();return Zh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Zh}var Xh,qC;function F3(){if(qC)return Xh;qC=1;const c=Ze();return Xh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Yh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Yh}var Hh,VC;function B3(){if(VC)return Hh;VC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Hh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Hh}var Kh,UC;function L3(){return UC||(UC=1,Kh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Kh}var Jh,WC;function N3(){return WC||(WC=1,Jh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return nd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},nd}var sd,YC;function Q3(){if(YC)return sd;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},sd}var id,HC;function V3(){return HC||(HC=1,id={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),id}var ad,KC;function U3(){return KC||(KC=1,ad={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),ad}var od,JC;function W3(){if(JC)return od;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return od={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},od}var ld,ew;function G3(){if(ew)return ld;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ld={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ld}var ud,tw;function z3(){if(tw)return ud;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return ud={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},ud}var cd,rw;function Z3(){return rw||(rw=1,cd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),cd}var fd,nw;function X3(){if(nw)return fd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},fd}var pd,sw;function Y3(){if(sw)return pd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function V(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function U(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:U}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||U(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(U,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[U.range[1]-U.loc.end.column,U.range[1]-U.loc.end.column+z+ue]:[U.range[0]-U.loc.start.column,U.range[0]-U.loc.start.column+z+ue];s.report({node:U,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(U,ae){const z=ae?o.getLastToken(U):o.getFirstToken(U),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(U,ae){const z=ae===!0?o.getLastToken(U,1):o.getTokenBefore(U),ue=ae===!0?U.loc.end.line:U.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(U,ae){const z=g(U,!1);if(U.type!=="ArrayExpression"&&U.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab),U.type==="IfStatement"&&U.alternate){const ue=o.getTokenBefore(U.alternate);b(ue,ae),f(U.alternate)||b(U.alternate,ae)}if(U.type==="TryStatement"&&U.handler){const ue=o.getFirstToken(U.handler);b(ue,ae)}if(U.type==="TryStatement"&&U.finalizer){const ue=o.getTokenBefore(U.finalizer);b(ue,ae)}if(U.type==="DoWhileStatement"){const ue=o.getTokenAfter(U.body);b(ue,ae)}}function S(U,ae){U.forEach(z=>b(z,ae))}function E(U,ae){const z=o.getLastToken(U),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(U,!0)&&x(U,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(U,ae){const z=o.getLastToken(U,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(U,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(U,ae){const z=g(U,!1);(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab,{line:U.loc.start.line,column:U.loc.start.column})}function T(U,ae,z){let ue=U.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(U){return T(U,"VariableDeclarator")}function F(U,ae){return ae&&ae.parent.loc.start.line===U.loc.start.line&&ae.parent.declarations.length>1}function P(U){const ae=U.parent;return ae.arguments.length>=2&&ae.arguments[1]===U?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(U){const ae=U.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==U)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(U){const ae=U.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(U.body,z),E(U,z-ue)}function L(U){const ae=o.getLastToken(U),z=U.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(U){if(L(U))return;let ae=U.type==="ArrayExpression"?U.elements:U.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(U);if(f(U)){const ce=U.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==U.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=U.parent.type==="ObjectExpression"?U.parent.properties:U.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(U)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(U,z)}else z=g(U).goodChar;m[U.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[U.type],F(U,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===U.loc.end.line)&&E(U,z+(F(U,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(U){return U.type==="BlockStatement"||U.type==="ClassBody"||U.body&&U.body.type==="BlockStatement"||U.consequent&&U.consequent.type==="BlockStatement"}function V(U){if(L(U))return;if(U.parent&&(U.parent.type==="FunctionExpression"||U.parent.type==="FunctionDeclaration"||U.parent.type==="ArrowFunctionExpression")){I(U);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];U.parent&&ue.includes(U.parent.type)&&G(U)?ae=g(U.parent).goodChar:U.parent&&U.parent.type==="CatchClause"?ae=g(U.parent.parent).goodChar:ae=g(U).goodChar,U.type==="IfStatement"&&U.consequent.type!=="BlockStatement"?z=[U.consequent]:Array.isArray(U.body)?z=U.body:z=[U.body],z.length>0&&S(z,ae+v),U.type==="BlockStatement"&&E(U,ae)}function Q(U){return U.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==U.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(U){const ae=Q(U),z=g(U).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[U.kind];if(S(ae,ne),o.getLastToken(U).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(U,g(ce).goodChar):E(U,ne-v)}function W(U){U.body.type!=="BlockStatement"&&V(U)}function K(U,ae){const z=U.type==="SwitchStatement"?U:U.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(U){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(U).replace(o.getText(U.argument),"");return ae.test(z)}return{Program(U){U.body.length>0&&S(U.body,g(U).goodChar)},ClassBody:V,BlockStatement:V,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(U){U.consequent.type!=="BlockStatement"&&U.consequent.loc.start.line>U.loc.start.line&&V(U)},VariableDeclaration(U){U.declarations.at(-1).loc.start.line>U.declarations[0].loc.start.line&&$(U)},ObjectExpression(U){j(U)},ArrayExpression(U){j(U)},MemberExpression(U){if(typeof m.MemberExpression>"u"||L(U)||T(U,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(U,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(U).goodChar+v*m.MemberExpression,z=[U.property],ue=o.getTokenBefore(U.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(U){const ae=g(U).goodChar,z=K(U,ae);S(U.cases,z),E(U,ae)},SwitchCase(U){if(L(U))return;const ae=K(U);S(U.consequent,ae+v)},FunctionDeclaration(U){L(U)||(m.FunctionDeclaration.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(U){L(U)||(m.FunctionExpression.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(U){if(L(U))return;const ae=g(U).goodChar;te(U)?k(U,ae):b(U,ae)},CallExpression(U){L(U)||(m.CallExpression.arguments==="first"&&U.arguments.length?S(U.arguments.slice(1),U.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(U.arguments,g(U).goodChar+v*m.CallExpression.arguments))}}}},hd}var dd,aw;function K3(){if(aw)return dd;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return dd={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const U=W.length-K;if((U&&te==="strict"||U<0&&te==="minimum"||U>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=U>0,pe=Math.abs(U),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),U,ae,z;f&&$>1?(U=f.beforeColon,ae=f.afterColon,z=f.mode):(U=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?U:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,U,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):V(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},gd}var yd,uw;function t5(){if(uw)return yd;uw=1;const c=Ze(),s=Uh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:V,ExportNamedDeclaration:U,ExportDefaultDeclaration:U,ExportAllDeclaration:U,FunctionDeclaration:G,ImportDeclaration:U,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:V,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},yd}var bd,cw;function r5(){if(cw)return bd;cw=1;const c=Ze();return bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},bd}var vd,fw;function n5(){if(fw)return vd;fw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},vd}var xd,pw;function s5(){if(pw)return xd;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function V($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const U=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&V($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(U<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(U)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},xd}var Od,hw;function i5(){if(hw)return Od;hw=1;const c=Ze();return Od={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Od}var Sd,dw;function a5(){if(dw)return Sd;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Sd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Sd}var Ed,mw;function o5(){if(mw)return Ed;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Ed={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),V=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||V)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield V.insertTextBefore(W,I.operator),yield V.removeRange([R.range[0],P.range[0]]),yield V.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield V.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Ed}var Cd,gw;function l5(){return gw||(gw=1,Cd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),Cd}var wd,yw;function u5(){return yw||(yw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),wd}var kd,bw;function c5(){if(bw)return kd;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return kd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(V,Q){let $=0;return V.replace(/\t/gu,(W,K)=>{const te=K+$,U=Q?te%Q:0,ae=Q-U;$+=ae-1}),Array.from(V).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(V,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===V.length)}function D(V,Q,$){const W=$.loc.start,K=$.loc.end,te=!V.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===V.length)}function T(V){if(!V||!V.parent||V.type!=="JSXEmptyExpression"||V.parent.type!=="JSXExpressionContainer")return!1;const Q=V.parent;return Q.loc.start.line===Q.loc.end.line}function R(V,Q){return V.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(V,Q,$){Array.isArray(V[Q])||(V[Q]=[]),V[Q].push($)}function P(){return a.ast.tokens.filter(V=>V.type==="String"||V.type==="JSXText"&&a.getNodeByRangeIndex(V.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(V=>V.type==="Template")}function I(){return a.ast.tokens.filter(V=>V.type==="RegularExpression")}function L(V){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?V.at(-1)!==$.parent&&V.push($.parent):V.push(Q)}),V}function G(V){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),U=N(),ae=L(U),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:V,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:V,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},kd}var Ad,vw;function f5(){if(vw)return Ad;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Ad={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Ad}var Pd,xw;function p5(){if(xw)return Pd;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Pd}var Td,Ow;function h5(){return Ow||(Ow=1,Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Td}var Dd,Sw;function d5(){if(Sw)return Dd;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Dd}var Id,Ew;function m5(){if(Ew)return Id;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Id}var Rd,Cw;function g5(){if(Cw)return Rd;Cw=1;const c=Ze();return Rd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Rd}var Fd,ww;function y5(){if(ww)return Fd;ww=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const V=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=V+K.length;return G.replaceTextRange([V,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=V+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const U=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=U.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([V,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},Fd}var _d,kw;function b5(){if(kw)return _d;kw=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},_d}var Bd,Aw;function v5(){if(Aw)return Bd;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Bd={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Bd}var Ld,Pw;function x5(){if(Pw)return Ld;Pw=1;const c=Ze();return Ld={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Ld}var Nd,Tw;function O5(){if(Tw)return Nd;Tw=1;const c=Ze();return Nd={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Nd}var Md,Dw;function S5(){return Dw||(Dw=1,Md={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),Md}var $d,Iw;function E5(){if(Iw)return $d;Iw=1;const c=Ze();return $d={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},$d}var jd,Rw;function C5(){if(Rw)return jd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return jd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},jd}var qd,Fw;function w5(){if(Fw)return qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},qd}var Qd,_w;function k5(){return _w||(_w=1,Qd={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Qd}var Vd,Bw;function A5(){if(Bw)return Vd;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Vd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Vd}var Ud,Lw;function P5(){if(Lw)return Ud;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Ud={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Ud}var Wd,Nw;function T5(){return Nw||(Nw=1,Wd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Wd}var Gd,Mw;function D5(){return Mw||(Mw=1,Gd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),Gd}var zd,$w;function I5(){return $w||($w=1,zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),zd}var Zd,jw;function R5(){if(jw)return Zd;jw=1;const c=Ze();return Zd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Zd}var Xd,qw;function F5(){if(qw)return Xd;qw=1;const c=Ze();return Xd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Xd}var Yd,Qw;function _5(){return Qw||(Qw=1,Yd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Yd}var Hd,Vw;function B5(){if(Vw)return Hd;Vw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Hd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Hd}var Kd,Uw;function L5(){if(Uw)return Kd;Uw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Kd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Kd}var Jd,Ww;function N5(){if(Ww)return Jd;Ww=1;const c=Ze();return Jd={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},Jd}var em,Gw;function M5(){if(Gw)return em;Gw=1;const c=Ze();return em={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},em}var tm,zw;function $5(){if(zw)return tm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return tm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},tm}var rm,Zw;function j5(){if(Zw)return rm;Zw=1;const{isConstant:c}=Ze();return rm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},rm}var nm,Xw;function q5(){return Xw||(Xw=1,nm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),nm}var sm,Yw;function Q5(){return Yw||(Yw=1,sm={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),sm}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,V=33,Q=35,$=36,W=37,K=38,te=40,U=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Vt=66,tr=68,fe=70,Ue=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Ut=98,ir=99,Ot=100,Zt=102,pr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ve=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,U,be,ve,at,ht,dt]),Xn=new Set([K,V,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,U,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,V,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Vi(nt){return ws(nt)||bt(nt)}class Ui{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===U&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==V)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(V))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==U&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ue)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ve)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Vi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Ui(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Ui(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Ui,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var im,Kw;function V5(){if(Kw)return im;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return im={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},im}var am,Jw;function U5(){return Jw||(Jw=1,am={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),am}var om,ek;function W5(){return ek||(ek=1,om={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,tk;function G5(){return tk||(tk=1,lm={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),lm}var um,rk;function z5(){return rk||(rk=1,um={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),um}var cm,nk;function Z5(){if(nk)return cm;nk=1;const c=Ze();return cm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},cm}var fm,sk;function X5(){if(sk)return fm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return fm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},fm}var pm,ik;function Y5(){if(ik)return pm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return pm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},pm}var hm,ak;function H5(){if(ak)return hm;ak=1;const c=Ze();return hm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},hm}var dm,ok;function K5(){if(ok)return dm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return dm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},dm}var mm,lk;function Oo(){if(lk)return mm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return mm=s,mm}var gm,uk;function J5(){if(uk)return gm;uk=1;const c=Ze(),s=Oo();return gm={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),V=p.getTokenBefore(G);if(V.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===V.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},gm}var ym,ck;function ej(){if(ck)return ym;ck=1;const c=Ze();return ym={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},ym}var bm,fk;function tj(){if(fk)return bm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return bm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},bm}var vm,pk;function rj(){if(pk)return vm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return vm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},vm}var xm,hk;function nj(){if(hk)return xm;hk=1;const c=Ze();return xm={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},xm}var Om,dk;function sj(){return dk||(dk=1,Om={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Om}var Sm,mk;function ij(){return mk||(mk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Sm}var Em,gk;function aj(){if(gk)return Em;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Em={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Em}var Cm,yk;function oj(){if(yk)return Cm;yk=1;const c=Ze();return Cm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},Cm}var wm,bk;function lj(){if(bk)return wm;bk=1;const c=Ze();return wm={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},wm}var km,vk;function uj(){if(vk)return km;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return km={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},km}var Am,xk;function cj(){if(xk)return Am;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ue||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function V(fe){for(let Ue=fe;Ue;Ue=Ue.parent)if(Ue.type==="ReturnStatement"||Ue.type==="ArrowFunctionExpression"&&Ue.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ue=p.getLastToken(fe),mt=p.getTokenBefore(Ue);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ue)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ue.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ue.range[1],mt.range[0]);return Bt.replaceTextRange([Ue.range[0],mt.range[1]],(te(fe)?" ":"")+se+(U(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ue=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ue=Ue.object,mt=Ue.type;return mt==="CallExpression"}function Be(fe){const Ue=fe.callee;j(Ue,d(fe))&&(L(Ue)||!(ae(fe)||Ue.type==="NewExpression"&&!Q(Ue)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ue.type==="MemberExpression"&&pe(Ue)||!fe.optional&&Ue.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ue=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ue||mt===Ue&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ue||Pt===Ue&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ue=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ue,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ue)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ue){const mt=[fe];let Pt=fe;for(;Pt!==Ue;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ue){return Se(Ue,fe).reverse()}function Me(fe,Ue){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ue);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ue);case"MemberExpression":return fe.computed&&fe.property===Ue;case"ConditionalExpression":return fe.consequent===Ue;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ue,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ue),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ue=>Ue.node===fe)}function qt(fe){T.reports=T.reports.filter(Ue=>Ue.node!==fe)}function Vt(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Vt(fe.parent):!1}function tr({left:fe,operator:Ue,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ue)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ue=>Ue&&j(Ue,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ue=>z(Ue)&&I(Ue)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ue=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ue);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ue)&&a.add(Ue),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ue=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ue.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ue.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ue.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&a.add(Ue)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ue=>{const mt=we(fe,Ue);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ue=>Ue.value&&j(Ue.value,k)).forEach(Ue=>ne(Ue.value))},ObjectPattern(fe){fe.properties.filter(Ue=>{const mt=Ue.value;return z(mt)&&I(mt)}).forEach(Ue=>ne(Ue.value))},Property(fe){if(fe.computed){const{key:Ue}=fe;Ue&&j(Ue,k)&&ne(Ue)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ue=fe.argument;z(Ue)&&I(Ue)&&ne(Ue)},ReturnStatement(fe){const Ue=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ue,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ue=d(fe);fe.expressions.filter(mt=>j(mt,Ue)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ue=p.getFirstToken(fe);K(Ue,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ue}=fe,mt=p.getLastToken(fe);Ue.loc.end.line===mt.loc.start.line?ce(fe):L(Ue)&&ne(Ue)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ue=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ue,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ue=>Ue&&I(Ue)).forEach(ne)},AssignmentPattern(fe){const{left:Ue,right:mt}=fe;z(Ue)&&I(Ue)&&ne(Ue),mt&&j(mt,k)&&ne(mt)}}}},Tm}var Dm,Ek;function hj(){if(Ek)return Dm;Ek=1;const c=Oo(),s=Ze();return Dm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Dm}var Im,Ck;function dj(){if(Ck)return Im;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Im={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Im}var Rm,wk;function mj(){if(wk)return Rm;wk=1;const c=Ze();return Rm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Rm}var Fm,kk;function gj(){if(kk)return Fm;kk=1;const c=Ze();return Fm={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},Fm}var _m,Ak;function yj(){return Ak||(Ak=1,_m={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),_m}var Bm,Pk;function bj(){if(Pk)return Bm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Bm}var Lm,Tk;function vj(){return Tk||(Tk=1,Lm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Lm}var Nm,Dk;function xj(){if(Dk)return Nm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Nm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Nm}var Mm,Ik;function Oj(){if(Ik)return Mm;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return Mm={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},Mm}var $m,Rk;function Sj(){if(Rk)return $m;Rk=1;const c=Ze();return $m={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},$m}var jm,Fk;function Ej(){if(Fk)return jm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return jm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},jm}var qm,_k;function Cj(){if(_k)return qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},qm}var Qm,Bk;function wj(){if(Bk)return Qm;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Qm={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Qm}var Vm,Lk;function kj(){if(Lk)return Vm;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Vm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const V=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:V,column:Q.index},end:{line:V,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let V=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],V+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),V=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Vm}var Um,Nk;function Aj(){if(Nk)return Um;Nk=1;const{getStaticPropertyName:c}=Ze();return Um={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Um}var Wm,Mk;function Pj(){if(Mk)return Wm;Mk=1;const c=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Wm}var Gm,$k;function Tj(){if($k)return Gm;$k=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},Gm}var zm,jk;function Dj(){return jk||(jk=1,zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),zm}var Zm,qk;function Ij(){return qk||(qk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Zm}var Xm,Qk;function Rj(){if(Qk)return Xm;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Xm={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Xm}var Ym,Vk;function Fj(){return Vk||(Vk=1,Ym={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Ym}var Hm,Uk;function _j(){if(Uk)return Hm;Uk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Hm={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),Jm}var eg,zk;function Nj(){return zk||(zk=1,eg=function(s){return s>=127462&&s<=127487}),eg}var tg,Zk;function Mj(){return Zk||(Zk=1,tg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),tg}var rg,Xk;function $j(){if(Xk)return rg;Xk=1;const c=Bj(),s=Lj(),u=Nj(),p=Mj();return rg={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},rg}var ng,Yk;function sg(){if(Yk)return ng;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return ng={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},ng}var ig,Hk;function jj(){if(Hk)return ig;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ig={parseStringLiteral:o,parseTemplateToken:y},ig}var ag,Kk;function qj(){if(Kk)return ag;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=$j(),x=Ze(),{isValidWithUnicodeFlag:g}=sg(),{parseStringLiteral:f,parseTemplateToken:b}=jj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,V=I[j].end,Q=N.slice(G,V);return R(P,Q)}return ag={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var V;const N=(V=P.options[0])==null?void 0:V.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let U=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return U??(U=f(ce)),F(ne,ce,U)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return U??(U=b(ce)),F(ne,ce,U)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];U??(U=b(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];U??(U=f(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,U;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),U=a(z,$);else{if(ue.regex)continue;te=String(ue.value),U=""}typeof U=="string"&&G(ae,te,U,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},ag}var og,Jk;function Qj(){if(Jk)return og;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return og={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},og}var lg,eA;function Vj(){return eA||(eA=1,lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),lg}var ug,tA;function Uj(){return tA||(tA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),ug}var cg,rA;function Wj(){return rA||(rA=1,cg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),cg}var fg,nA;function Gj(){if(nA)return fg;nA=1;const c=Ze();return fg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},fg}var pg,sA;function zj(){if(sA)return pg;sA=1;const c=Ze();return pg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},pg}var hg,iA;function Zj(){return iA||(iA=1,hg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),hg}var dg,aA;function Xj(){return aA||(aA=1,dg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),dg}var mg,oA;function Yj(){return oA||(oA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),mg}var gg,lA;function Hj(){return lA||(lA=1,gg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),gg}var yg,uA;function Kj(){return uA||(uA=1,yg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),yg}var bg,cA;function Jj(){return cA||(cA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),bg}var vg,fA;function eq(){if(fA)return vg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},vg}var xg,pA;function tq(){if(pA)return xg;pA=1;const c=["Symbol","BigInt"];return xg={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},xg}var Og,hA;function rq(){if(hA)return Og;hA=1;const c=Ze();return Og={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Og}var Sg,dA;function nq(){return dA||(dA=1,Sg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Sg}var Eg,mA;function sq(){return mA||(mA=1,Eg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Eg}var Cg,gA;function iq(){if(gA)return Cg;gA=1;const{getVariableByName:c}=Ze();return Cg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},Cg}var wg,yA;function aq(){if(yA)return wg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return wg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},wg}var kg,bA;function oq(){if(bA)return kg;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return kg={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},kg}var Ag,vA;function lq(){if(vA)return Ag;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Ag={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Ag}var Pg,xA;function uq(){return xA||(xA=1,Pg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Pg}var Tg,OA;function cq(){return OA||(OA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Tg}var Dg,SA;function fq(){if(SA)return Dg;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Dg={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Dg}var Ig,EA;function pq(){return EA||(EA=1,Ig={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Ig}var Rg,CA;function hq(){if(CA)return Rg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Rg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Rg}var Fg,wA;function dq(){return wA||(wA=1,Fg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),Fg}var _g,kA;function mq(){return kA||(kA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),_g}var Bg,AA;function gq(){if(AA)return Bg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Bg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Bg}var Lg,PA;function yq(){if(PA)return Lg;PA=1;const{getStaticPropertyName:c}=Ze();return Lg={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Lg}var Ng,TA;function bq(){if(TA)return Ng;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Ng={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Ng}var Mg,DA;function vq(){if(DA)return Mg;DA=1;const c=Ze();return Mg={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},Mg}var $g,IA;function xq(){if(IA)return $g;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return $g={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},$g}var jg,RA;function Oq(){if(RA)return jg;RA=1;const c=Ze();return jg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},jg}var qg,FA;function Sq(){return FA||(FA=1,qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),qg}var Qg,_A;function BA(){if(_A)return Qg;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,U)=>Object.defineProperty(K,te,{value:U}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,U,ae)=>U.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,U)=>te+6{const ae=U.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,U,ae,z)=>te===p?`\\[${U}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(U)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let U=T[K];return U||(U=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=U),te?new RegExp(U,"i"):new RegExp(U)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,U,ae,z){this.origin=te,this.pattern=U,this.negative=ae,this.regex=z}}const L=(K,te)=>{const U=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(U,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,U)=>F(K)?K?G.isNotRelative(K)?U(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:U("path must not be empty",TypeError):U(`path must be a string, but got \`${te}\``,TypeError),V=K=>y.test(K);G.isNotRelative=V,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:U=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=U,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const U=L(te,this._ignoreCase);this._added=!0,this._rules.push(U)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,U){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!U)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,U,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,U,ae,z)}_t(te,U,ae,z){if(te in U)return U[te];if(z||(z=te.split(O)),z.pop(),!z.length)return U[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,U,ae,z);return U[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Qg=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=U=>/^\\\\\?\\/.test(U)||/["<>|\u0000-\u001F]+/u.test(U)?U:U.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=U=>te.test(U)||V(U)}return Qg}var Vg,LA;function Eq(){if(LA)return Vg;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Vg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Vg}var Ug,NA;function Cq(){if(NA)return Ug;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Ug}var Wg,MA;function wq(){if(MA)return Wg;MA=1;const c=Ze();return Wg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Wg}var Gg,$A;function kq(){return $A||($A=1,Gg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),Gg}var zg,jA;function Aq(){if(jA)return zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},zg}var Zg,qA;function Pq(){if(qA)return Zg;qA=1;const c=Ze();return Zg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Zg}var Xg,QA;function Tq(){if(QA)return Xg;QA=1;const c=Ze();return Xg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Xg}var Yg,VA;function Dq(){if(VA)return Yg;VA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Hg}var Kg,WA;function Rq(){if(WA)return Kg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Kg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Kg}var Jg,GA;function Fq(){if(GA)return Jg;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return Jg={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},Jg}var e0,zA;function _q(){if(zA)return e0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return e0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,V=>u.has(V.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},e0}var t0,ZA;function Bq(){if(ZA)return t0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return t0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},t0}var r0,XA;function Lq(){return XA||(XA=1,r0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},i0}var a0,JA;function jq(){return JA||(JA=1,a0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),a0}var o0,eP;function qq(){return eP||(eP=1,o0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),o0}var l0,tP;function Qq(){if(tP)return l0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return l0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},l0}var u0,rP;function Vq(){if(rP)return u0;rP=1;const c=Ze();return u0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},u0}var c0,nP;function Uq(){if(nP)return c0;nP=1;const c=Ze();return c0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&V{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},f0}var p0,iP;function Gq(){if(iP)return p0;iP=1;const c=Ze();return p0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},p0}var h0,aP;function zq(){return aP||(aP=1,h0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),h0}var d0,oP;function Zq(){return oP||(oP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let V=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(V.type);)V=V.parent;f(G)&&!S(G)&&!g(G)&&!(y&&V.type==="ArrayPattern")&&!(O&&V.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),d0}var m0,lP;function Xq(){if(lP)return m0;lP=1;const c=Ze();return m0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},m0}var g0,uP;function Yq(){if(uP)return g0;uP=1;const c=ep(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},g0}var y0,cP;function Hq(){if(cP)return y0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return y0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return b0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},b0}var v0,pP;function Jq(){if(pP)return v0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return v0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},v0}var x0,hP;function e6(){if(hP)return x0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return x0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},x0}var O0,dP;function t6(){if(dP)return O0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return O0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},O0}var S0,mP;function r6(){if(mP)return S0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return S0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},S0}var E0,gP;function n6(){if(gP)return E0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return E0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},C0}var w0,bP;function i6(){return bP||(bP=1,w0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),w0}var k0,vP;function a6(){if(vP)return k0;vP=1;const c=Ze();return k0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(V){if(a.destructuredArrayIgnorePattern&&V.name.parent.type==="ArrayPattern")return"array-destructure";switch(V.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(V){let Q,$;switch(V){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${V}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"defined",additional:$}}function y(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"assigned a value",additional:$}}function O(V,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:V.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(V){const Q=V.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(V){return V.type==="Property"&&V.parent.type==="ObjectPattern"&&p.test(V.parent.properties.at(-1).type)}function b(V){if(a.ignoreRestSiblings){const Q=V.defs.some(W=>f(W.name.parent)),$=V.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(V){return V.isRead()}function E(V,Q){let $=V.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(V){const Q=[];return V.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(V,Q){return V.range[0]>=Q.range[0]&&V.range[1]<=Q.range[1]}function T(V){const Q=V.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===V?T(Q):!0:!1}function R(V,Q){const $=V.identifier,W=$.parent,K=V.from.variableScope,te=V.resolved.scope.variableScope,U=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!U?W.right:null}function F(V,Q){let $=V,W=V.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(V,Q){const $=c.getUpperFunction(V);return $&&D($,Q)&&F($,Q)}function N(V,Q){const $=V.identifier,W=$.parent;return V.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(V){let Q=V.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(V){if(V.eslintUsed)return!0;const Q=k(V),$=Q.length>0;let W=null;return V.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(V){const Q=V.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(V)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(V,Q){const $=V.variables,W=V.childScopes;let K,te;if(V.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(U))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"variable")});continue}}!L(U)&&!g(U)&&!b(U)&&Q.push(U)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let U;te.length>0&&(U=te.at(-1)),s.report({node:U?U.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:V,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},k0}var A0,xP;function o6(){if(xP)return A0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return A0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},P0}var T0,SP;function u6(){if(SP)return T0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return T0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const V=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=V.length-1;do Q--,$--;while(T[Q]===V[$]);const W=$+1,K=V.slice(0,W),te=V.slice(W),U=te.find(o),ae=U&&U.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},T0}var D0,EP;function c6(){if(EP)return D0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return D0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},D0}var I0,CP;function f6(){return CP||(CP=1,I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),I0}var R0,wP;function p6(){if(wP)return R0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},R0}var F0,kP;function h6(){if(kP)return F0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},F0}var _0,AP;function d6(){if(AP)return _0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return B0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const V=P[0];if(I==="^"&&V.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!V.negate||V.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},L0}var N0,DP;function y6(){if(DP)return N0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return N0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},N0}var M0,IP;function b6(){if(IP)return M0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return M0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},M0}var $0,RP;function v6(){return RP||(RP=1,$0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),$0}var j0,FP;function x6(){if(FP)return j0;FP=1;const c=zl(),s=Ze(),u=40;return j0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},j0}var q0,_P;function O6(){if(_P)return q0;_P=1;const c=Ze();return q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},q0}var Q0,BP;function S6(){return BP||(BP=1,Q0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),Q0}var V0,LP;function E6(){if(LP)return V0;LP=1;const c={enum:["beside","below","any"]};return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},V0}var U0,NP;function C6(){if(NP)return U0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return U0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},U0}var W0,MP;function w6(){if(MP)return W0;MP=1;const c=Ze();return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},W0}var G0,$P;function k6(){return $P||($P=1,G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+U;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${U}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function V(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":V,"FunctionDeclaration:exit":V,"FunctionExpression:exit":V,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},z0}var Z0,qP;function P6(){if(qP)return Z0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return Z0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!V||G.required&&V?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(V=>V.range[0]===I.parent.range[0]),G=L[j-1];return V=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(V.replaceText($,",")):W.push(V.insertTextAfter($,",")),W.push(V.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const V=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(V.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(V.loc.start.line>G.loc.end.line||V.type==="Line"||V.type==="Block"){let $=V;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),V=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&V&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},Z0}var X0,QP;function T6(){return QP||(QP=1,X0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),X0}var Y0,VP;function D6(){if(VP)return Y0;VP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return Y0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},Y0}var H0,UP;function I6(){if(UP)return H0;UP=1;const c=Ze();return H0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},H0}var K0,WP;function R6(){if(WP)return K0;WP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},K0}var J0,GP;function F6(){if(GP)return J0;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),U=j(K,Q);te.verify(D,K,Q,U)}F.prevNode=Q}function V(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:V,"SwitchCase:exit":N}}},J0}var ey,zP;function _6(){if(zP)return ey;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ey={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ey}var ty,ZP;function B6(){if(ZP)return ty;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EV.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const V=L.declarations[0];if(V.init){const Q=V.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(V=>V.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let V=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?V+=Q.id.properties.length:Q.id.type==="ArrayPattern"?V+=Q.id.elements.length:V+=1}),G=G&&T===V}I.forEach(V=>{f.report({node:V,messageId:"useConst",data:V,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ty}var ry,XP;function L6(){if(XP)return ry;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ry={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ry}var ny,YP;function N6(){if(YP)return ny;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return ny={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},ny}var sy,HP;function M6(){if(HP)return sy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return sy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},sy}var iy,KP;function $6(){if(KP)return iy;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return iy={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},iy}var ay,JP;function j6(){if(JP)return ay;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return ay={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},ay}var oy,eT;function q6(){if(eT)return oy;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const V=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),V[1]),L.range[1]];yield T.removeRange(V),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return oy={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},oy}var ly,tT;function Q6(){if(tT)return ly;tT=1;const c=Ze();return ly={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},ly}var uy,rT;function V6(){return rT||(rT=1,uy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),uy}var cy,nT;function U6(){if(nT)return cy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=sg();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return cy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function V($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:U}of K.iterateGlobalReferences(te))if(b&&F(U)){const ae=U.arguments[0];if(U.arguments.length===2){const z=[],ue=D(U.arguments[1])||"";V(U,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&V(U,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:U,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(U,Q(U,`/${Be}/${pe}`))}}))})}else{const z=[];V(U,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:U,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(U,Q(U,ue))}}))})}}else if(R(U)){let ae=D(U.arguments[0]),z=!1,ue;if(U.arguments[1]&&(ue=D(U.arguments[1])),V(U,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},hy}var dy,oT;function Z6(){if(oT)return dy;oT=1;const c=Al(),s=Ze(),u=Uh();return dy={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},dy}var my,lT;function X6(){if(lT)return my;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return my={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},my}var gy,uT;function Y6(){if(uT)return gy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return gy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},gy}var yy,cT;function H6(){if(cT)return yy;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return yy={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},yy}var by,fT;function K6(){if(fT)return by;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return by={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},by}var vy,pT;function J6(){if(pT)return vy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=sg();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return vy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},vy}var xy,hT;function e8(){return hT||(hT=1,xy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),xy}var Oy,dT;function t8(){return dT||(dT=1,Oy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Oy}var Sy,mT;function r8(){if(mT)return Sy;mT=1;const c=Oo(),s=Ze();return Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,V,Q;L?(G="extraSemi",Q=j.loc,V=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},V=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:V})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),V=j||G;L&&V?g(I,!0):!L&&!V&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Sy}var Ey,gT;function n8(){if(gT)return Ey;gT=1;const c=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Ey}var Cy,yT;function s8(){if(yT)return Cy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},Cy}var wy,bT;function i8(){return bT||(bT=1,wy={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),wy}var ky={exports:{}},vT;function a8(){if(vT)return ky.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Py}var Ty,ST;function u8(){if(ST)return Ty;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Ty={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Ty}var Dy,ET;function c8(){if(ET)return Dy;ET=1;const c=Ze();return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Dy}var Iy,CT;function f8(){if(CT)return Iy;CT=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Iy}var Ry,wT;function p8(){if(wT)return Ry;wT=1;const{isEqToken:c}=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Ry}var Fy,kT;function h8(){if(kT)return Fy;kT=1;const c=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},Fy}var _y,AT;function d8(){if(AT)return _y;AT=1;const c=zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return _y={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},_y}var By,PT;function m8(){if(PT)return By;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},By}var Ly,TT;function g8(){if(TT)return Ly;TT=1;const c=Ze();return Ly={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ly}var Ny,DT;function y8(){if(DT)return Ny;DT=1;const c=Ze();return Ny={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},Ny}var My,IT;function b8(){if(IT)return My;IT=1;const c=Ze();return My={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},My}var $y,RT;function v8(){return RT||(RT=1,$y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),$y}var jy,FT;function x8(){return FT||(FT=1,jy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),jy}var qy,_T;function O8(){if(_T)return qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},qy}var Qy,BT;function S8(){if(BT)return Qy;BT=1;const c=Ze();return Qy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Qy}var Vy,LT;function E8(){return LT||(LT=1,Vy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Wy}var Gy,$T;function k8(){return $T||($T=1,Gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),Gy}var zy,jT;function A8(){if(jT)return zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,V=>V.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},zy}var Zy,qT;function QT(){if(qT)return Zy;qT=1;const{LazyLoadingRuleMap:c}=K$();return Zy=new c(Object.entries({"accessor-pairs":()=>t3(),"array-bracket-newline":()=>r3(),"array-bracket-spacing":()=>n3(),"array-callback-return":()=>s3(),"array-element-newline":()=>i3(),"arrow-body-style":()=>a3(),"arrow-parens":()=>o3(),"arrow-spacing":()=>l3(),"block-scoped-var":()=>u3(),"block-spacing":()=>c3(),"brace-style":()=>f3(),"callback-return":()=>p3(),camelcase:()=>h3(),"capitalized-comments":()=>d3(),"class-methods-use-this":()=>m3(),"comma-dangle":()=>g3(),"comma-spacing":()=>y3(),"comma-style":()=>b3(),complexity:()=>v3(),"computed-property-spacing":()=>x3(),"consistent-return":()=>O3(),"consistent-this":()=>S3(),"constructor-super":()=>E3(),curly:()=>C3(),"default-case":()=>w3(),"default-case-last":()=>k3(),"default-param-last":()=>A3(),"dot-location":()=>P3(),"dot-notation":()=>T3(),"eol-last":()=>D3(),eqeqeq:()=>I3(),"for-direction":()=>R3(),"func-call-spacing":()=>F3(),"func-name-matching":()=>_3(),"func-names":()=>B3(),"func-style":()=>L3(),"function-call-argument-newline":()=>N3(),"function-paren-newline":()=>M3(),"generator-star-spacing":()=>$3(),"getter-return":()=>j3(),"global-require":()=>q3(),"grouped-accessor-pairs":()=>Q3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>U3(),"id-blacklist":()=>W3(),"id-denylist":()=>G3(),"id-length":()=>z3(),"id-match":()=>Z3(),"implicit-arrow-linebreak":()=>X3(),indent:()=>Y3(),"indent-legacy":()=>H3(),"init-declarations":()=>K3(),"jsx-quotes":()=>J3(),"key-spacing":()=>e5(),"keyword-spacing":()=>t5(),"line-comment-position":()=>r5(),"linebreak-style":()=>n5(),"lines-around-comment":()=>s5(),"lines-around-directive":()=>i5(),"lines-between-class-members":()=>a5(),"logical-assignment-operators":()=>o5(),"max-classes-per-file":()=>l5(),"max-depth":()=>u5(),"max-len":()=>c5(),"max-lines":()=>f5(),"max-lines-per-function":()=>p5(),"max-nested-callbacks":()=>h5(),"max-params":()=>d5(),"max-statements":()=>m5(),"max-statements-per-line":()=>g5(),"multiline-comment-style":()=>y5(),"multiline-ternary":()=>b5(),"new-cap":()=>v5(),"new-parens":()=>x5(),"newline-after-var":()=>O5(),"newline-before-return":()=>S5(),"newline-per-chained-call":()=>E5(),"no-alert":()=>C5(),"no-array-constructor":()=>w5(),"no-async-promise-executor":()=>k5(),"no-await-in-loop":()=>A5(),"no-bitwise":()=>P5(),"no-buffer-constructor":()=>T5(),"no-caller":()=>D5(),"no-case-declarations":()=>I5(),"no-catch-shadow":()=>R5(),"no-class-assign":()=>F5(),"no-compare-neg-zero":()=>_5(),"no-cond-assign":()=>B5(),"no-confusing-arrow":()=>L5(),"no-console":()=>N5(),"no-const-assign":()=>M5(),"no-constant-binary-expression":()=>$5(),"no-constant-condition":()=>j5(),"no-constructor-return":()=>q5(),"no-continue":()=>Q5(),"no-control-regex":()=>V5(),"no-debugger":()=>U5(),"no-delete-var":()=>W5(),"no-div-regex":()=>G5(),"no-dupe-args":()=>z5(),"no-dupe-class-members":()=>Z5(),"no-dupe-else-if":()=>X5(),"no-dupe-keys":()=>Y5(),"no-duplicate-case":()=>H5(),"no-duplicate-imports":()=>K5(),"no-else-return":()=>J5(),"no-empty":()=>ej(),"no-empty-character-class":()=>tj(),"no-empty-function":()=>rj(),"no-empty-pattern":()=>nj(),"no-empty-static-block":()=>sj(),"no-eq-null":()=>ij(),"no-eval":()=>aj(),"no-ex-assign":()=>oj(),"no-extend-native":()=>lj(),"no-extra-bind":()=>uj(),"no-extra-boolean-cast":()=>cj(),"no-extra-label":()=>fj(),"no-extra-parens":()=>pj(),"no-extra-semi":()=>hj(),"no-fallthrough":()=>dj(),"no-floating-decimal":()=>mj(),"no-func-assign":()=>gj(),"no-global-assign":()=>yj(),"no-implicit-coercion":()=>bj(),"no-implicit-globals":()=>vj(),"no-implied-eval":()=>xj(),"no-import-assign":()=>Oj(),"no-inline-comments":()=>Sj(),"no-inner-declarations":()=>Ej(),"no-invalid-regexp":()=>Cj(),"no-invalid-this":()=>wj(),"no-irregular-whitespace":()=>kj(),"no-iterator":()=>Aj(),"no-label-var":()=>Pj(),"no-labels":()=>Tj(),"no-lone-blocks":()=>Dj(),"no-lonely-if":()=>Ij(),"no-loop-func":()=>Rj(),"no-loss-of-precision":()=>Fj(),"no-magic-numbers":()=>_j(),"no-misleading-character-class":()=>qj(),"no-mixed-operators":()=>Qj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Uj(),"no-multi-assign":()=>Wj(),"no-multi-spaces":()=>Gj(),"no-multi-str":()=>zj(),"no-multiple-empty-lines":()=>Zj(),"no-native-reassign":()=>Xj(),"no-negated-condition":()=>Yj(),"no-negated-in-lhs":()=>Hj(),"no-nested-ternary":()=>Kj(),"no-new":()=>Jj(),"no-new-func":()=>eq(),"no-new-native-nonconstructor":()=>tq(),"no-new-object":()=>rq(),"no-new-require":()=>nq(),"no-new-symbol":()=>sq(),"no-new-wrappers":()=>iq(),"no-nonoctal-decimal-escape":()=>aq(),"no-obj-calls":()=>oq(),"no-object-constructor":()=>lq(),"no-octal":()=>uq(),"no-octal-escape":()=>cq(),"no-param-reassign":()=>fq(),"no-path-concat":()=>pq(),"no-plusplus":()=>hq(),"no-process-env":()=>dq(),"no-process-exit":()=>mq(),"no-promise-executor-return":()=>gq(),"no-proto":()=>yq(),"no-prototype-builtins":()=>bq(),"no-redeclare":()=>vq(),"no-regex-spaces":()=>xq(),"no-restricted-exports":()=>Oq(),"no-restricted-globals":()=>Sq(),"no-restricted-imports":()=>Eq(),"no-restricted-modules":()=>Cq(),"no-restricted-properties":()=>wq(),"no-restricted-syntax":()=>kq(),"no-return-assign":()=>Aq(),"no-return-await":()=>Pq(),"no-script-url":()=>Tq(),"no-self-assign":()=>Dq(),"no-self-compare":()=>Iq(),"no-sequences":()=>Rq(),"no-setter-return":()=>Fq(),"no-shadow":()=>_q(),"no-shadow-restricted-names":()=>Bq(),"no-spaced-func":()=>Lq(),"no-sparse-arrays":()=>Nq(),"no-sync":()=>Mq(),"no-tabs":()=>$q(),"no-template-curly-in-string":()=>jq(),"no-ternary":()=>qq(),"no-this-before-super":()=>Qq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Uq(),"no-undef":()=>Wq(),"no-undef-init":()=>Gq(),"no-undefined":()=>zq(),"no-underscore-dangle":()=>Zq(),"no-unexpected-multiline":()=>Xq(),"no-unmodified-loop-condition":()=>Yq(),"no-unneeded-ternary":()=>Hq(),"no-unreachable":()=>Kq(),"no-unreachable-loop":()=>Jq(),"no-unsafe-finally":()=>e6(),"no-unsafe-negation":()=>t6(),"no-unsafe-optional-chaining":()=>r6(),"no-unused-expressions":()=>n6(),"no-unused-labels":()=>s6(),"no-unused-private-class-members":()=>i6(),"no-unused-vars":()=>a6(),"no-use-before-define":()=>o6(),"no-useless-assignment":()=>l6(),"no-useless-backreference":()=>u6(),"no-useless-call":()=>c6(),"no-useless-catch":()=>f6(),"no-useless-computed-key":()=>p6(),"no-useless-concat":()=>h6(),"no-useless-constructor":()=>d6(),"no-useless-escape":()=>m6(),"no-useless-rename":()=>g6(),"no-useless-return":()=>y6(),"no-var":()=>b6(),"no-void":()=>v6(),"no-warning-comments":()=>x6(),"no-whitespace-before-property":()=>O6(),"no-with":()=>S6(),"nonblock-statement-body-position":()=>E6(),"object-curly-newline":()=>C6(),"object-curly-spacing":()=>w6(),"object-property-newline":()=>k6(),"object-shorthand":()=>A6(),"one-var":()=>P6(),"one-var-declaration-per-line":()=>T6(),"operator-assignment":()=>D6(),"operator-linebreak":()=>I6(),"padded-blocks":()=>R6(),"padding-line-between-statements":()=>F6(),"prefer-arrow-callback":()=>_6(),"prefer-const":()=>B6(),"prefer-destructuring":()=>L6(),"prefer-exponentiation-operator":()=>N6(),"prefer-named-capture-group":()=>M6(),"prefer-numeric-literals":()=>$6(),"prefer-object-has-own":()=>j6(),"prefer-object-spread":()=>q6(),"prefer-promise-reject-errors":()=>Q6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>U6(),"prefer-rest-params":()=>W6(),"prefer-spread":()=>G6(),"prefer-template":()=>z6(),"quote-props":()=>Z6(),quotes:()=>X6(),radix:()=>Y6(),"require-atomic-updates":()=>H6(),"require-await":()=>K6(),"require-unicode-regexp":()=>J6(),"require-yield":()=>e8(),"rest-spread-spacing":()=>t8(),semi:()=>r8(),"semi-spacing":()=>n8(),"semi-style":()=>s8(),"sort-imports":()=>i8(),"sort-keys":()=>o8(),"sort-vars":()=>l8(),"space-before-blocks":()=>u8(),"space-before-function-paren":()=>c8(),"space-in-parens":()=>f8(),"space-infix-ops":()=>p8(),"space-unary-ops":()=>h8(),"spaced-comment":()=>d8(),strict:()=>m8(),"switch-colon-spacing":()=>g8(),"symbol-description":()=>y8(),"template-curly-spacing":()=>b8(),"template-tag-spacing":()=>v8(),"unicode-bom":()=>x8(),"use-isnan":()=>O8(),"valid-typeof":()=>S8(),"vars-on-top":()=>E8(),"wrap-iife":()=>C8(),"wrap-regex":()=>w8(),"yield-star-spacing":()=>k8(),yoda:()=>A8()})),Zy}var Xy,VT;function P8(){if(VT)return Xy;VT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,H$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Xy=s,Xy}var Yy,UT;function T8(){if(UT)return Yy;UT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Yy=a,Yy}var Hy,WT;function GT(){if(WT)return Hy;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Hy={startTime:c,endTime:s},Hy}var Ky,zT;function D8(){if(zT)return Ky;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Ky=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Ky}var I8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:I8},Jy,XT;function YT(){if(XT)return Jy;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return Jy={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},Jy}var eb={},tb={},rb,HT;function R8(){if(HT)return rb;HT=1,rb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return nb}var sb,JT;function _8(){if(JT)return sb;JT=1;var c=R8(),s=F8();sb=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],V;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,U=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}V.push(ue)}}else V=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var V="",Q=!!G.nocase,$=!1,W=[],K=[],te,U=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":V+=d,Q=!0;break;case"?":V+=a,Q=!0;break;default:V+="\\"+te;break}ne.debug("clearStateChar %j %j",te,V),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=V.slice(0,pt.reStart),qt=V.slice(pt.reStart,pt.reEnd-8),Vt=V.slice(pt.reEnd-8,pt.reEnd),tr=V.slice(pt.reEnd);Vt+=tr;var fe=kt.split("(").length-1,Ue=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var V=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=U===te,this.debug("string match",te,U,ne)):(ne=U.match(te),this.debug("pattern match",te,U,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ib}var So={},tD;function L8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=B8(),p=$i(),a=L8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function V(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function U(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,U(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await V(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(tb)),tb}var ab,sD;function iD(){if(sD)return ab;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ab={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ab}var ob,aD;function lb(){if(aD)return ob;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(V){return typeof V=="object"&&V!==null}function p(V){return u(V)&&!Array.isArray(V)}function a(V){return typeof V>"u"}function d(V,Q,$=new Map){let W=$.get(V);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(V,W);const K={...V,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(V,te))continue;const U=V[te],ae=Q[te];p(U)&&p(ae)?K[te]=d(U,ae,$):a(ae)&&(K[te]=U)}return K}function v(V){const Q=Array.isArray(V)?V.slice(0):[V];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(V){for(const Q of Object.keys(V))if(typeof V[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(V,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(V,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(V,Q){if(typeof s.get(Q)>"u")throw new O(V,Q)}function g(V){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(V))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${V}".`)}function f(V){if(!u(V))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(V,Q){const $=Q===void 0?V:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(V){if(!(k.has(V)||typeof V=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(V={},Q={}){return d(V,Q)},validate:"object"},R={merge(V={},Q={}){const $=d(V,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??V[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(V={},Q={}){const $=new Set([...Object.keys(V),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in V&&K in Q&&V[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||V[K]}return W},validate(V){if(V===null||typeof V!="object")throw new TypeError("Expected an object.");if(Array.isArray(V))throw new S(V);for(const Q of Object.keys(V))if(Q!=="__proto__"&&(V[Q]===null||typeof V[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(V){if(typeof V=="string")g(V);else if(V&&typeof V=="object"){if(typeof V.preprocess!="function"||typeof V.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(V={},Q={}){const $={...V,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in V)||!(W in Q))continue;const K=v(V[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(V){f(V);for(const Q of Object.keys(V)){if(Q==="__proto__")continue;const $=V[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(V){return{merge:"replace",validate(){throw new b(V)}}}return ob={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(V=>[V,L(V)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},ob}var ub={},cb,oD;function N8(){if(oD)return cb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return cb={validateLanguageOptions:o},cb}var fb,lD;function uD(){if(lD)return fb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=Gl(),p=$c(),a=wl(),{validateLanguageOptions:d}=N8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return fb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},fb}var cD;function M8(){if(cD)return ub;cD=1;const c=QT();return ub.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Al(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],ub}var pb={},$8="http://json-schema.org/draft-04/schema#",j8="http://json-schema.org/draft-04/schema#",q8="Core schema meta-schema",Q8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",U8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},W8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},G8={id:$8,$schema:j8,description:q8,definitions:Q8,type:V8,properties:U8,dependencies:W8,default:{}},hb,fD;function z8(){if(fD)return hb;fD=1;const c=f1(),s=G8;return hb=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},hb}var pD;function hD(){if(pD)return pb;pD=1;const s=z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return pb.RuleValidator=o,pb}var db,dD;function Z8(){var x,g;if(dD)return db;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=lb(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,db={Config:O},db}var mD;function X8(){if(mD)return eb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=lb(),{defaultConfig:p}=M8(),{Config:a}=Z8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return eb.FlatConfigArray=O,eb}var mb,gD;function Y8(){return gD||(gD=1,mb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),mb}var gb,yD;function bD(){if(yD)return gb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return gb={VFile:u},gb}var yb,vD;function H8(){if(vD)return yb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return yb={ParserService:c},yb}var bb={},xD;function K8(){if(xD)return bb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return bb.FileContext=c,bb}var vb,OD;function J8(){if(OD)return vb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return vb={ProcessorService:u},vb}var xb,SD;function e9(){var Ve,Sx,Oe,Ex;if(SD)return xb;SD=1;const c=ao,s=$c(),u=wl(),p=Al(),a=vL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=ep(),{SourceCode:O}=BE(),x=U$(),{ConfigCommentParser:g}=RE(),f=z$(),b=Y$(),S=P8(),E=gE(),k=T8(),D=D8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=X8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=lb(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:V,inactiveFlags:Q}=Y8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,U=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=H8(),{FileContext:pe}=K8(),{ProcessorService:Be}=J8(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(U.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=U.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,U.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(U.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=U.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Vt(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},U.parseListConfig(U.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ue(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ue(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Vt(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Ut(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Ut(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function pr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ve);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!V.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ve,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ve,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Vt(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},xb={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},xb}function t9(){return e9().Linter}var r9=l.Linter=t9();t.Linter=r9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(dH,hc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=bl.define(t);return[r,E_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const gH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class UI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",e.class]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[xX,ml.of([Rz]),mY(),vX(),fX(vY(new hc.Linter,{languageOptions:{globals:{...hH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),gH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class yH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class bH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(yH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Su="workshop-data-light@0.0.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Su+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Su+e,t(l.current)),l.persist=h=>localStorage.setItem(Su+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Su+e),l}class vH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Eu,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??X9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??J9,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const xH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(vH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var fl,na,Ma;class OH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new gV);or(this,"__module",Ds);An(this,fl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=C9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"is-data-mode":this.state.dataMode,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:n4}),zt("span",null,document.title)),zt("a",{innerHTML:e4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(UI,{class:"editor__code",ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(UI,{class:"editor__data",ref:this.ref("data"),content:this.store.data}),zt(bH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Eu,null,zt(Hs,{icon:Pb(this.state.dataMode,t=>t?r4:t4),label:Pb(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Hs,{icon:Y9,title:"Commencer un nouveau programme","event-click":t=>xH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),zt(Eu,null,zt(Eu,{compact:!0},zt(Hs,{icon:Pb(this.state.running,t=>t?K9:H9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames}),zt("hr",null),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,fl)),Cr(this,fl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await OV({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}fl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(OH,null)); diff --git a/assets/index-872bade6.css b/assets/index-872bade6.css new file mode 100644 index 0000000..b63585d --- /dev/null +++ b/assets/index-872bade6.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--body-font-family, inherit);font-size:var(--body-font-size, inherit);font-weight:var(--body-font-weight, inherit);font-style:var(--body-font-style, normal);font-synthesis:var(--body-font-synthesis, none);font-feature-settings:var(--body-font-feature-settings, initial);font-variant:var(--body-font-variant, none);font-kerning:var(--body-font-kerning, auto);line-height:var(--body-line-height, inherit);text-transform:var(--body-text-transform, none);text-underline-offset:var(--body-text-underline-offset, inherit);text-decoration-thickness:var(--body-text-decoration-thickness, from-font);word-spacing:var(--body-word-spacing, normal);letter-spacing:var(--body-letter-spacing, normal);font-variation-settings:var(--body-font-variation-settings, initial);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}a{color:inherit}::selection{color:var(--color-background);background:var(--color-dash)}:root{--gutter: 2rem;--gap: 1rem;--color-text: #222;--color-background: #e0e0e0;--color-dash: #454759;--ui-font-size: 1.4rem;--ui-line-height: 1.2;--ui-color-text: var(--color-background);--ui-color-text-dim: var(--color-text);--ui-color-background: #2d2f3f;--ui-color-background-dim: var(--color-background);--ui-color-accent: #bc93f9;--ui-color-accent-contrast: var(--color-text);--body-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--body-font-size: 1.67rem;--body-line-height: 1.3;--small-font-size: 1.4rem}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes bounce{0%{transform:translateY(-10%) scale(.9,1.1)}20%{transform:translateY(-50%) rotate(60deg)}50%{transform:translateY(-50%) rotate(120deg)}80%{transform:rotate(180deg)}to{transform:scale(1.1,.8) rotate(180deg)}}[class^=ui-modal__content-]{color:var(--color-text)}[class^=ui-toolbar-] hr{border-left-color:var(--color-dash)}.readonly{pointer-events:none}.app{display:grid;grid-template:"header header" "editor scene" "footer footer";grid-template-columns:1fr 20rem;grid-template-rows:var(--ui-height) 1fr var(--ui-height);gap:var(--gap);height:100%;padding:var(--gutter)}.app__header{grid-area:header;width:100%}.app__header,.app__header fieldset{display:flex;align-items:center;gap:var(--ui-gap)}.app__header .app__logo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1.5em;height:1.5em;fill:var(--ui-color-background);animation:rotate 3s infinite linear}.app:not(.is-running) .app__header .app__logo{animation-play-state:paused}.app.has-error .app__header .app__logo{fill:#dd1110;animation:bounce .6s infinite ease;animation-play-state:running}.app__header .app__title{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;flex:1;display:flex;align-items:center;gap:var(--gap);font-size:inherit}.app .editor{grid-area:editor}.app .editor__data,.app.is-data-mode .editor__code{display:none}.app.is-data-mode .editor__data{display:flex}.app .scene{grid-area:scene}.app__footer{grid-area:footer;display:flex;justify-content:space-between}.app__export fieldset{--ui-color-background: var(--color-background);--ui-color-text: var(--color-text);--ui-border: 1px solid var(--color-dash);display:flex;flex-direction:column;gap:var(--ui-gap);min-width:35rem}.app__export fieldset>*{width:100%}.app__export fieldset>*:hover,.app__export fieldset>*:focus{border-color:var(--ui-color-accent)}.app__export fieldset label{color:var(--color-dash)}.app__export input[type=text]{text-align:right}.app__export textarea{padding:var(--ui-padding-container);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--color-text);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius)}.app__export textarea:hover,.app__export textarea:focus{background:var(--ui-color-accent);outline:0}.app__export footer{padding:0;margin-top:var(--gutter)}.app__export footer>*{width:100%;justify-content:center}.editor{display:flex;overflow:hidden}.editor__view{flex:1;overflow:hidden;border-radius:var(--ui-border-radius)}.editor__view .cm-selectionBackground{background:var(--color-dash)!important}.editor__view .cm-activeLine{background-color:inherit}.editor__view .cm-scroller{margin-block:.5em}.editor__view .cm-editor{height:100%;max-height:100%}.editor__view .cm-lint-marker-error{content:url('data:image/svg+xml,%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2212%22%20fill%3D%22%23dd1110%22%20%2F%3E')}.editor__view .cm-diagnostic{padding:.5em;background:var(--ui-color-background)!important;outline:1px solid var(--color-dash)}.editor__view .cm-gutters{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#2d2f3f;border-right:1px solid var(--color-dash)}.editor__view .cm-lineNumbers .cm-gutterElement{font-family:var(--small-font-family, inherit);font-size:var(--small-font-size, inherit);font-weight:var(--small-font-weight, inherit);font-style:var(--small-font-style, normal);font-synthesis:var(--small-font-synthesis, none);font-feature-settings:var(--small-font-feature-settings, initial);font-variant:var(--small-font-variant, none);font-kerning:var(--small-font-kerning, auto);line-height:var(--small-line-height, inherit);text-transform:var(--small-text-transform, none);text-underline-offset:var(--small-text-underline-offset, inherit);text-decoration-thickness:var(--small-text-decoration-thickness, from-font);word-spacing:var(--small-word-spacing, normal);letter-spacing:var(--small-letter-spacing, normal);font-variation-settings:var(--small-font-variation-settings, initial);display:flex;padding-left:1em;justify-content:flex-end;align-items:center}.editor__view .cm-foldGutter .cm-gutterElement{font-size:smaller;padding-inline:.5em}.editor__view .cm-line{padding-inline:.5em 1em;padding-block:.05em}.scene{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:grid;place-items:center;padding:var(--gutter);cursor:zoom-in;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.scene canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1px;height:auto}.scene.is-zoomed{cursor:zoom-out;background:black}.scene.is-zoomed canvas{position:absolute;inset:var(--gap);width:calc(100% - var(--gap) * 2);height:calc(100% - var(--gap) * 2);border-radius:3px}.canvas{image-rendering:pixelated;-webkit-optimize-contrast:crisp-edges}*{text-decoration-thickness:inherit}.confirm-modal{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;--ui-modal-width: 41rem}.confirm-modal__content:not(:empty){margin-bottom:var(--gutter)}.confirm-modal__toolbar{width:100%}.confirm-modal__toolbar>*{flex:1;justify-content:center} diff --git a/assets/index-9791cdfb.js b/assets/index-9791cdfb.js new file mode 100644 index 0000000..0df3abc --- /dev/null +++ b/assets/index-9791cdfb.js @@ -0,0 +1,89 @@ +var iO=Object.defineProperty;var nO=(n,e,t)=>e in n?iO(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var qt=(n,e,t)=>(nO(n,typeof e!="symbol"?e+"":e,t),t),sO=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var ct=(n,e,t)=>(sO(n,e,"read from private field"),t?t.call(n):e.get(n)),us=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)};(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();function D(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}D.f=n=>n.children;function za(n,e){for(const t in e)n[t]=e[t];return n}function de(){}function rO(n,e,t,i){if(i)return{log:de,warn:de,error:de};const s=[];n=n.toUpperCase(),s.push(`%c ${n} `);let r="font-weight:bold;";return e&&(r+=`color:${e};`),t&&(r+=`background-color:${t}`),s.push(r),{log:console.log.bind(console,...s),warn:console.warn.bind(console,...s),error:console.error.bind(console,...s)}}const Ba=["nodes","components","refs","domEvents","storeEvents"];let sn=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let Wr;const hi=(n,e)=>n.substr(0,e.length)===e,Va=n=>(e,t)=>t.classList.toggle(n,e||!1),Gr=(n="textContent",e)=>(t,i)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))i.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){i.removeAttribute(n);return}Wr=t??"",e||(i[n]=Wr),(e||oO.has(n)||hi(n,"data-"))&&i.setAttribute(n,Wr)}};function lO(n,e,t,i,s){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let r=0;r{r.startsWith("--")?n.style.setProperty(r,l):n.style[r]=l};Fr((t??[])[r])?i.append({storeEvents:[{store:t[r],init:!0,fn:o,el:n}]}):o(t[r])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!s&&e in n)try{Gr(e,s)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Gr(e,s)(t,n)}}function aO(n){return Array.isArray(n)?n:[n]}function es(n,e){if(Array.isArray(n))return hO(n,e);if(n instanceof window.Element)return uO(n);if(n===null||typeof n!="object"||!n.vnode)return cO(n);const t=za(za({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return fO(n,t,e);if(n.isInstance)return Na(n,t,e,!0);if(n.isStateless)return dO(n,t,e);if(n.isComponent)return Na(n,t,e)}function hO(n,e){n=aO(n);const t=new sn;for(let i=0;i1?l:l[0];for(const a in s.data)a!=="nodes"&&(r._collector[a]||(r._collector[a]=[]),r._collector[a]=r._collector[a].concat(s.data[a]));s.set({components:[r],refs:[],domEvents:[],storeEvents:[]});for(let a=0;ae.startsWith("data-")).reduce((e,[t,i])=>({...e,[t]:i}),{})}storeSubscribe(e,t,i,s=!0){e.subscribe(t,i),this._storeListeners.push([e,t,i]),s&&t.call(i,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(i){t.refs[e]=i}}refArray(e,t=!1){const i=this.refs[e]||(this.refs[e]=[]);let s=i.length,r,o;return t&&(r=this.refs.__pools||(this.refs.__pools={}),o=r[e]||(r[e]=[]),o.length&&(s=o.pop())),i[s]=null,function(l){i[s]=l,t&&o.push(s)}}refMap(e,t){const i=this.refs[t]||(this.refs[t]=new Map);return function(s){s?i.set(e,s):i.delete(e)}}render(e,t){return Bl(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const i=this._collector.domEvents[e];i.el.removeEventListener(i.evt,i.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const i=this._collector.storeEvents[e];i.store.unsubscribe(i.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const i=this._storeListeners[e];i[0].unsubscribe(i[1],i[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const i=this._parent._collector.components.indexOf(this);~i&&this._parent._collector.components.splice(i,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(r=xO(r),r in Ia)return;Ia[r]=!0;const o=r.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let c=s.length-1;c>=0;c--){const f=s[c];if(f.href===r&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":wO,o||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),o)return new Promise((c,f)=>{h.addEventListener("load",c),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e())};var ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo={},kO={get exports(){return qo},set exports(n){qo=n}};(function(n){(function(e){let t;function i(c,f){const u=c.charCodeAt(f);if(isNaN(u))throw new RangeError("Index "+f+' out of range for string "'+c+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(u<55296||u>57343)return[c.charAt(f),f];if(u>=55296&&u<=56319){if(c.length<=f+1)return[" ",f];const O=c.charCodeAt(f+1);return O<56320||O>57343?[" ",f]:[c.charAt(f)+c.charAt(f+1),f+1]}if(f===0)return[" ",f];const p=c.charCodeAt(f-1);if(p<55296||p>56319)return[" ",f];throw new Error('String "'+c+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(c){return btoa(unescape(encodeURIComponent(c)))}:t=function(c){const f=unescape(encodeURIComponent(c+""));let u="";for(let p,O,g=0,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.charAt(g|0)||(m="=",g%1);u+=m.charAt(63&p>>8-g%1*8)){if(O=f.charCodeAt(g+=3/4),O>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|O}return u}:t=function(c){return Buffer.from(c).toString("base64")};function s(c,f){let u=l(c,f);if((f&&f.fallback!==void 0?f.fallback:s.defaults.fallback)===!0&&u===""){let O="";for(let g=0;g1?u[f[O]]=c[f[O]]:p[f[O]]=c[f[O]];Object.assign(s.charmap,p),Object.assign(s.multicharmap,u)},s.setLocale=function(c){o=r[c]||{}},n.exports?n.exports=s:e.slug=s})(ci)})(kO);function vO(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,i=0,s=0;return function(r){i-=r,s+=r,i<=0&&(e(s),s=0,i=t+i%t)}}var Zr=typeof window>"u"?global:window,di=[],Ii=[],Fi=[],Ft=null,pi=null,An=!1,Vl=!1,Nl,Xt;function Ks(n){n===void 0&&(n=0),pi===null&&(pi=n),Xt=n-pi,Nl+=Xt,pi=n,Ft=An?null:Zr.requestAnimationFrame(Ks),An&&(An=!1);var e;if(Vl){for(e=0;e0||Fi.length>0}function Il(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Fl(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function QO(n,e){Il(Fi,n,e)&&Mr()}function PO(n,e){Il(Ii,n,e)&&Mr()}function $O(n,e){Il(di,n,e)&&of()}function CO(n){Fl(Fi,n)&&Mr()}function AO(n,e){Fl(Ii,n)&&Mr()}function ZO(n){Fl(di,n)&&Wl()}function of(n){An=!1,!Ft&&(n=!!n,pi=null,n?Ks():Ft=Zr.requestAnimationFrame(Ks))}function MO(){Ft||(An=!0,pi=null,Ft=Zr.requestAnimationFrame(Ks))}function Wl(){Ft&&(Zr.cancelAnimationFrame(Ft),Ft=null)}function RO(){Wl(),di.length=0,Ii.length=0,Fi.length=0,Vl=!1,pi=null,Nl=0,Xt=0}const Fa={add:$O,addAfter:PO,addBefore:QO,remove:ZO,removeAfter:AO,removeBefore:CO,start:of,stop:Wl,time:Nl,dt:Xt,requestOnce:MO,dispose:RO};function Wa(n,e,t,i){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!i}function Ur(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let lf=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,i,s,r){let o=this._first;for(;o;)o.fn.call(o.ctx,e,t,i,s,r),o.once&&this.unsubscribe(o),o=o.next}subscribe(e,t,i){const s=new Wa(this,e,t,i);return this._first?(this._last.next=s,s.prev=this._last,this._last=s):(this._first=s,this._last=s),s}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof Wa)return Ur(this,e);t||(t=null);let i=this._first;for(;i;)i.fn===e&&i.ctx===t&&Ur(this,i),i=i.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Ur(this,e),e=e.next}},TO=class extends lf{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},af=class extends TO{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let i=this._first;for(;i;)i.fn.call(i.ctx,this.current,this.previous),i.once&&this.unsubscribe(i),i=i.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const i=e(this.current);this.set(i!==void 0?i:this.current,t)}};function z(n){return new af(n)}function Hr(n,e){const t=new af,i=t.set.bind(t);delete t.set;const s=Array.isArray(n);let r=s?new Array(n.length):null;if(s)for(let l=0,a=n.length;l(...e)=>{for(const t of e){if(t instanceof lf)return t;if(t!==void 0)return n(t)}return n(null)},EO="ui-backdrop-1l3kn107",LO={backdrop:EO,"loader-spin":"ui-loader-spin-1l3kn1"};class DO extends vt{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:F(z)(e["store-locked"],e.locked)}}template(e,t){return D("div",{...this.dataProps,id:e.id,class:[LO.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":i=>(e["event-click"]??de)(i,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??de)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||de)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const _O="ui-button-1urez107",qO="ui-button__label-1urez161",XO="ui-button__icon-1urez171",Kr={button:_O,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:qO,"is-active":"is-active","is-waiting":"is-waiting",button__icon:XO,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Zt extends vt{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:F(z)(e["store-label"],e.label),title:F(z)(e["store-title"],e.title),icon:F(z)(e["store-icon"],e.icon),active:F(z)(e["store-active"],e.active),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden),waiting:F(z)(e["store-waiting"],e.waiting)}}template(e,t){return D("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Kr.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("span",{ref:this.ref("icon"),class:Kr.button__icon,"store-innerHTML":t.icon}),D("label",{class:Kr.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const jO="ui-input-ada4i107",YO="ui-input__icon-ada4i150",dn={input:jO,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:YO,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class pn extends vt{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:F(z)(e["store-value"],e.value),files:F(z)(e["store-files"],e.files),placeholder:F(z)(e["store-placeholder"],e.placeholder),title:F(z)(e["store-title"],e.title),label:F(z)(e["store-label"],e.label),before:F(z)(e["store-before"],e.before),after:F(z)(e["store-after"],e.after),icon:F(z)(e["store-icon"],e.icon),accept:F(z)(e["store-accept"],e.accept??"*"),multiple:F(z)(e["store-multiple"],e.multiple??"*"),min:F(z)(e["store-min"],e.min),max:F(z)(e["store-max"],e.max),step:F(z)(e["store-step"],e.step),active:F(z)(e["store-active"],e.active),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden),waiting:F(z)(e["store-waiting"],e.waiting)}}template(e,t){return D("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[dn.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("span",{ref:this.ref("icon"),class:dn.input__icon,"store-innerHTML":t.icon}),D("label",{class:dn.input__label,"store-innerHTML":t.label}),D("label",{class:dn.input__before,"store-innerHTML":t.before}),D("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":i=>i.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":i=>(e["event-blur"]??de)(i,this)}),D("label",{class:dn.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??de)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??de)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??de)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??de)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const zO="ui-modal-1ng3s107",BO="ui-modal__header-1ng3s119",VO="ui-modal__title-1ng3s125",NO="ui-modal__content-1ng3s129",On={modal:zO,modal__header:BO,modal__title:VO,modal__content:NO,"loader-spin":"ui-loader-spin-1ng3s1"},IO=` + + +`;class hf extends vt{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:F(z)(e["store-title"],e.title),tabs:F(z)(e["store-tabs"],e.tabs),locked:F(z)(e["store-locked"],e.locked)}}template(e,t){return D(DO,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},D("div",{...this.dataProps,id:e.id,class:[On.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("header",{class:On.modal__header},D(Zt,{class:On.modal__title,icon:e.icon,"store-label":t.title}),D(Zt,{class:On.modal__close,icon:IO,"store-hidden":t.locked,"event-click":this.handleClose})),D("div",{class:On.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const FO="ui-toolbar-1r0eh107",WO={toolbar:FO,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Ys extends vt{beforeRender(e){this.state={compact:F(z)(e["store-compact"],e.compact),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden)}}template(e,t){return D("div",{...this.dataProps,id:e.id,class:[WO.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},e.children)}}function Ga(n,e,t){var i,s,r,o,l;e==null&&(e=100);function a(){var c=Date.now()-o;c=0?i=setTimeout(a,e-c):(i=null,t||(l=n.apply(r,s),r=s=null))}var h=function(){r=this,s=arguments,o=Date.now();var c=t&&!i;return i||(i=setTimeout(a,e)),c&&(l=n.apply(r,s),r=s=null),l};return h.clear=function(){i&&(clearTimeout(i),i=null)},h.flush=function(){i&&(l=n.apply(r,s),r=s=null,clearTimeout(i),i=null)},h}Ga.debounce=Ga;const GO=` + + +`,UO=` + + + +`,HO=` + + + +`,KO=` + + + +`,JO=` + + +`,eg=` + + + + + + +`,Ua=` + + + + +`,tg=` + + + + +`,ig=` + + + + +`,Ha=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,ng=` + + +`;function cf(n,e,t){return Math.max(e,Math.min(n,t))}function ff(n,e,t){return n>t?n%t:ndg(pg(e,n),t),Gl=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=yi(n[e],0,255)):e===3&&(n[e]=yi(n[e],0,1));return n},pf={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])pf[`[object ${n}]`]=n.toLowerCase();function N(n){return pf[Object.prototype.toString.call(n)]||"object"}const Y=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):N(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),rn=n=>{if(n.length<2)return null;const e=n.length-1;return N(n[e])=="string"?n[e].toLowerCase():null},{PI:Rr,min:Of,max:gf}=Math,Ke=n=>Math.round(n*100)/100,jo=n=>Math.round(n*100)/100,Ct=Rr*2,Jr=Rr/3,Og=Rr/180,gg=180/Rr;function mf(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const j={format:{},autodetect:[]};class ${constructor(...e){const t=this;if(N(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let i=rn(e),s=!1;if(!i){s=!0,j.sorted||(j.autodetect=j.autodetect.sort((r,o)=>o.p-r.p),j.sorted=!0);for(let r of j.autodetect)if(i=r.test(...e),i)break}if(j.format[i]){const r=j.format[i].apply(null,s?e:e.slice(0,-1));t._rgb=Gl(r)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return N(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const mg="3.1.2",V=(...n)=>new $(...n);V.version=mg;const Wi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},bg=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,yg=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,bf=n=>{if(n.match(bg)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,i=e>>8&255,s=e&255;return[t,i,s,1]}if(n.match(yg)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,i=e>>16&255,s=e>>8&255,r=Math.round((e&255)/255*100)/100;return[t,i,s,r]}throw new Error(`unknown hex color: ${n}`)},{round:ps}=Math,yf=(...n)=>{let[e,t,i,s]=Y(n,"rgba"),r=rn(n)||"auto";s===void 0&&(s=1),r==="auto"&&(r=s<1?"rgba":"rgb"),e=ps(e),t=ps(t),i=ps(i);let l="000000"+(e<<16|t<<8|i).toString(16);l=l.substr(l.length-6);let a="0"+ps(s*255).toString(16);switch(a=a.substr(a.length-2),r.toLowerCase()){case"rgba":return`#${l}${a}`;case"argb":return`#${a}${l}`;default:return`#${l}`}};$.prototype.name=function(){const n=yf(this._rgb,"rgb");for(let e of Object.keys(Wi))if(Wi[e]===n)return e.toLowerCase();return n};j.format.named=n=>{if(n=n.toLowerCase(),Wi[n])return bf(Wi[n]);throw new Error("unknown color name: "+n)};j.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&Wi[n.toLowerCase()])return"named"}});$.prototype.alpha=function(n,e=!1){return n!==void 0&&N(n)==="number"?e?(this._rgb[3]=n,this):new $([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};$.prototype.clipped=function(){return this._rgb._clipped||!1};const xt={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},wg=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Mt(n){const e=wg.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);xt.labWhitePoint=n,xt.Xn=e[0],xt.Zn=e[1]}function Ln(){return xt.labWhitePoint}const Ul=(...n)=>{n=Y(n,"lab");const[e,t,i]=n,[s,r,o]=xg(e,t,i),[l,a,h]=wf(s,r,o);return[l,a,h,n.length>3?n[3]:1]},xg=(n,e,t)=>{const{kE:i,kK:s,kKE:r,Xn:o,Yn:l,Zn:a}=xt,h=(n+16)/116,c=.002*e+h,f=h-.005*t,u=c*c*c,p=f*f*f,O=u>i?u:(116*c-16)/s,g=n>r?Math.pow((n+16)/116,3):n/s,m=p>i?p:(116*f-16)/s,b=O*o,w=g*l,S=m*a;return[b,w,S]},eo=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},wf=(n,e,t)=>{const{MtxAdaptMa:i,MtxAdaptMaI:s,MtxXYZ2RGB:r,RefWhiteRGB:o,Xn:l,Yn:a,Zn:h}=xt,c=l*i.m00+a*i.m10+h*i.m20,f=l*i.m01+a*i.m11+h*i.m21,u=l*i.m02+a*i.m12+h*i.m22,p=o.X*i.m00+o.Y*i.m10+o.Z*i.m20,O=o.X*i.m01+o.Y*i.m11+o.Z*i.m21,g=o.X*i.m02+o.Y*i.m12+o.Z*i.m22,m=(n*i.m00+e*i.m10+t*i.m20)*(p/c),b=(n*i.m01+e*i.m11+t*i.m21)*(O/f),w=(n*i.m02+e*i.m12+t*i.m22)*(g/u),S=m*s.m00+b*s.m10+w*s.m20,Q=m*s.m01+b*s.m11+w*s.m21,k=m*s.m02+b*s.m12+w*s.m22,x=eo(S*r.m00+Q*r.m10+k*r.m20),y=eo(S*r.m01+Q*r.m11+k*r.m21),P=eo(S*r.m02+Q*r.m12+k*r.m22);return[x*255,y*255,P*255]},Hl=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=xf(e,t,i),[a,h,c]=Sg(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function Sg(n,e,t){const{Xn:i,Yn:s,Zn:r,kE:o,kK:l}=xt,a=n/i,h=e/s,c=t/r,f=a>o?Math.pow(a,1/3):(l*a+16)/116,u=h>o?Math.pow(h,1/3):(l*h+16)/116,p=c>o?Math.pow(c,1/3):(l*c+16)/116;return[116*u-16,500*(f-u),200*(u-p)]}function to(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const xf=(n,e,t)=>{n=to(n/255),e=to(e/255),t=to(t/255);const{MtxRGB2XYZ:i,MtxAdaptMa:s,MtxAdaptMaI:r,Xn:o,Yn:l,Zn:a,As:h,Bs:c,Cs:f}=xt;let u=n*i.m00+e*i.m10+t*i.m20,p=n*i.m01+e*i.m11+t*i.m21,O=n*i.m02+e*i.m12+t*i.m22;const g=o*s.m00+l*s.m10+a*s.m20,m=o*s.m01+l*s.m11+a*s.m21,b=o*s.m02+l*s.m12+a*s.m22;let w=u*s.m00+p*s.m10+O*s.m20,S=u*s.m01+p*s.m11+O*s.m21,Q=u*s.m02+p*s.m12+O*s.m22;return w*=g/h,S*=m/c,Q*=b/f,u=w*r.m00+S*r.m10+Q*r.m20,p=w*r.m01+S*r.m11+Q*r.m21,O=w*r.m02+S*r.m12+Q*r.m22,[u,p,O]};$.prototype.lab=function(){return Hl(this._rgb)};const kg=(...n)=>new $(...n,"lab");Object.assign(V,{lab:kg,getLabWhitePoint:Ln,setLabWhitePoint:Mt});j.format.lab=Ul;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"lab"),N(n)==="array"&&n.length===3)return"lab"}});$.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=xt.Kn*n,new $(t,"lab").alpha(e.alpha(),!0)};$.prototype.brighten=function(n=1){return this.darken(-n)};$.prototype.darker=$.prototype.darken;$.prototype.brighter=$.prototype.brighten;$.prototype.get=function(n){const[e,t]=n.split("."),i=this[e]();if(t){const s=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(s>-1)return i[s];throw new Error(`unknown channel ${t} in mode ${e}`)}else return i};const{pow:vg}=Math,Qg=1e-7,Pg=20;$.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&N(n)==="number"){if(n===0)return new $([0,0,0,this._rgb[3]],"rgb");if(n===1)return new $([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),i=Pg;const s=(o,l)=>{const a=o.interpolate(l,.5,e),h=a.luminance();return Math.abs(n-h)n?s(o,a):s(a,l)},r=(t>n?s(new $([0,0,0]),this):s(this,new $([255,255,255]))).rgb();return new $([...r,this._rgb[3]])}return $g(...this._rgb.slice(0,3))};const $g=(n,e,t)=>(n=io(n),e=io(e),t=io(t),.2126*n+.7152*e+.0722*t),io=n=>(n/=255,n<=.03928?n/12.92:vg((n+.055)/1.055,2.4)),$e={},Gi=(n,e,t=.5,...i)=>{let s=i[0]||"lrgb";if(!$e[s]&&!i.length&&(s=Object.keys($e)[0]),!$e[s])throw new Error(`interpolation mode ${s} is not defined`);return N(n)!=="object"&&(n=new $(n)),N(e)!=="object"&&(e=new $(e)),$e[s](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};$.prototype.mix=$.prototype.interpolate=function(n,e=.5,...t){return Gi(this,n,e,...t)};$.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new $([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:Cg,cos:Ag}=Math,Sf=(...n)=>{let[e,t,i]=Y(n,"lch");return isNaN(i)&&(i=0),i=i*Og,[e,Ag(i)*t,Cg(i)*t]},Kl=(...n)=>{n=Y(n,"lch");const[e,t,i]=n,[s,r,o]=Sf(e,t,i),[l,a,h]=Ul(s,r,o);return[l,a,h,n.length>3?n[3]:1]},Zg=(...n)=>{const e=mf(Y(n,"hcl"));return Kl(...e)},{sqrt:Mg,atan2:Rg,round:Tg}=Math,kf=(...n)=>{const[e,t,i]=Y(n,"lab"),s=Mg(t*t+i*i);let r=(Rg(i,t)*gg+360)%360;return Tg(s*1e4)===0&&(r=Number.NaN),[e,s,r]},Jl=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=Hl(e,t,i),[a,h,c]=kf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};$.prototype.lch=function(){return Jl(this._rgb)};$.prototype.hcl=function(){return mf(Jl(this._rgb))};const Eg=(...n)=>new $(...n,"lch"),Lg=(...n)=>new $(...n,"hcl");Object.assign(V,{lch:Eg,hcl:Lg});j.format.lch=Kl;j.format.hcl=Zg;["lch","hcl"].forEach(n=>j.autodetect.push({p:2,test:(...e)=>{if(e=Y(e,n),N(e)==="array"&&e.length===3)return n}}));$.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=xt.Kn*n,t[1]<0&&(t[1]=0),new $(t,"lch").alpha(e.alpha(),!0)};$.prototype.desaturate=function(n=1){return this.saturate(-n)};$.prototype.set=function(n,e,t=!1){const[i,s]=n.split("."),r=this[i]();if(s){const o=i.indexOf(s)-(i.substr(0,2)==="ok"?2:0);if(o>-1){if(N(e)=="string")switch(e.charAt(0)){case"+":r[o]+=+e;break;case"-":r[o]+=+e;break;case"*":r[o]*=+e.substr(1);break;case"/":r[o]/=+e.substr(1);break;default:r[o]=+e}else if(N(e)==="number")r[o]=e;else throw new Error("unsupported value for Color.set");const l=new $(r,i);return t?(this._rgb=l._rgb,this):l}throw new Error(`unknown channel ${s} in mode ${i}`)}else return r};$.prototype.tint=function(n=.5,...e){return Gi(this,"white",n,...e)};$.prototype.shade=function(n=.5,...e){return Gi(this,"black",n,...e)};const Dg=(n,e,t)=>{const i=n._rgb,s=e._rgb;return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"rgb")};$e.rgb=Dg;const{sqrt:no,pow:Ci}=Math,_g=(n,e,t)=>{const[i,s,r]=n._rgb,[o,l,a]=e._rgb;return new $(no(Ci(i,2)*(1-t)+Ci(o,2)*t),no(Ci(s,2)*(1-t)+Ci(l,2)*t),no(Ci(r,2)*(1-t)+Ci(a,2)*t),"rgb")};$e.lrgb=_g;const qg=(n,e,t)=>{const i=n.lab(),s=e.lab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"lab")};$e.lab=qg;const on=(n,e,t,i)=>{let s,r;i==="hsl"?(s=n.hsl(),r=e.hsl()):i==="hsv"?(s=n.hsv(),r=e.hsv()):i==="hcg"?(s=n.hcg(),r=e.hcg()):i==="hsi"?(s=n.hsi(),r=e.hsi()):i==="lch"||i==="hcl"?(i="hcl",s=n.hcl(),r=e.hcl()):i==="oklch"&&(s=n.oklch().reverse(),r=e.oklch().reverse());let o,l,a,h,c,f;(i.substr(0,1)==="h"||i==="oklch")&&([o,a,c]=s,[l,h,f]=r);let u,p,O,g;return!isNaN(o)&&!isNaN(l)?(l>o&&l-o>180?g=l-(o+360):l180?g=l+360-o:g=l-o,p=o+t*g):isNaN(o)?isNaN(l)?p=Number.NaN:(p=l,(c==1||c==0)&&i!="hsv"&&(u=h)):(p=o,(f==1||f==0)&&i!="hsv"&&(u=a)),u===void 0&&(u=a+t*(h-a)),O=c+t*(f-c),i==="oklch"?new $([O,u,p],i):new $([p,u,O],i)},vf=(n,e,t)=>on(n,e,t,"lch");$e.lch=vf;$e.hcl=vf;const Xg=n=>{if(N(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,i=n&255;return[e,t,i,1]}throw new Error("unknown num color: "+n)},jg=(...n)=>{const[e,t,i]=Y(n,"rgb");return(e<<16)+(t<<8)+i};$.prototype.num=function(){return jg(this._rgb)};const Yg=(...n)=>new $(...n,"num");Object.assign(V,{num:Yg});j.format.num=Xg;j.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&N(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const zg=(n,e,t)=>{const i=n.num(),s=e.num();return new $(i+t*(s-i),"num")};$e.num=zg;const{floor:Bg}=Math,Vg=(...n)=>{n=Y(n,"hcg");let[e,t,i]=n,s,r,o;i=i*255;const l=t*255;if(t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const a=Bg(e),h=e-a,c=i*(1-t),f=c+l*(1-h),u=c+l*h,p=c+l;switch(a){case 0:[s,r,o]=[p,u,c];break;case 1:[s,r,o]=[f,p,c];break;case 2:[s,r,o]=[c,p,u];break;case 3:[s,r,o]=[c,f,p];break;case 4:[s,r,o]=[u,c,p];break;case 5:[s,r,o]=[p,c,f];break}}return[s,r,o,n.length>3?n[3]:1]},Ng=(...n)=>{const[e,t,i]=Y(n,"rgb"),s=Of(e,t,i),r=gf(e,t,i),o=r-s,l=o*100/255,a=s/(255-o)*100;let h;return o===0?h=Number.NaN:(e===r&&(h=(t-i)/o),t===r&&(h=2+(i-e)/o),i===r&&(h=4+(e-t)/o),h*=60,h<0&&(h+=360)),[h,l,a]};$.prototype.hcg=function(){return Ng(this._rgb)};const Ig=(...n)=>new $(...n,"hcg");V.hcg=Ig;j.format.hcg=Vg;j.autodetect.push({p:1,test:(...n)=>{if(n=Y(n,"hcg"),N(n)==="array"&&n.length===3)return"hcg"}});const Fg=(n,e,t)=>on(n,e,t,"hcg");$e.hcg=Fg;const{cos:Ai}=Math,Wg=(...n)=>{n=Y(n,"hsi");let[e,t,i]=n,s,r,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,s=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,r=1-(o+s)):e<2/3?(e-=1/3,s=(1-t)/3,r=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,o=1-(s+r)):(e-=2/3,r=(1-t)/3,o=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,s=1-(r+o)),s=yi(i*s*3),r=yi(i*r*3),o=yi(i*o*3),[s*255,r*255,o*255,n.length>3?n[3]:1]},{min:Gg,sqrt:Ug,acos:Hg}=Math,Kg=(...n)=>{let[e,t,i]=Y(n,"rgb");e/=255,t/=255,i/=255;let s;const r=Gg(e,t,i),o=(e+t+i)/3,l=o>0?1-r/o:0;return l===0?s=NaN:(s=(e-t+(e-i))/2,s/=Ug((e-t)*(e-t)+(e-i)*(t-i)),s=Hg(s),i>t&&(s=Ct-s),s/=Ct),[s*360,l,o]};$.prototype.hsi=function(){return Kg(this._rgb)};const Jg=(...n)=>new $(...n,"hsi");V.hsi=Jg;j.format.hsi=Wg;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsi"),N(n)==="array"&&n.length===3)return"hsi"}});const em=(n,e,t)=>on(n,e,t,"hsi");$e.hsi=em;const Yo=(...n)=>{n=Y(n,"hsl");const[e,t,i]=n;let s,r,o;if(t===0)s=r=o=i*255;else{const l=[0,0,0],a=[0,0,0],h=i<.5?i*(1+t):i+t-i*t,c=2*i-h,f=e/360;l[0]=f+1/3,l[1]=f,l[2]=f-1/3;for(let u=0;u<3;u++)l[u]<0&&(l[u]+=1),l[u]>1&&(l[u]-=1),6*l[u]<1?a[u]=c+(h-c)*6*l[u]:2*l[u]<1?a[u]=h:3*l[u]<2?a[u]=c+(h-c)*(2/3-l[u])*6:a[u]=c;[s,r,o]=[a[0]*255,a[1]*255,a[2]*255]}return n.length>3?[s,r,o,n[3]]:[s,r,o,1]},Qf=(...n)=>{n=Y(n,"rgba");let[e,t,i]=n;e/=255,t/=255,i/=255;const s=Of(e,t,i),r=gf(e,t,i),o=(r+s)/2;let l,a;return r===s?(l=0,a=Number.NaN):l=o<.5?(r-s)/(r+s):(r-s)/(2-r-s),e==r?a=(t-i)/(r-s):t==r?a=2+(i-e)/(r-s):i==r&&(a=4+(e-t)/(r-s)),a*=60,a<0&&(a+=360),n.length>3&&n[3]!==void 0?[a,l,o,n[3]]:[a,l,o]};$.prototype.hsl=function(){return Qf(this._rgb)};const tm=(...n)=>new $(...n,"hsl");V.hsl=tm;j.format.hsl=Yo;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsl"),N(n)==="array"&&n.length===3)return"hsl"}});const im=(n,e,t)=>on(n,e,t,"hsl");$e.hsl=im;const{floor:nm}=Math,sm=(...n)=>{n=Y(n,"hsv");let[e,t,i]=n,s,r,o;if(i*=255,t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=nm(e),a=e-l,h=i*(1-t),c=i*(1-t*a),f=i*(1-t*(1-a));switch(l){case 0:[s,r,o]=[i,f,h];break;case 1:[s,r,o]=[c,i,h];break;case 2:[s,r,o]=[h,i,f];break;case 3:[s,r,o]=[h,c,i];break;case 4:[s,r,o]=[f,h,i];break;case 5:[s,r,o]=[i,h,c];break}}return[s,r,o,n.length>3?n[3]:1]},{min:rm,max:om}=Math,lm=(...n)=>{n=Y(n,"rgb");let[e,t,i]=n;const s=rm(e,t,i),r=om(e,t,i),o=r-s;let l,a,h;return h=r/255,r===0?(l=Number.NaN,a=0):(a=o/r,e===r&&(l=(t-i)/o),t===r&&(l=2+(i-e)/o),i===r&&(l=4+(e-t)/o),l*=60,l<0&&(l+=360)),[l,a,h]};$.prototype.hsv=function(){return lm(this._rgb)};const am=(...n)=>new $(...n,"hsv");V.hsv=am;j.format.hsv=sm;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsv"),N(n)==="array"&&n.length===3)return"hsv"}});const hm=(n,e,t)=>on(n,e,t,"hsv");$e.hsv=hm;function Js(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(o=>[o]));let i=e[0].length,s=e[0].map((o,l)=>e.map(a=>a[l])),r=n.map(o=>s.map(l=>Array.isArray(o)?o.reduce((a,h,c)=>a+h*(l[c]||0),0):l.reduce((a,h)=>a+h*o,0)));return t===1&&(r=r[0]),i===1?r.map(o=>o[0]):r}const ea=(...n)=>{n=Y(n,"lab");const[e,t,i,...s]=n,[r,o,l]=cm([e,t,i]),[a,h,c]=wf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function cm(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],i=Js(t,n);return Js(e,i.map(s=>s**3))}const ta=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),r=xf(e,t,i);return[...fm(r),...s.length>0&&s[0]<1?[s[0]]:[]]};function fm(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],i=Js(e,n);return Js(t,i.map(s=>Math.cbrt(s)))}$.prototype.oklab=function(){return ta(this._rgb)};const um=(...n)=>new $(...n,"oklab");Object.assign(V,{oklab:um});j.format.oklab=ea;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklab"),N(n)==="array"&&n.length===3)return"oklab"}});const dm=(n,e,t)=>{const i=n.oklab(),s=e.oklab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"oklab")};$e.oklab=dm;const pm=(n,e,t)=>on(n,e,t,"oklch");$e.oklch=pm;const{pow:so,sqrt:ro,PI:oo,cos:Ka,sin:Ja,atan2:Om}=Math,gm=(n,e="lrgb",t=null)=>{const i=n.length;t||(t=Array.from(new Array(i)).map(()=>1));const s=i/t.reduce(function(f,u){return f+u});if(t.forEach((f,u)=>{t[u]*=s}),n=n.map(f=>new $(f)),e==="lrgb")return mm(n,t);const r=n.shift(),o=r.get(e),l=[];let a=0,h=0;for(let f=0;f{const p=f.get(e);c+=f.alpha()*t[u+1];for(let O=0;O=360;)u-=360;o[f]=u}else o[f]=o[f]/l[f];return c/=i,new $(o,e).alpha(c>.99999?1:c,!0)},mm=(n,e)=>{const t=n.length,i=[0,0,0,0];for(let s=0;s.9999999&&(i[3]=1),new $(Gl(i))},{pow:bm}=Math;function er(n){let e="rgb",t=V("#ccc"),i=0,s=[0,1],r=[],o=[0,0],l=!1,a=[],h=!1,c=0,f=1,u=!1,p={},O=!0,g=1;const m=function(y){if(y=y||["#fff","#000"],y&&N(y)==="string"&&V.brewer&&V.brewer[y.toLowerCase()]&&(y=V.brewer[y.toLowerCase()]),N(y)==="array"){y.length===1&&(y=[y[0],y[0]]),y=y.slice(0);for(let P=0;P=l[A];)A++;return A-1}return 0};let w=y=>y,S=y=>y;const Q=function(y,P){let A,M;if(P==null&&(P=!1),isNaN(y)||y===null)return t;P?M=y:l&&l.length>2?M=b(y)/(l.length-2):f!==c?M=(y-c)/(f-c):M=1,M=S(M),P||(M=w(M)),g!==1&&(M=bm(M,g)),M=o[0]+M*(1-o[0]-o[1]),M=yi(M,0,1);const T=Math.floor(M*1e4);if(O&&p[T])A=p[T];else{if(N(a)==="array")for(let C=0;C=q&&C===r.length-1){A=a[C];break}if(M>q&&Mp={};m(n);const x=function(y){const P=V(Q(y));return h&&P[h]?P[h]():P};return x.classes=function(y){if(y!=null){if(N(y)==="array")l=y,s=[y[0],y[y.length-1]];else{const P=V.analyze(s);y===0?l=[P.min,P.max]:l=V.limits(P,"e",y)}return x}return l},x.domain=function(y){if(!arguments.length)return s;c=y[0],f=y[y.length-1],r=[];const P=a.length;if(y.length===P&&c!==f)for(let A of Array.from(y))r.push((A-c)/(f-c));else{for(let A=0;A2){const A=y.map((T,C)=>C/(y.length-1)),M=y.map(T=>(T-c)/(f-c));M.every((T,C)=>A[C]===T)||(S=T=>{if(T<=0||T>=1)return T;let C=0;for(;T>=M[C+1];)C++;const q=(T-M[C])/(M[C+1]-M[C]);return A[C]+q*(A[C+1]-A[C])})}}return s=[c,f],x},x.mode=function(y){return arguments.length?(e=y,k(),x):e},x.range=function(y,P){return m(y),x},x.out=function(y){return h=y,x},x.spread=function(y){return arguments.length?(i=y,x):i},x.correctLightness=function(y){return y==null&&(y=!0),u=y,k(),u?w=function(P){const A=Q(0,!0).lab()[0],M=Q(1,!0).lab()[0],T=A>M;let C=Q(P,!0).lab()[0];const q=A+(M-A)*P;let B=C-q,U=0,re=1,me=20;for(;Math.abs(B)>.01&&me-- >0;)(function(){return T&&(B*=-1),B<0?(U=P,P+=(re-P)*.5):(re=P,P+=(U-P)*.5),C=Q(P,!0).lab()[0],B=C-q})();return P}:w=P=>P,x},x.padding=function(y){return y!=null?(N(y)==="number"&&(y=[y,y]),o=y,x):o},x.colors=function(y,P){arguments.length<2&&(P="hex");let A=[];if(arguments.length===0)A=a.slice(0);else if(y===1)A=[x(.5)];else if(y>1){const M=s[0],T=s[1]-M;A=ym(0,y,!1).map(C=>x(M+C/(y-1)*T))}else{n=[];let M=[];if(l&&l.length>2)for(let T=1,C=l.length,q=1<=C;q?TC;q?T++:T--)M.push((l[T-1]+l[T])*.5);else M=s;A=M.map(T=>x(T))}return V[P]&&(A=A.map(M=>M[P]())),A},x.cache=function(y){return y!=null?(O=y,x):O},x.gamma=function(y){return y!=null?(g=y,x):g},x.nodata=function(y){return y!=null?(t=V(y),x):t},x}function ym(n,e,t){let i=[],s=nr;s?o++:o--)i.push(o);return i}const wm=function(n){let e=[1,1];for(let t=1;tnew $(r)),n.length===2)[t,i]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>t[l]+r*(i[l]-t[l]));return new $(o,"lab")};else if(n.length===3)[t,i,s]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>(1-r)*(1-r)*t[l]+2*(1-r)*r*i[l]+r*r*s[l]);return new $(o,"lab")};else if(n.length===4){let r;[t,i,s,r]=n.map(o=>o.lab()),e=function(o){const l=[0,1,2].map(a=>(1-o)*(1-o)*(1-o)*t[a]+3*(1-o)*(1-o)*o*i[a]+3*(1-o)*o*o*s[a]+o*o*o*r[a]);return new $(l,"lab")}}else if(n.length>=5){let r,o,l;r=n.map(a=>a.lab()),l=n.length-1,o=wm(l),e=function(a){const h=1-a,c=[0,1,2].map(f=>r.reduce((u,p,O)=>u+o[O]*h**(l-O)*a**O*p[f],0));return new $(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},Sm=n=>{const e=xm(n);return e.scale=()=>er(e),e},{round:Pf}=Math;$.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Pf)};$.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:Pf(e):e)};const km=(...n)=>new $(...n,"rgb");Object.assign(V,{rgb:km});j.format.rgb=(...n)=>{const e=Y(n,"rgba");return e[3]===void 0&&(e[3]=1),e};j.autodetect.push({p:3,test:(...n)=>{if(n=Y(n,"rgba"),N(n)==="array"&&(n.length===3||n.length===4&&N(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ot=(n,e,t)=>{if(!ot[t])throw new Error("unknown blend mode "+t);return ot[t](n,e)},ii=n=>(e,t)=>{const i=V(t).rgb(),s=V(e).rgb();return V.rgb(n(i,s))},ni=n=>(e,t)=>{const i=[];return i[0]=n(e[0],t[0]),i[1]=n(e[1],t[1]),i[2]=n(e[2],t[2]),i},vm=n=>n,Qm=(n,e)=>n*e/255,Pm=(n,e)=>n>e?e:n,$m=(n,e)=>n>e?n:e,Cm=(n,e)=>255*(1-(1-n/255)*(1-e/255)),Am=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),Zm=(n,e)=>255*(1-(1-e/255)/(n/255)),Mm=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ot.normal=ii(ni(vm));ot.multiply=ii(ni(Qm));ot.screen=ii(ni(Cm));ot.overlay=ii(ni(Am));ot.darken=ii(ni(Pm));ot.lighten=ii(ni($m));ot.dodge=ii(ni(Mm));ot.burn=ii(ni(Zm));const{pow:Rm,sin:Tm,cos:Em}=Math;function Lm(n=300,e=-1.5,t=1,i=1,s=[0,1]){let r=0,o;N(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);const l=function(a){const h=Ct*((n+120)/360+e*a),c=Rm(s[0]+o*a,i),u=(r!==0?t[0]+a*r:t)*c*(1-c)/2,p=Em(h),O=Tm(h),g=c+u*(-.14861*p+1.78277*O),m=c+u*(-.29227*p-.90649*O),b=c+u*(1.97294*p);return V(Gl([g*255,m*255,b*255,1]))};return l.start=function(a){return a==null?n:(n=a,l)},l.rotations=function(a){return a==null?e:(e=a,l)},l.gamma=function(a){return a==null?i:(i=a,l)},l.hue=function(a){return a==null?t:(t=a,N(t)==="array"?(r=t[1]-t[0],r===0&&(t=t[1])):r=0,l)},l.lightness=function(a){return a==null?s:(N(a)==="array"?(s=a,o=a[1]-a[0]):(s=[a,a],o=0),l)},l.scale=()=>V.scale(l),l.hue(t),l}const Dm="0123456789abcdef",{floor:_m,random:qm}=Math,Xm=()=>{let n="#";for(let e=0;e<6;e++)n+=Dm.charAt(_m(qm()*16));return new $(n,"hex")},{log:eh,pow:jm,floor:Ym,abs:zm}=Math;function $f(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return N(n)==="object"&&(n=Object.values(n)),n.forEach(i=>{e&&N(i)==="object"&&(i=i[e]),i!=null&&!isNaN(i)&&(t.values.push(i),t.sum+=i,it.max&&(t.max=i),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(i,s)=>Cf(t,i,s),t}function Cf(n,e="equal",t=7){N(n)=="array"&&(n=$f(n));const{min:i,max:s}=n,r=n.values.sort((l,a)=>l-a);if(t===1)return[i,s];const o=[];if(e.substr(0,1)==="c"&&(o.push(i),o.push(s)),e.substr(0,1)==="e"){o.push(i);for(let l=1;l 0");const l=Math.LOG10E*eh(i),a=Math.LOG10E*eh(s);o.push(i);for(let h=1;h200&&(f=!1)}const O={};for(let m=0;mm-b),o.push(g[0]);for(let m=1;m{n=new $(n),e=new $(e);const t=n.luminance(),i=e.luminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const th=.027,Vm=5e-4,Nm=.1,ih=1.14,Os=.022,nh=1.414,Im=(n,e)=>{n=new $(n),e=new $(e),n.alpha()<1&&(n=Gi(e,n,n.alpha(),"rgb"));const t=sh(...n.rgb()),i=sh(...e.rgb()),s=t>=Os?t:t+Math.pow(Os-t,nh),r=i>=Os?i:i+Math.pow(Os-i,nh),o=Math.pow(r,.56)-Math.pow(s,.57),l=Math.pow(r,.65)-Math.pow(s,.62),a=Math.abs(r-s)0?a-th:a+th)*100};function sh(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:$t,pow:oe,min:Fm,max:Wm,atan2:rh,abs:oh,cos:gs,sin:lh,exp:Gm,PI:ah}=Math;function Um(n,e,t=1,i=1,s=1){var r=function(Ee){return 360*Ee/(2*ah)},o=function(Ee){return 2*ah*Ee/360};n=new $(n),e=new $(e);const[l,a,h]=Array.from(n.lab()),[c,f,u]=Array.from(e.lab()),p=(l+c)/2,O=$t(oe(a,2)+oe(h,2)),g=$t(oe(f,2)+oe(u,2)),m=(O+g)/2,b=.5*(1-$t(oe(m,7)/(oe(m,7)+oe(25,7)))),w=a*(1+b),S=f*(1+b),Q=$t(oe(w,2)+oe(h,2)),k=$t(oe(S,2)+oe(u,2)),x=(Q+k)/2,y=r(rh(h,w)),P=r(rh(u,S)),A=y>=0?y:y+360,M=P>=0?P:P+360,T=oh(A-M)>180?(A+M+360)/2:(A+M)/2,C=1-.17*gs(o(T-30))+.24*gs(o(2*T))+.32*gs(o(3*T+6))-.2*gs(o(4*T-63));let q=M-A;q=oh(q)<=180?q:M<=A?q+360:q-360,q=2*$t(Q*k)*lh(o(q)/2);const B=c-l,U=k-Q,re=1+.015*oe(p-50,2)/$t(20+oe(p-50,2)),me=1+.045*x,ze=1+.015*x*C,ue=30*Gm(-oe((T-275)/25,2)),nt=-(2*$t(oe(x,7)/(oe(x,7)+oe(25,7))))*lh(2*o(ue)),Te=$t(oe(B/(t*re),2)+oe(U/(i*me),2)+oe(q/(s*ze),2)+nt*(U/(i*me))*(q/(s*ze)));return Wm(0,Fm(100,Te))}function Hm(n,e,t="lab"){n=new $(n),e=new $(e);const i=n.get(t),s=e.get(t);let r=0;for(let o in i){const l=(i[o]||0)-(s[o]||0);r+=l*l}return Math.sqrt(r)}const Km=(...n)=>{try{return new $(...n),!0}catch{return!1}},Jm={cool(){return er([V.hsl(180,1,.9),V.hsl(250,.7,.4)])},hot(){return er(["#000","#f00","#ff0","#fff"]).mode("rgb")}},zo={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Af=Object.keys(zo),hh=new Map(Af.map(n=>[n.toLowerCase(),n])),e0=typeof Proxy=="function"?new Proxy(zo,{get(n,e){const t=e.toLowerCase();if(hh.has(t))return n[hh.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Af)}}):zo,t0=(...n)=>{n=Y(n,"cmyk");const[e,t,i,s]=n,r=n.length>4?n[4]:1;return s===1?[0,0,0,r]:[e>=1?0:255*(1-e)*(1-s),t>=1?0:255*(1-t)*(1-s),i>=1?0:255*(1-i)*(1-s),r]},{max:ch}=Math,i0=(...n)=>{let[e,t,i]=Y(n,"rgb");e=e/255,t=t/255,i=i/255;const s=1-ch(e,ch(t,i)),r=s<1?1/(1-s):0,o=(1-e-s)*r,l=(1-t-s)*r,a=(1-i-s)*r;return[o,l,a,s]};$.prototype.cmyk=function(){return i0(this._rgb)};const n0=(...n)=>new $(...n,"cmyk");Object.assign(V,{cmyk:n0});j.format.cmyk=t0;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"cmyk"),N(n)==="array"&&n.length===4)return"cmyk"}});const s0=(...n)=>{const e=Y(n,"hsla");let t=rn(n)||"lsa";return e[0]=Ke(e[0]||0)+"deg",e[1]=Ke(e[1]*100)+"%",e[2]=Ke(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},r0=(...n)=>{const e=Y(n,"lab");let t=rn(n)||"lab";return e[0]=Ke(e[0])+"%",e[1]=Ke(e[1]),e[2]=Ke(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},o0=(...n)=>{const e=Y(n,"lch");let t=rn(n)||"lab";return e[0]=Ke(e[0])+"%",e[1]=Ke(e[1]),e[2]=isNaN(e[2])?"none":Ke(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},l0=(...n)=>{const e=Y(n,"lab");return e[0]=Ke(e[0]*100)+"%",e[1]=jo(e[1]),e[2]=jo(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},Zf=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=ta(e,t,i),[a,h,c]=kf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},a0=(...n)=>{const e=Y(n,"lch");return e[0]=Ke(e[0]*100)+"%",e[1]=jo(e[1]),e[2]=isNaN(e[2])?"none":Ke(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:lo}=Math,h0=(...n)=>{const e=Y(n,"rgba");let t=rn(n)||"rgb";if(t.substr(0,3)==="hsl")return s0(Qf(e),t);if(t.substr(0,3)==="lab"){const i=Ln();Mt("d50");const s=r0(Hl(e),t);return Mt(i),s}if(t.substr(0,3)==="lch"){const i=Ln();Mt("d50");const s=o0(Jl(e),t);return Mt(i),s}return t.substr(0,5)==="oklab"?l0(ta(e)):t.substr(0,5)==="oklch"?a0(Zf(e)):(e[0]=lo(e[0]),e[1]=lo(e[1]),e[2]=lo(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},Mf=(...n)=>{n=Y(n,"lch");const[e,t,i,...s]=n,[r,o,l]=Sf(e,t,i),[a,h,c]=ea(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},Rt=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,rt=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,tr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,et=/\s*/.source,ln=/\s+/.source,ia=/\s*,\s*/.source,Tr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,an=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,Rf=new RegExp("^rgba?\\("+et+[Rt,Rt,Rt].join(ln)+an+"\\)$"),Tf=new RegExp("^rgb\\("+et+[Rt,Rt,Rt].join(ia)+et+"\\)$"),Ef=new RegExp("^rgba\\("+et+[Rt,Rt,Rt,rt].join(ia)+et+"\\)$"),Lf=new RegExp("^hsla?\\("+et+[Tr,tr,tr].join(ln)+an+"\\)$"),Df=new RegExp("^hsl?\\("+et+[Tr,tr,tr].join(ia)+et+"\\)$"),_f=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,qf=new RegExp("^lab\\("+et+[rt,rt,rt].join(ln)+an+"\\)$"),Xf=new RegExp("^lch\\("+et+[rt,rt,Tr].join(ln)+an+"\\)$"),jf=new RegExp("^oklab\\("+et+[rt,rt,rt].join(ln)+an+"\\)$"),Yf=new RegExp("^oklch\\("+et+[rt,rt,Tr].join(ln)+an+"\\)$"),{round:zf}=Math,Zi=n=>n.map((e,t)=>t<=2?yi(zf(e),0,255):e),le=(n,e=0,t=100,i=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,i?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Ze=(n,e)=>n==="none"?e:n,na=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(j.format.named)try{return j.format.named(n)}catch{}if((e=n.match(Rf))||(e=n.match(Tf))){let t=e.slice(1,4);for(let s=0;s<3;s++)t[s]=+le(Ze(t[s],0),0,255);t=Zi(t);const i=e[4]!==void 0?+le(e[4],0,1):1;return t[3]=i,t}if(e=n.match(Ef)){const t=e.slice(1,5);for(let i=0;i<4;i++)t[i]=+le(t[i],0,255);return t}if((e=n.match(Lf))||(e=n.match(Df))){const t=e.slice(1,4);t[0]=+Ze(t[0].replace("deg",""),0),t[1]=+le(Ze(t[1],0),0,100)*.01,t[2]=+le(Ze(t[2],0),0,100)*.01;const i=Zi(Yo(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}if(e=n.match(_f)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const i=Yo(t);for(let s=0;s<3;s++)i[s]=zf(i[s]);return i[3]=+e[4],i}if(e=n.match(qf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,100),t[1]=le(Ze(t[1],0),-125,125,!0),t[2]=le(Ze(t[2],0),-125,125,!0);const i=Ln();Mt("d50");const s=Zi(Ul(t));Mt(i);const r=e[4]!==void 0?+le(e[4],0,1):1;return s[3]=r,s}if(e=n.match(Xf)){const t=e.slice(1,4);t[0]=le(t[0],0,100),t[1]=le(Ze(t[1],0),0,150,!1),t[2]=+Ze(t[2].replace("deg",""),0);const i=Ln();Mt("d50");const s=Zi(Kl(t));Mt(i);const r=e[4]!==void 0?+le(e[4],0,1):1;return s[3]=r,s}if(e=n.match(jf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,1),t[1]=le(Ze(t[1],0),-.4,.4,!0),t[2]=le(Ze(t[2],0),-.4,.4,!0);const i=Zi(ea(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}if(e=n.match(Yf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,1),t[1]=le(Ze(t[1],0),0,.4,!1),t[2]=+Ze(t[2].replace("deg",""),0);const i=Zi(Mf(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}};na.test=n=>Rf.test(n)||Lf.test(n)||qf.test(n)||Xf.test(n)||jf.test(n)||Yf.test(n)||Tf.test(n)||Ef.test(n)||Df.test(n)||_f.test(n)||n==="transparent";$.prototype.css=function(n){return h0(this._rgb,n)};const c0=(...n)=>new $(...n,"css");V.css=c0;j.format.css=na;j.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&na.test(n))return"css"}});j.format.gl=(...n)=>{const e=Y(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const f0=(...n)=>new $(...n,"gl");V.gl=f0;$.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};$.prototype.hex=function(n){return yf(this._rgb,n)};const u0=(...n)=>new $(...n,"hex");V.hex=u0;j.format.hex=bf;j.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:ms}=Math,Bf=n=>{const e=n/100;let t,i,s;return e<66?(t=255,i=e<6?0:-155.25485562709179-.44596950469579133*(i=e-2)+104.49216199393888*ms(i),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*ms(s)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*ms(t),i=325.4494125711974+.07943456536662342*(i=e-50)-28.0852963507957*ms(i),s=255),[t,i,s,1]},{round:d0}=Math,p0=(...n)=>{const e=Y(n,"rgb"),t=e[0],i=e[2];let s=1e3,r=4e4;const o=.4;let l;for(;r-s>o;){l=(r+s)*.5;const a=Bf(l);a[2]/a[0]>=i/t?r=l:s=l}return d0(l)};$.prototype.temp=$.prototype.kelvin=$.prototype.temperature=function(){return p0(this._rgb)};const ao=(...n)=>new $(...n,"temp");Object.assign(V,{temp:ao,kelvin:ao,temperature:ao});j.format.temp=j.format.kelvin=j.format.temperature=Bf;$.prototype.oklch=function(){return Zf(this._rgb)};const O0=(...n)=>new $(...n,"oklch");Object.assign(V,{oklch:O0});j.format.oklch=Mf;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklch"),N(n)==="array"&&n.length===3)return"oklch"}});Object.assign(V,{analyze:$f,average:gm,bezier:Sm,blend:ot,brewer:e0,Color:$,colors:Wi,contrast:Bm,contrastAPCA:Im,cubehelix:Lm,deltaE:Um,distance:Hm,input:j,interpolate:Gi,limits:Cf,mix:Gi,random:Xm,scale:er,scales:Jm,valid:Km});class g0{constructor(){qt(this,"PROPERTIES",{...ug,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:V,rgb:(e=0,t=e,i=t=e)=>V.rgb(e,t,i),hsl:(e=360,t=1,i=1)=>V.hsl(e,t,i),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,i)=>{for(let s=Math.round(e);s{this.line(0,this.ledCount,e)},gradient:(e,t,i,s)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))m0(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let i=0;i"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function i(h,c,f){var u=new XMLHttpRequest;u.open("GET",h),u.responseType="blob",u.onload=function(){a(u.response,c,f)},u.onerror=function(){console.error("could not download file")},u.send()}function s(h){var c=new XMLHttpRequest;c.open("HEAD",h,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function r(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ci=="object"&&ci.global===ci?ci:void 0,l=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(h,c,f){var u=o.URL||o.webkitURL,p=document.createElement("a");c=c||h.name||"download",p.download=c,p.rel="noopener",typeof h=="string"?(p.href=h,p.origin===location.origin?r(p):s(p.href)?i(h,c,f):r(p,p.target="_blank")):(p.href=u.createObjectURL(h),setTimeout(function(){u.revokeObjectURL(p.href)},4e4),setTimeout(function(){r(p)},0))}:"msSaveOrOpenBlob"in navigator?function(h,c,f){if(c=c||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(t(h,f),c);else if(s(h))i(h,c,f);else{var u=document.createElement("a");u.href=h,u.target="_blank",setTimeout(function(){r(u)})}}:function(h,c,f,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof h=="string")return i(h,c,f);var p=h.type==="application/octet-stream",O=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||p&&O||l)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var S=m.result;S=g?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=S:location=S,u=null},m.readAsDataURL(h)}else{var b=o.URL||o.webkitURL,w=b.createObjectURL(h);u?u.location=w:location.href=w,u=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});o.saveAs=a.saveAs=a,n.exports=a})})(b0);const y0=Bo;var Oi={},w0={get exports(){return Oi},set exports(n){Oi=n}};(function(n,e){(function(t,i){i(e)})(ci,function(t){function i(f){const u=new ArrayBuffer(4),p=new DataView(u);return p.setUint32(0,f),new Uint8Array(p.buffer)}function s(f,u=0,p=f.byteLength){let O="";const g=Math.min(p,f.byteLength-u);for(let m=0;mO+g.byteLength,0),p=new Uint8Array(u);for(let O=0,g=0;O79)throw new TypeError("Invalid length for key");const O=r("tEXt"),g=r(`${u}\0${p}`),m=i(function(S){if(h.length===0)for(let k=0;k<256;k++){let x=k;for(let y=0;y<8;y++)1&x?x=3988292384^x>>>1:x>>>=1;h[k]=x}const Q=4294967295;return(((k,x,y)=>{let P=k;for(let A=0;A>>8;return P})(Q,S,S.byteLength)^Q)>>>0}(o([O,g]))),b=o([i(g.byteLength),O,g,m]),w=16+l(f).getUint32(8)+4;return o([f.subarray(0,w),b,f.subarray(w)])}t.addMetadata=c,t.addMetadataFromBase64DataURI=function(f,u,p){const O="data:image/png;base64,";if(typeof f!="string"||f.substring(0,O.length)!==O)throw new TypeError("Invalid PNG as Base64 Data URI");const g=atob(f.substring(O.length)),m=new Uint8Array(g.length);for(let w=0;w{n.reset();const l=document.createElement("canvas");l.width=n.frames,l.height=n.ledCount;const a=l.getContext("2d");e();for(let c=0;cthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Ui(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),gt.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ui(this,e,t);let i=[];return this.decompose(e,t,i,0),gt.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zn(this),r=new Zn(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zn(this,e)}iterRange(e,t=this.length){return new Vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Nf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?G.empty:e.length<=32?new se(e):gt.from(se.split(e,[]))}}class se extends G{constructor(e,t=k0(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new v0(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new se(fh(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=zs(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new se(l,o.length+r.length));else{let a=l.length>>1;i.push(new se(l.slice(0,a)),new se(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof se))return super.replace(e,t,i);[e,t]=Ui(this,e,t);let s=zs(this.text,zs(i.text,fh(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new se(s,r):gt.from(se.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){[e,t]=Ui(this,e,t);let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new se(i,s)),i=[],s=-1);return s>-1&&t.push(new se(i,s)),t}}class gt extends G{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Ui(this,e,t),i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>5-1&&a.lines>h>>5+1){let c=this.children.slice();return c[s]=a,new gt(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){[e,t]=Ui(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof gt))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let O of e)O.flatten(p);return new se(p,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(p){let O;if(p.lines>r&&p instanceof gt)for(let g of p.children)f(g);else p.lines>o&&(a>o||!a)?(u(),l.push(p)):p instanceof se&&a&&(O=c[c.length-1])instanceof se&&p.lines+O.lines<=32?(a+=p.lines,h+=p.length+1,c[c.length-1]=new se(O.text.concat(p.text),O.length+1+p.length)):(a+p.lines>s&&u(),a+=p.lines,h+=p.length+1,c.push(p))}function u(){a!=0&&(l.push(c.length==1?c[0]:gt.from(c,h)),h=-1,a=c.length=0)}for(let p of e)f(p);return u(),l.length==1?l[0]:new gt(l,t)}}G.empty=new se([""],0);function k0(n){let e=-1;for(let t of n)e+=t.length+1;return e}function zs(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof se?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof se?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof se){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof se?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Vf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Nf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=function(){return this.iter()},Zn.prototype[Symbol.iterator]=Vf.prototype[Symbol.iterator]=Nf.prototype[Symbol.iterator]=function(){return this});class v0{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function Ui(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let _i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<_i.length;n++)_i[n]+=_i[n-1];function Q0(n){for(let e=1;e<_i.length;e+=2)if(_i[e]>n)return _i[e-1]<=n;return!1}function uh(n){return n>=127462&&n<=127487}const dh=8205;function ve(n,e,t=!0,i=!0){return(t?If:P0)(n,e,i)}function If(n,e,t){if(e==n.length)return e;e&&Ff(n.charCodeAt(e))&&Wf(n.charCodeAt(e-1))&&e--;let i=we(n,e);for(e+=Ue(i);e=0&&uh(we(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function P0(n,e,t){for(;e>0;){let i=If(n,e-2,t);if(i=56320&&n<57344}function Wf(n){return n>=55296&&n<56320}function we(n,e){let t=n.charCodeAt(e);if(!Wf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ff(i)?(t-55296<<10)+(i-56320)+65536:t}function sa(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ue(n){return n<65536?1:2}const Vo=/\r\n?|\n/;var Se=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Se||(Se={}));class St{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=Se.Simple&&h>=e&&(i==Se.TrackDel&&se||i==Se.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new St(e)}static create(e){return new St(e)}}class pe extends St{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return No(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Io(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&Vt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=p?typeof p=="string"?G.of(p.split(i||Vo)):p:G.empty,g=O.length;if(f==u&&g==0)return;fo&&Qe(s,f-o,-1),Qe(s,u-f,g),Vt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new pe(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Vt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function Io(n,e,t,i=!1){let s=[],r=i?[]:null,o=new Dn(n),l=new Dn(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Qe(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Dn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?G.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?G.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gi{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new gi(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return v.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return v.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return v.range(e.anchor,e.head)}static create(e,t,i){return new gi(e,t,i)}}class v{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:v.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new v(e.ranges.map(t=>gi.fromJSON(t)),e.main)}static single(e,t=e){return new v([v.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?v.range(a,l):v.range(l,a))}}return new v(e,t)}}function Uf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let ra=0;class E{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=ra++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new E(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:oa),!!e.static,e.enables)}of(e){return new Bs([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bs(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bs(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function oa(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Bs{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=ra++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Fo(f,c)){let p=i(f);if(l?!ph(p,f.values[o],s):!s(p,f.values[o]))return f.values[o]=p,1}return 0},reconfigure:(f,u)=>{let p,O=u.config.address[r];if(O!=null){let g=nr(u,O);if(this.dependencies.every(m=>m instanceof E?u.facet(m)===f.facet(m):m instanceof be?u.field(m,!1)==f.field(m,!1):!0)||(l?ph(p=i(f),g,s):s(p=i(f),g)))return f.values[o]=g,0}else p=i(f);return f.values[o]=p,1}}}}function ph(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Oh).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Oh.of({field:this,create:e})]}get extension(){return this}}const fi={lowest:4,low:3,default:2,high:1,highest:0};function gn(n){return e=>new Hf(e,n)}const si={highest:gn(fi.highest),high:gn(fi.high),default:gn(fi.default),low:gn(fi.low),lowest:gn(fi.lowest)};class Hf{constructor(e,t){this.inner=e,this.prec=t}}class Er{of(e){return new Wo(this,e)}reconfigure(e){return Er.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Wo{constructor(e,t){this.compartment=e,this.inner=t}}class ir{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of C0(e,t,o))u instanceof be?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(p=>u.slot(p));let c=i==null?void 0:i.config.facets;for(let u in r){let p=r[u],O=p[0].facet,g=c&&c[u]||[];if(p.every(m=>m.type==0))if(l[O.id]=a.length<<1|1,oa(g,p))a.push(i.facet(O));else{let m=O.combine(p.map(b=>b.value));a.push(i&&O.compare(m,i.facet(O))?i.facet(O):m)}else{for(let m of p)m.type==0?(l[m.id]=a.length<<1|1,a.push(m.value)):(l[m.id]=h.length<<1,h.push(b=>m.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(m=>$0(m,O,p))}}let f=h.map(u=>u(l));return new ir(e,o,f,l,a,r)}}function C0(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Wo&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Wo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof Hf)r(o.inner,o.prec);else if(o instanceof be)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Bs)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,fi.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,fi.default),i.reduce((o,l)=>o.concat(l))}function Mn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function nr(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Kf=E.define(),Go=E.define({combine:n=>n.some(e=>e),static:!0}),Jf=E.define({combine:n=>n.length?n[0]:void 0,static:!0}),eu=E.define(),tu=E.define(),iu=E.define(),nu=E.define({combine:n=>n.length?n[0]:!1});class Dt{constructor(e,t){this.type=e,this.value=t}static define(){return new A0}}class A0{of(e){return new Dt(this,e)}}class Z0{constructor(e){this.map=e}of(e){return new X(this,e)}}class X{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new X(this.type,t)}is(e){return this.type==e}static define(e={}){return new Z0(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}X.reconfigure=X.define();X.appendConfig=X.define();class he{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Uf(i,t.newLength),r.some(l=>l.type==he.time)||(this.annotations=r.concat(he.time.of(Date.now())))}static create(e,t,i,s,r,o){return new he(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(he.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}he.time=Dt.define();he.userEvent=Dt.define();he.addToHistory=Dt.define();he.remote=Dt.define();function M0(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof he?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof he?n=r[0]:n=ru(e,qi(r),!1)}return n}function T0(n){let e=n.startState,t=e.facet(iu),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=su(i,Uo(e,r,n.changes.newLength),!0))}return i==n?n:he.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const E0=[];function qi(n){return n==null?E0:Array.isArray(n)?n:[n]}var ne=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ne||(ne={}));const L0=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ho;try{Ho=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function D0(n){if(Ho)return Ho.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||L0.test(t)))return!0}return!1}function _0(n){return e=>{if(!/\S/.test(e))return ne.Space;if(D0(e))return ne.Word;for(let t=0;t-1)return ne.Word;return ne.Other}}class H{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(X.reconfigure)?(t=null,i=l.value):l.is(X.appendConfig)&&(t=null,i=qi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=ir.resolve(i,s,this),r=new H(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Go)?e.newSelection:e.newSelection.asSingle();new H(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:v.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=qi(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return H.create({doc:e.doc,selection:v.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=ir.resolve(e.extensions||[],new Map),i=e.doc instanceof G?e.doc:G.of((e.doc||"").split(t.staticFacet(H.lineSeparator)||Vo)),s=e.selection?e.selection instanceof v?e.selection:v.single(e.selection.anchor,e.selection.head):v.single(0);return Uf(s,i.length),t.staticFacet(Go)||(s=s.asSingle()),new H(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(H.tabSize)}get lineBreak(){return this.facet(H.lineSeparator)||` +`}get readOnly(){return this.facet(nu)}phrase(e,...t){for(let i of this.facet(H.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(Kf))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return _0(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=ve(t,o,!1);if(r(t.slice(a,o))!=ne.Word)break;o=a}for(;ln.length?n[0]:4});H.lineSeparator=Jf;H.readOnly=nu;H.phrases=E.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});H.languageData=Kf;H.changeFilter=eu;H.transactionFilter=tu;H.transactionExtender=iu;Er.reconfigure=X.define();function Qt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Si{eq(e){return this==e}range(e,t=e){return Ko.create(e,t,this)}}Si.prototype.startSide=Si.prototype.endSide=0;Si.prototype.point=!1;Si.prototype.mapMode=Se.TrackDel;let Ko=class ou{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ou(e,t,i)}};function Jo(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class la{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rp||u==p&&h.startSide>0&&h.endSide<=0)continue;(p-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,p-u)),i.push(h),s.push(u-o),r.push(p-o))}return{mapped:i.length?new la(s,r,i,l):null,pos:o}}}class W{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new W(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Jo)),this.isEmpty)return t.length?W.of(t):this;let l=new lu(this,null,-1).goto(0),a=0,h=[],c=new Ut;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return _n.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _n.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=gh(o,l,i),h=new mn(o,a,r),c=new mn(l,a,r);i.iterGaps((f,u,p)=>mh(h,f,c,u,p,s)),i.empty&&i.length==0&&mh(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=gh(r,o),a=new mn(r,l,0).goto(i),h=new mn(o,l,0).goto(i);for(;;){if(a.to!=h.to||!el(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new mn(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new Ut;for(let s of e instanceof Ko?[e]:t?q0(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return W.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=W.empty;s=s.nextLayer)t=new W(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}W.empty=new W([],[],null,-1);function q0(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Jo);e=i}return n}W.empty.nextLayer=W.empty;class Ut{finishChunk(e){this.chunks.push(new la(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Ut)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(W.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=W.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function gh(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new lu(o,t,i,r));return s.length==1?s[0]:new _n(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)ho(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)ho(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ho(this.heap,0)}}}function ho(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class mn{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=_n.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){bs(this.active,e),bs(this.activeTo,e),bs(this.activeRank,e),this.minActive=bh(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;ys(this.active,t,i),ys(this.activeTo,t,s),ys(this.activeRank,t,r),e&&ys(e,t,this.cursor.from),this.minActive=bh(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&bs(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function mh(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&el(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!el(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function el(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function bh(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=ve(n,s)}return i===!0?-1:n.length}const il="ͼ",yh=typeof Symbol>"u"?"__"+il:Symbol.for(il),nl=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),wh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ht{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let p in l){let O=l[p];if(/&/.test(p))r(p.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),O,a);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");r(s(p),O,c,u)}else O!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+O+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=wh[yh]||1;return wh[yh]=e+1,il+e.toString(36)}static mount(e,t,i){let s=e[nl],r=i&&i.nonce;s?r&&s.setNonce(r):s=new X0(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let xh=new Map;class X0{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=xh.get(i);if(r)return e[nl]=r;this.sheet=new s.CSSStyleSheet,xh.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[nl]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},j0=typeof navigator<"u"&&/Mac/.test(navigator.platform),Y0=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var xe=0;xe<10;xe++)Kt[48+xe]=Kt[96+xe]=String(xe);for(var xe=1;xe<=24;xe++)Kt[xe+111]="F"+xe;for(var xe=65;xe<=90;xe++)Kt[xe]=String.fromCharCode(xe+32),qn[xe]=String.fromCharCode(xe);for(var co in Kt)qn.hasOwnProperty(co)||(qn[co]=Kt[co]);function z0(n){var e=j0&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Y0&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?qn:Kt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Xn(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function sl(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Vs(n,e){if(!e.anchorNode)return!1;try{return sl(n,e.anchorNode)}catch{return!1}}function jn(n){return n.nodeType==3?vi(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Rn(n,e,t,i){return t?Sh(n,e,t,i,-1)||Sh(n,e,t,i,1):!1}function ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function sr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Sh(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:kt(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=ki(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?kt(n):0}else return!1}}function kt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Lr(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function B0(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function au(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function V0(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,p=c==a.body,O=1,g=1;if(p)u=B0(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:O,scaleY:g}=au(c,w)),u={left:w.left,right:w.left+c.clientWidth*O,top:w.top,bottom:w.top+c.clientHeight*g}}let m=0,b=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+b+o)):e.bottom>u.bottom&&(b=e.bottom-u.bottom+o,t<0&&e.top-b0&&e.right>u.right+m&&(m=e.right-u.right+m+r)):e.right>u.right&&(m=e.right-u.right+r,t<0&&e.lefts.clientHeight&&(i=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:i}}class I0{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?kt(t):0),i,Math.min(e.focusOffset,i?kt(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Mi=null;function hu(n){if(n.setActive)return n.setActive();if(Mi)return n.focus(Mi);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Mi==null?{get preventScroll(){return Mi={preventScroll:!0},!0}}:void 0),!Mi){Mi=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function uu(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=kt(t)}else if(t.parentNode&&!sr(t))i=ki(t),t=t.parentNode;else return null}}function du(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=aa){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ou(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var L={mac:$h||/Mac/.test(De.platform),windows:/Win/.test(De.platform),linux:/Linux|X11/.test(De.platform),ie:Dr,ie_version:mu?rl.documentMode||6:ll?+ll[1]:ol?+ol[1]:0,gecko:Qh,gecko_version:Qh?+(/Firefox\/(\d+)/.exec(De.userAgent)||[0,0])[1]:0,chrome:!!fo,chrome_version:fo?+fo[1]:0,ios:$h,android:/Android\b/.test(De.userAgent),webkit:Ph,safari:bu,webkit_version:Ph?+(/\bAppleWebKit\/(\d+)/.exec(De.userAgent)||[0,0])[1]:0,tabSize:rl.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const G0=256;class lt extends J{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof lt)||this.length-(t-e)+i.length>G0||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new lt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Pe(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return U0(this.dom,e,t)}}class Et extends J{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(cu(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Et&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Et(this.mark,t,o)}domAtPos(e){return yu(this,e)}coordsAt(e,t){return xu(this,e,t)}}function U0(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?L.chrome||L.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return L.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Lr(a,o<0):a||null}class Nt extends J{static create(e,t,i){return new Nt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Nt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof Nt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?Pe.before(this.dom):Pe.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?Pe.before(this.dom):Pe.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return G.empty}get isHidden(){return!0}}lt.prototype.children=Nt.prototype.children=Hi.prototype.children=aa;function yu(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Et&&s.length&&(i=s[s.length-1])instanceof Et&&i.mark.eq(e.mark)?wu(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function xu(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(p.children.length?l(p,c-u):(!r||r.isHidden&&t>0)&&(O>c||u==O&&p.getSide()>0)?(r=p,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function hl(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function K0(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Jt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Su(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Jt(e,i,s,t,e.widget||null,!0)}static line(e){return new is(e)}static set(e,t=!1){return W.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}_.none=W.empty;class ts extends _{constructor(e){let{start:t,end:i}=Su(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof ts&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&rr(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ts.prototype.point=!1;class is extends _{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof is&&this.spec.class==e.spec.class&&rr(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}is.prototype.mapMode=Se.TrackBefore;is.prototype.point=!0;class Jt extends _{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Se.TrackBefore:Se.TrackAfter:Se.TrackDel}get type(){return this.startSide!=this.endSide?Me.WidgetRange:this.startSide<=0?Me.WidgetBefore:Me.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Jt&&J0(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Jt.prototype.point=!0;function Su(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function J0(n,e){return n==e||!!(n&&e&&n.compare(e))}function cl(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class ae extends J{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof ae))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),gu(this,e,t,i?i.children.slice():[],r,o),!0}split(e){let t=new ae;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){rr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){wu(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=al(t,this.attrs||{})),i&&(this.attrs=al({class:i},this.attrs||{}))}domAtPos(e){return yu(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(cu(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(hl(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&J.get(s)instanceof Et;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=J.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!L.ios||!this.children.some(r=>r instanceof lt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof lt)||/[^ -~]/.test(i.text))return null;let s=jn(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=xu(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof ae)return r;if(o>t)break}s=o+r.breakAfter}return null}}class Tt extends J{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof Tt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class fl extends _t{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Tn{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Tt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ae),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ws(new Hi(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Tt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(ws(new lt(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Jt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof Jt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Tt(i.widget||Ki.block,l,i));else{let a=Nt.create(i.widget||Ki.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(ws(new Hi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(ws(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Tn(e,t,i,r);return o.openEnd=W.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function ws(n,e){for(let t of e)n=new Et(t,[n],n.length);return n}class Ki extends _t{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ki.inline=new Ki("span");Ki.block=new Ki("div");var ie=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(ie||(ie={}));const Qi=ie.LTR,ha=ie.RTL;function ku(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Qu(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(ft[g+1]==-p){let m=ft[g+2],b=m&2?s:m&4?m&1?r:s:0;b&&(K[f]=K[ft[g]]=b),l=g;break}}else{if(ft.length==189)break;ft[l++]=f,ft[l++]=u,ft[l++]=a}else if((O=K[f])==2||O==1){let g=O==s;a=g?0:1;for(let m=l-3;m>=0;m-=3){let b=ft[m+2];if(b&2)break;if(g)ft[m+2]|=2;else{if(b&4)break;ft[m+2]|=4}}}}}function r1(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)O==m&&(O=t[--g].from,m=g?t[g-1].to:n),K[--O]=p;a=c}else r=h,a++}}}function dl(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new It(a,g.from,p));let m=g.direction==Qi!=!(p%2);pl(n,m?i+1:i,s,g.inner,g.from,g.to,o),a=g.to}O=g.to}else{if(O==t||(c?K[O]!=l:K[O]==l))break;O++}u?dl(n,a,O,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let g=K[a-1];g!=l&&(c=!1,f=g==16)}let u=!c&&l==1?[]:null,p=c?i:i+1,O=a;e:for(;;)if(h&&O==r[h-1].to){if(f)break e;let g=r[--h];if(!c)for(let m=g.from,b=h;;){if(m==e)break e;if(b&&r[b-1].to==m)m=r[--b].from;else{if(K[m-1]==l)break e;break}}if(u)u.push(g);else{g.toK.length;)K[K.length]=256;let i=[],s=e==Qi?0:1;return pl(n,s,s,t,0,n.length,i),i}function Pu(n){return[new It(0,n,0)]}let $u="";function l1(n,e,t,i,s){var r;let o=i.head-n.from,l=It.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=ve(n.text,o,a.forward(s,t));(ca.to)&&(c=h),$u=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),Lu=E.define({combine:n=>n.some(e=>e)}),Du=E.define();class ji{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new ji(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ji(v.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const xs=X.define({map:(n,e)=>n.map(e)}),_u=X.define();function qe(n,e,t){let i=n.facet(Mu);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const zt=E.define({combine:n=>n.length?n[0]:!0});let h1=0;const kn=E.define();class fe{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new fe(h1++,e,i,s,l=>{let a=[kn.of(l)];return o&&a.push(Yn.of(h=>{let c=h.plugin(l);return c?o(c):_.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return fe.define(i=>new e(i),t)}}class uo{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(qe(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){qe(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){qe(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const qu=E.define(),ua=E.define(),Yn=E.define(),Xu=E.define(),da=E.define(),ju=E.define();function Ah(n,e){let t=n.state.facet(ju);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return W.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let p=l[u].spec.bidiIsolate,O;if(p==null&&(p=a1(e.text,h,c)),a>0&&f.length&&(O=f[f.length-1]).to==h&&O.direction==p)O.to=c,f=O.inner;else{let g={from:h,to:c,direction:p,inner:[]};f.push(g),f=g.inner}}}}),s}const Yu=E.define();function zu(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(Yu)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const vn=E.define();class Je{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Je(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new Je(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class or{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=pe.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Je(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new or(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Zh extends J{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=_.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ae],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Je(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!g1(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?f1(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new Je(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(L.ie||L.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=p1(o,l,e.changes);return i=Je.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=L.chrome||L.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,p,O,g;if(i&&i.range.fromBc){let Q=Tn.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=Tn.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);p=Q.breakAtStart,O=Q.openStart,g=k.openEnd;let x=this.compositionView(i);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),Q.content.length&&x.merge(0,0,Q.content[Q.content.length-1],!0,0,Q.openEnd)&&Q.content.pop(),u=Q.content.concat(x).concat(k.content)}else({content:u,breakAtStart:p,openStart:O,openEnd:g}=Tn.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:m,off:b}=r.findPos(h,1),{i:w,off:S}=r.findPos(a,-1);Ou(this,w,S,m,b,u,p,O,g)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(_u)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new lt(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Et(s,[t],t.length);let i=new ae;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=J.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Vs(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(L.gecko&&l.empty&&!this.hasComposition&&c1(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new Pe(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!Rn(a.node,a.offset,c.anchorNode,c.anchorOffset)||!Rn(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{L.android&&L.chrome&&this.dom.contains(c.focusNode)&&O1(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Xn(this.view.root);if(f)if(l.empty){if(L.gecko){let u=u1(a.node,a.offset);if(u&&u!=3){let p=(u==1?uu:du)(a.node,a.offset);p&&(a=new Pe(p.node,p.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new Pe(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new Pe(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Rn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Xn(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=ae.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=J.get(t.childNodes[s]);r instanceof ae&&(i=r.domAtPos(r.length))}return i?new Pe(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=J.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof ae&&!(i instanceof ae&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof Tt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof ae))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof lt))return null;let r=ve(s.text,i);if(r==i)return null;let o=vi(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==ie.LTR;for(let h=0,c=0;cs)break;if(h>=i){let p=f.dom.getBoundingClientRect();if(t.push(p.height),o){let O=f.dom.lastChild,g=O?jn(O):[];if(g.length){let m=g[g.length-1],b=a?m.right-p.left:p.right-m.left;b>l&&(l=b,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?ie.RTL:ie.LTR}measureTextSize(){for(let r of this.children)if(r instanceof ae){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=jn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new pu(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(_.replace({widget:new fl(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return _.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Yn).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Xu).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(W.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=zu(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;V0(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function m1(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return v.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=ve(s.text,r,!1):l=ve(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=ve(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function y1(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function po(n,e){return n.tope.top+1}function Mh(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function gl(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let O=n.firstChild;O;O=O.nextSibling){let g=jn(O);for(let m=0;mS||o==S&&r>w){i=O,s=b,r=w,o=S;let Q=S?t0?m0)}w==0?t>b.bottom&&(!c||c.bottomb.top)&&(h=O,f=b):c&&po(c,b)?c=Rh(c,b.bottom):f&&po(f,b)&&(f=Mh(f,b.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Th(i,u,t);if(l&&i.contentEditable!="false")return gl(i,u,t);let p=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:p}}function Th(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,p=u;if((L.chrome||L.gecko)&&vi(n,l).getBoundingClientRect().left==c.right&&(p=!u),f<=0)return{node:n,offset:l+(p?1:0)};s=l+(p?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function Vu(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let Q=n.viewState.heightOracle.textHeight/2,k=!1;a=n.elementAtHeight(u),a.type!=Me.Text;)for(;u=i>0?a.bottom+Q:a.top-Q,!(u>=0&&u<=h);){if(k)return t?null:0;k=!0,i=-i}f=l+u;let p=a.from;if(pn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Eh(n,o,a,c,f);let O=n.dom.ownerDocument,g=n.root.elementFromPoint?n.root:O,m=g.elementFromPoint(c,f);m&&!n.contentDOM.contains(m)&&(m=null),m||(c=Math.max(o.left+1,Math.min(o.right-1,c)),m=g.elementFromPoint(c,f),m&&!n.contentDOM.contains(m)&&(m=null));let b,w=-1;if(m&&((s=n.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(O.caretPositionFromPoint){let Q=O.caretPositionFromPoint(c,f);Q&&({offsetNode:b,offset:w}=Q)}else if(O.caretRangeFromPoint){let Q=O.caretRangeFromPoint(c,f);Q&&({startContainer:b,startOffset:w}=Q,(!n.contentDOM.contains(b)||L.safari&&w1(b,w,c)||L.chrome&&x1(b,w,c))&&(b=void 0))}b&&(w=Math.min(kt(b),w))}if(!b||!n.docView.dom.contains(b)){let Q=ae.find(n.docView,p);if(!Q)return u>a.top+a.height/2?a.to:a.from;({node:b,offset:w}=gl(Q.dom,c,f))}let S=n.docView.nearest(b);if(!S)return null;if(S.isWidget&&((r=S.dom)===null||r===void 0?void 0:r.nodeType)==1){let Q=S.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+tl(o,r,n.state.tabSize)}function w1(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return vi(n,i-1,i).getBoundingClientRect().left>t}function x1(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():vi(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function ml(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Me.Text))return i}return t}function S1(n,e,t,i){let s=ml(n,e.head),r=!i||s.type!=Me.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==ie.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return v.cursor(a,t?-1:1)}return v.cursor(t?s.to:s.from,t?-1:1)}function Lh(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=l1(s,r,o,l,t),c=$u;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function k1(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ne.Space&&(s=o),s==o}}function v1(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return v.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let p=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-p.from))),l=(r<0?p.top:p.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let O=l+(u+p)*r,g=Vu(n,{x:f,y:O},!1,r);if(Oa.bottom||(r<0?gs)){let m=n.docView.coordsForChar(g),b=!m||O{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:v.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=J.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(P1(e,i.node,i.offset)?t:0))}}function P1(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Z1(e),a=new Q1(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=M1(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!sl(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!sl(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((L.ios||L.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||L.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(L.mac||L.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=v.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:G.of([" "])}):L.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=v.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:G.of([" "])}),t)return pa(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function pa(n,e,t,i=-1){if(L.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(L.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Xi(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&Xi(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Xi(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=C1(n,e,t));return n.state.facet(Ru).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function C1(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&Bu(n,t.main.head);if(f){let O=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-O}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,p=r.to-r.from;i=s.changeByRange(O=>{if(O.from==r.from&&O.to==r.to)return{changes:l,range:a||O.map(l)};let g=O.to-u,m=g-h.length;if(O.to-O.from!=p||n.state.sliceDoc(m,g)!=h||O.to>=c.from&&O.from<=c.to)return{range:O};let b=s.changes({from:m,to:g,insert:e.insert}),w=O.to-r.to;return{changes:b,range:a?v.range(Math.max(0,a.anchor+w),Math.max(0,a.head+w)):O.map(b)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function A1(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Z1(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Dh(t,i)),(s!=t||r!=i)&&e.push(new Dh(s,r))),e}function M1(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?v.single(t+e,i+e):null}class R1{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,L.safari&&e.contentDOM.addEventListener("input",()=>null),L.gecko&&W1(e.contentDOM.ownerDocument)}handleEvent(e){!j1(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=T1(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Fu.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),L.android&&L.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return L.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Iu.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||E1.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:L.safari&&!L.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function _h(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){qe(t.state,s)}}}function T1(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(_h(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(_h(i.value,o))}}for(let i in at)t(i).handlers.push(at[i]);for(let i in tt)t(i).observers.push(tt[i]);return e}const Iu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],E1="dthko",Fu=[16,17,18,20,91,92,224,225],Ss=6;function ks(n){return Math.max(0,n)*.7+8}function L1(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class D1{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=N0(e.contentDOM),this.atoms=e.state.facet(da).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(H.allowMultipleSelections)&&_1(e,t),this.dragging=X1(e,t)&&Uu(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&L1(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,s=0,r=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=zu(this.view);e.clientX-a.left<=s+Ss?t=-ks(s-e.clientX):e.clientX+a.right>=o-Ss&&(t=ks(e.clientX-o)),e.clientY-a.top<=r+Ss?i=-ks(r-e.clientY):e.clientY+a.bottom>=l-Ss&&(i=ks(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function _1(n,e){let t=n.state.facet(Cu);return t.length?t[0](e):L.mac?e.metaKey:e.ctrlKey}function q1(n,e){let t=n.state.facet(Au);return t.length?t[0](e):L.mac?!e.altKey:!e.ctrlKey}function X1(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Xn(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function j1(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=J.get(t))&&i.ignoreEvent(e))return!1;return!0}const at=Object.create(null),tt=Object.create(null),Wu=L.ie&&L.ie_version<15||L.ios&&L.webkit_version<604;function Y1(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Gu(n,t.value)},50)}function _r(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function Gu(n,e){e=_r(n.state,ca,e);let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(bl!=null&&t.selection.ranges.every(a=>a.empty)&&bl==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:v.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:v.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}tt.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};at.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);tt.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};tt.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};at.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(Zu))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=V1(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new D1(n,e,t,i)),i&&n.observer.ignore(()=>{hu(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function qh(n,e,t,i){if(i==1)return v.cursor(e,t);if(i==2)return m1(n.state,e,t);{let s=ae.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return le>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function z1(n,e,t,i){let s=ae.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Xh(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Xh(t,i,l)?1:o&&o.bottom>=i?-1:1}function jh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:z1(n,t,e.clientX,e.clientY)}}const B1=L.ie&&L.ie_version<=11;let Yh=null,zh=0,Bh=0;function Uu(n){if(!B1)return n.detail;let e=Yh,t=Bh;return Yh=n,Bh=Date.now(),zh=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(zh+1)%3:1}function V1(n,e){let t=jh(n,e),i=Uu(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=jh(n,r),h,c=qh(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=qh(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),p=Math.max(f.to,c.to);c=u1&&(h=N1(s,a.pos))?h:l?s.addRange(c):v.create([c])}}}function N1(n,e){for(let t=0;t=e)return v.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}at.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=v.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",_r(n.state,fa,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};at.dragend=n=>(n.inputState.draggedContent=null,!1);function Vh(n,e,t,i){if(t=_r(n.state,ca,t),!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&q1(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}at.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&Vh(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Vh(n,e,i,!0),!0}return!1};at.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Wu?null:e.clipboardData;return t?(Gu(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(Y1(n),!1)};function I1(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function F1(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:_r(n,fa,e.join(n.lineBreak)),ranges:t,linewise:i}}let bl=null;at.copy=at.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=F1(n.state);if(!t&&!s)return!1;bl=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=Wu?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(I1(n,t),!1)};const Hu=Dt.define();function Ku(n,e){let t=[];for(let i of n.facet(Tu)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:Hu.of(!0)}):null}function Ju(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=Ku(n.state,e);t?n.dispatch(t):n.update([])}},10)}tt.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Ju(n)};tt.blur=n=>{n.observer.clearSelectionRange(),Ju(n)};tt.compositionstart=tt.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};tt.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,L.chrome&&L.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};tt.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};at.beforeinput=(n,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let l=o[0],a=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return pa(n,{from:a,to:h,insert:n.state.toText(r)},null),!0}}let s;if(L.chrome&&L.android&&(s=Iu.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return L.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),L.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>tt.compositionend(n,e),20),!1};const Nh=new Set;function W1(n){Nh.has(n)||(Nh.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ih=["pre-wrap","normal","pre-line","break-spaces"];let Ji=!1;function Fh(){Ji=!1}class G1{constructor(e){this.lineWrapping=e,this.doc=G.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Ih.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Is&&(Ji=!0),this.height=e)}replace(e,t,i){return Re.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,te.ByPosNoHeight,i.setDoc(t),0,0),p=u.to>=h?u:r.lineAt(h,te.ByPosNoHeight,i,0,0);for(f+=p.to-h,h=p.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ie extends ed{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new mt(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Ie||s instanceof ye&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ye?s=new Ie(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):Re.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ye extends Re{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof ye?i[i.length-1]=new ye(r.length+s):i.push(null,new ye(s-1))}if(e>0){let r=i[0];r instanceof ye?i[0]=new ye(e+r.length):i.unshift(new ye(e-1),null)}return Re.of(i)}decomposeLeft(e,t){t.push(new ye(e-1),null)}decomposeRight(e,t){t.push(null,new ye(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new ye(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=Is&&(a=-2);let u=new Ie(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ye(r-l).updateHeight(e,l));let h=Re.of(o);return(a<0||Math.abs(h.height-this.height)>=Is||Math.abs(a-this.heightMetrics(e,t).perLine)>=Is)&&(Ji=!0),lr(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class H1 extends Re{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==te.ByPosNoHeight?te.ByPosNoHeight:te.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,te.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Wh(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?Re.of(this.break?[e,null,t]:[e,t]):(this.left=lr(this.left,e),this.right=lr(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Wh(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ye&&(i=n[e+1])instanceof ye&&n.splice(e-1,3,new ye(t.length+1+i.length))}const K1=5;class Oa{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ie?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ie(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=K1)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ie(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ye(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ie)return e;let t=new Ie(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ie)&&!this.isCovered?this.nodes.push(new Ie(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=Math.min(h==n.parentNode?s.innerHeight:a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function ib(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class go{constructor(e,t,i,s){this.from=e,this.to=t,this.size=i,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new G1(t),this.stateDeco=e.facet(Yn).filter(i=>typeof i!="function"),this.heightMap=Re.empty().applyChanges(this.stateDeco,G.empty,this.heightOracle.setDoc(e.doc),[new Je(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=_.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new vs(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Uh:new ga(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Pn(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Yn).filter(c=>typeof c!="function");let s=e.changedRanges,r=Je.extendWithRanges(s,J1(i,this.stateDeco,e?e.changes:pe.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Fh(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Ji)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Lu)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ie.RTL:ie.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:Q,scaleY:k}=au(t,l);(Q>.005&&Math.abs(this.scaleX-Q)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=Q,this.scaleY=k,h|=8,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=fu(e.scrollDOM);let O=(this.printing?ib:tb)(t,this.paddingTop),g=O.top-this.pixelViewport.top,m=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let w=l.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),a){let Q=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(Q)&&(o=!0),o||s.lineWrapping&&Math.abs(w-this.contentDOMWidth)>s.charWidth){let{lineHeight:k,charWidth:x,textHeight:y}=e.docView.measureTextSize();o=k>0&&s.refresh(r,k,x,y,w/x,Q),o&&(e.docView.minWidth=0,h|=8)}g>0&&m>0?c=Math.max(g,m):g<0&&m<0&&(c=Math.min(g,m)),Fh();for(let k of this.viewports){let x=k.from==this.viewport.from?Q:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?Re.empty().applyChanges(this.stateDeco,G.empty,this.heightOracle,[new Je(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new U1(k.from,x))}Ji&&(h|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new vs(s.lineAt(o-i*1e3,te.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,te.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,te.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=ie.LTR&&!i)return[];let l=[],a=(c,f,u,p)=>{if(f-cc&&bb.from>=u.from&&b.to<=u.to&&Math.abs(b.from-c)b.fromw));if(!m){if(fS.from<=f&&S.to>=f)){let S=t.moveToLineBoundary(v.cursor(f),!1,!0).head;S>c&&(f=S)}let b=this.gapSize(u,c,f,p),w=i||b<2e6?b:2e6;m=new go(c,f,b,w)}l.push(m)},h=c=>{if(c.length2e6)for(let x of e)x.from>=c.from&&x.fromc.from&&a(c.from,p,c,f),Ot.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];W.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Pn(this.heightMap.lineAt(e,te.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Pn(this.heightMap.lineAt(this.scaler.fromDOM(e),te.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Pn(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class vs{constructor(e,t){this.from=e,this.to=t}}function sb(n,e,t){let i=[],s=n,r=0;return W.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Ps(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function rb(n,e){for(let t of n)if(e(t))return t}const Uh={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class ga{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,te.ByPos,e,0,0).top,c=t.lineAt(a,te.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function Pn(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new mt(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>Pn(s,e)):n._content)}const $s=E.define({combine:n=>n.join(" ")}),yl=E.define({combine:n=>n.indexOf(!0)>-1}),wl=Ht.newName(),td=Ht.newName(),id=Ht.newName(),nd={"&light":"."+td,"&dark":"."+id};function xl(n,e,t){return new Ht(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const ob=xl("."+wl,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},nd),lb={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mo=L.ie&&L.ie_version<=11;class ab{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new I0,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(L.ie&&L.ie_version<=11||L.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(L.chrome&&L.chrome_version<126)&&(this.editContext=new cb(e),e.state.facet(zt)&&(e.contentDOM.editContext=this.editContext.editContext)),mo&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(zt)?i.root.activeElement!=this.dom:!Vs(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(L.ie&&L.ie_version<=11||L.android&&L.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Rn(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Xn(e.root);if(!t)return!1;let i=L.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&hb(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Vs(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Xi(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Vs(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new $1(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,s=Nu(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Hh(t,e.previousSibling||e.target.previousSibling,-1),s=Hh(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(zt)!=e.state.facet(zt)&&(e.view.contentDOM.editContext=e.state.facet(zt)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Hh(n,e,t){for(;e;){let i=J.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Kh(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return Rn(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function hb(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return Kh(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?Kh(n,t):null}class cb{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:s}=e.state.selection.main,r={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:G.of(i.text.split(` +`))};r.from==this.from&&sthis.to&&(r.to=s),!(r.from==r.to&&!r.insert.length)&&(this.pendingContextChange=r,e.state.readOnly||pa(e,r,v.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(_.mark({attributes:{style:a}}).range(this.toEditorPos(r.rangeStart),this.toEditorPos(r.rangeEnd)))}}e.dispatch({effects:_u.of(_.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Xn(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class R{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||F0(e.parent)||document,this.viewState=new Gh(e.state||H.create(e)),e.scrollTo&&e.scrollTo.is(xs)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(kn).map(s=>new uo(s));for(let s of this.plugins)s.update(this);this.observer=new ab(this),this.inputState=new R1(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Zh(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof he?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(Hu))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Ku(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(H.phrases)!=this.state.facet(H.phrases))return this.setState(r);s=or.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:p}=u.state.selection;f=new ji(p.empty?p:v.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of u.effects)p.is(xs)&&(f=p.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=ar.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(vn)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet($s)!=s.state.facet($s)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(Ol))try{u(s)}catch(p){qe(this.state,p,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Nu(this,c)&&h.force&&Xi(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Gh(e),this.plugins=e.facet(kn).map(i=>new uo(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Zh(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(kn),i=e.state.facet(kn);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new uo(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(fu(i))r=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(s);r=p.from,o=p.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(p=>{try{return p.read(this)}catch(O){return qe(this.state,O),Jh}}),f=or.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let p=0;p1||O<-1){s=s+O,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Ol))l(t)}get themeClasses(){return wl+" "+(this.state.facet(yl)?id:td)+" "+this.state.facet($s)}updateAttrs(){let e=ec(this,qu,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(zt)?"true":"false",class:"cm-content",style:`${L.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),ec(this,ua,t);let i=this.observer.ignore(()=>{let s=hl(this.contentDOM,this.contentAttrs,t),r=hl(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(R.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(vn);let e=this.state.facet(R.cspNonce);Ht.mount(this.root,this.styleModules.concat(ob).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Oo(this,e,Lh(this,e,t,i))}moveByGroup(e,t){return Oo(this,e,Lh(this,e,t,i=>k1(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return v.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return S1(this,e,t,i)}moveVertically(e,t,i){return Oo(this,e,v1(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Vu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[It.find(r,e-s.from,-1,t)];return Lr(i,o.dir==ie.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Eu)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>fb)return Pu(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Qu(r.isolates,i=Ah(this,e))))return r.order;i||(i=Ah(this,e));let s=o1(e.text,t,i);return this.bidiCache.push(new ar(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||L.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{hu(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return xs.of(new ji(typeof e=="number"?v.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return xs.of(new ji(v.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return fe.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return fe.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Ht.newName(),s=[$s.of(i),vn.of(xl(`.${i}`,e))];return t&&t.dark&&s.push(yl.of(!0)),s}static baseTheme(e){return si.lowest(vn.of(xl("."+wl,e,nd)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&J.get(i)||J.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}R.styleModule=vn;R.inputHandler=Ru;R.clipboardInputFilter=ca;R.clipboardOutputFilter=fa;R.scrollHandler=Du;R.focusChangeEffect=Tu;R.perLineTextDirection=Eu;R.exceptionSink=Mu;R.updateListener=Ol;R.editable=zt;R.mouseSelectionStyle=Zu;R.dragMovesSelection=Au;R.clickAddsSelectionRange=Cu;R.decorations=Yn;R.outerDecorations=Xu;R.atomicRanges=da;R.bidiIsolatedRanges=ju;R.scrollMargins=Yu;R.darkTheme=yl;R.cspNonce=E.define({combine:n=>n.length?n[0]:""});R.contentAttributes=ua;R.editorAttributes=qu;R.lineWrapping=R.contentAttributes.of({class:"cm-lineWrapping"});R.announce=X.define();const fb=4096,Jh={};class ar{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:ie.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&al(o,t)}return t}const ub=L.mac?"mac":L.windows?"win":L.linux?"linux":"key";function db(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Ob(n,e,t){return rd(sd(n.state),e,n,t)}let Bt=null;const gb=4e3;function mb(n,e=ub){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let p=t[o]||(t[o]=Object.create(null)),O=l.split(/ (?!$)/).map(b=>db(b,e));for(let b=1;b{let Q=Bt={view:S,prefix:w,scope:o};return setTimeout(()=>{Bt==Q&&(Bt=null)},gb),!0}]})}let g=O.join(" ");s(g,!1);let m=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((u=(f=p._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&m.run.push(a),h&&(m.preventDefault=!0),c&&(m.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(p=>f(p,Sl))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let Sl=null;function rd(n,e,t,i){Sl=e;let s=z0(e),r=we(s,0),o=Ue(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;Bt&&Bt.view==t&&Bt.scope==i&&(l=Bt.prefix+" ",Fu.indexOf(e.keyCode)<0&&(h=!0,Bt=null));let f=new Set,u=m=>{if(m){for(let b of m.run)if(!f.has(b)&&(f.add(b),b(t)))return m.stopPropagation&&(c=!0),!0;m.preventDefault&&(m.stopPropagation&&(c=!0),h=!0)}return!1},p=n[i],O,g;return p&&(u(p[l+Cs(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(L.windows&&e.ctrlKey&&e.altKey)&&(O=Kt[e.keyCode])&&O!=s?(u(p[l+Cs(O,e,!0)])||e.shiftKey&&(g=qn[e.keyCode])!=s&&g!=O&&u(p[l+Cs(g,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(p[l+Cs(s,e,!0)])&&(a=!0),!a&&u(p._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),Sl=null,a}class ss{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=od(e);return[new ss(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return bb(e,t,i)}}function od(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==ie.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function ic(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function bb(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==ie.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=od(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),p=ml(n,i),O=ml(n,s),g=p.type==Me.Text?p:null,m=O.type==Me.Text?O:null;if(g&&(n.lineWrapping||p.widgetLineBreaks)&&(g=ic(n,i,1,g)),m&&(n.lineWrapping||O.widgetLineBreaks)&&(m=ic(n,s,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return w(S(t.from,t.to,g));{let k=g?S(t.from,null,g):Q(p,!1),x=m?S(null,t.to,m):Q(O,!0),y=[];return(g||p).to<(m||O).from-(g&&m?1:0)||p.widgetLineBreaks>1&&k.bottom+n.defaultLineHeight/2C&&B.from=re)break;Be>U&&T(Math.max(ue,U),k==null&&ue<=C,Math.min(Be,re),x==null&&Be>=q,ze.dir)}if(U=me.to+1,U>=re)break}return M.length==0&&T(C,k==null,q,x==null,n.textDirection),{top:P,bottom:A,horizontal:M}}function Q(k,x){let y=l.top+(x?k.top:k.bottom);return{top:y,bottom:y,horizontal:[]}}}function yb(n,e){return n.constructor==e.constructor&&n.eq(e)}class wb{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Fs)!=e.state.facet(Fs)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Fs);for(;t!yb(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Fs=E.define();function ld(n){return[fe.define(e=>new wb(e,n)),Fs.of(n)]}const ad=!L.ios,zn=E.define({combine(n){return Qt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function xb(n={}){return[zn.of(n),Sb,kb,vb,Lu.of(!0)]}function hd(n){return n.startState.facet(zn)!=n.state.facet(zn)}const Sb=ld({above:!0,markers(n){let{state:e}=n,t=e.facet(zn),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||ad:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:v.cursor(s.head,s.head>s.anchor?-1:1);for(let a of ss.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=hd(n);return t&&nc(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){nc(e.state,n)},class:"cm-cursorLayer"});function nc(n,e){e.style.animationDuration=n.facet(zn).cursorBlinkRate+"ms"}const kb=ld({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:ss.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||hd(n)},class:"cm-selectionLayer"}),kl={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};ad&&(kl[".cm-line"].caretColor=kl[".cm-content"].caretColor="transparent !important");const vb=si.highest(R.theme(kl)),cd=X.define({map(n,e){return n==null?null:e.mapPos(n)}}),$n=be.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(cd)?i.value:t,n)}}),Qb=fe.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field($n);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field($n)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field($n),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field($n)!=n&&this.view.dispatch({effects:cd.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Pb(){return[$n,Qb]}function sc(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function $b(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Cb{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Ut,i=t.add.bind(t);for(let{from:s,to:r}of $b(e,this.maxLength))sc(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(b.range(g,m));if(a==h)for(this.regexp.lastIndex=c-a.from;(p=this.regexp.exec(a.text))&&p.indexthis.addMatch(m,e,g,O));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const vl=/x/.unicode!=null?"gu":"g",Ab=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,vl),Zb={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let bo=null;function Mb(){var n;if(bo==null&&typeof document<"u"&&document.body){let e=document.body.style;bo=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return bo||!1}const Ws=E.define({combine(n){let e=Qt(n,{render:null,specialChars:Ab,addSpecialChars:null});return(e.replaceTabs=!Mb())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,vl)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,vl)),e}});function Rb(n={}){return[Ws.of(n),Tb()]}let rc=null;function Tb(){return rc||(rc=fe.fromClass(class{constructor(n){this.view=n,this.decorations=_.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Ws)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Cb({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=we(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=hn(o.text,l,i-o.from);return _.replace({widget:new _b((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=_.replace({widget:new Db(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Ws);n.startState.facet(Ws)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Eb="•";function Lb(n){return n>=32?Eb:n==10?"␤":String.fromCharCode(9216+n)}class Db extends _t{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Lb(this.code),i=e.state.phrase("Control character")+" "+(Zb[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class _b extends _t{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function qb(){return jb}const Xb=_.line({class:"cm-activeLine"}),jb=fe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(Xb.range(s.from)),e=s.from)}return _.set(t)}},{decorations:n=>n.decorations}),Ql=2e3;function Yb(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ql||t.off>Ql||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(v.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=tl(h.text,o,n.tabSize,!0);if(c<0)r.push(v.cursor(h.to));else{let f=tl(h.text,l,n.tabSize);r.push(v.range(h.from+c,h.from+f))}}}return r}function zb(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oc(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Ql?-1:s==i.length?zb(n,e.clientX):hn(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Bb(n,e){let t=oc(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oc(n,s);if(!l)return i;let a=Yb(n.state,t,l);return a.length?o?v.create(a.concat(i.ranges)):v.create(a):i}}:null}function Vb(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return R.mouseSelectionStyle.of((t,i)=>e(i)?Bb(t,i):null)}const Nb={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},Ib={style:"cursor: crosshair"};function Fb(n={}){let[e,t]=Nb[n.key||"Alt"],i=fe.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,R.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?Ib:null})]}const bn="-10000px";class fd{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function Wb(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const yo=E.define({combine:n=>{var e,t,i;return{position:L.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Wb}}}),lc=new WeakMap,ma=fe.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(yo);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new fd(n,ba,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(yo);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=bn,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(L.gecko)i=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==bn&&s.style.left=="0px"){let r=s.getBoundingClientRect();i=Math.abs(r.top+1e4)>1||Math.abs(r.left)>1}}if(i||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((s,r)=>{let o=this.manager.tooltipViews[r];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(yo).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1){c.style.top=bn;continue}let p=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=p?7:0,g=u.right-u.left,m=(e=lc.get(h))!==null&&e!==void 0?e:u.bottom-u.top,b=h.offset||Ub,w=this.view.textDirection==ie.LTR,S=u.width>i.right-i.left?w?i.left:i.right-u.width:w?Math.max(i.left,Math.min(f.left-(p?14:0)+b.x,i.right-g)):Math.min(Math.max(i.left,f.left-g+(p?14:0)-b.x),i.right-g),Q=this.above[l];!a.strictSide&&(Q?f.top-(u.bottom-u.top)-b.yi.bottom)&&Q==i.bottom-f.bottom>f.top-i.top&&(Q=this.above[l]=!Q);let k=(Q?f.top-i.top:i.bottom-f.bottom)-O;if(kS&&P.topx&&(x=Q?P.top-m-2-O:P.bottom+O+2);if(this.position=="absolute"?(c.style.top=(x-n.parent.top)/r+"px",c.style.left=(S-n.parent.left)/s+"px"):(c.style.top=x/r+"px",c.style.left=S/s+"px"),p){let P=f.left+(w?b.x:-b.x)-(S+14-7);p.style.left=P/s+"px"}h.overlap!==!0&&o.push({left:S,top:x,right:y,bottom:x+m}),c.classList.toggle("cm-tooltip-above",Q),c.classList.toggle("cm-tooltip-below",!Q),h.positioned&&h.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=bn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Gb=R.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ub={x:0,y:0},ba=E.define({enables:[ma,Gb]}),hr=E.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class qr{static create(e){return new qr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new fd(e,hr,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Hb=ba.compute([hr],n=>{let e=n.facet(hr);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:qr.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Kb{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==ie.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>qe(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(ma),t=e?e.manager.tooltips.findIndex(i=>i.create==qr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!Jb(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!ey(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const As=4;function Jb(n,e){let{left:t,right:i,top:s,bottom:r}=n.getBoundingClientRect(),o;if(o=n.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();s=Math.min(l.top,s),r=Math.max(l.bottom,r)}return e.clientX>=t-As&&e.clientX<=i+As&&e.clientY>=s-As&&e.clientY<=r+As}function ey(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function ty(n,e={}){let t=X.define(),i=be.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,Se.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(iy)&&(s=[]);return s},provide:s=>hr.from(s)});return{active:i,extension:[i,fe.define(s=>new Kb(s,n,i,t,e.hoverTime||300)),Hb]}}function ud(n,e){let t=n.plugin(ma);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const iy=X.define(),ac=E.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Bn(n,e){let t=n.plugin(dd),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const dd=fe.fromClass(class{constructor(n){this.input=n.state.facet(Vn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ac);this.top=new Zs(n,!0,e.topContainer),this.bottom=new Zs(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ac);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Zs(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Zs(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Vn);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>R.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Zs{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hc(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hc(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function hc(n){let e=n.nextSibling;return n.remove(),e}const Vn=E.define({enables:dd});class Lt extends Si{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Lt.prototype.elementClass="";Lt.prototype.toDOM=void 0;Lt.prototype.mapMode=Se.TrackBefore;Lt.prototype.startSide=Lt.prototype.endSide=-1;Lt.prototype.point=!0;const Gs=E.define(),ny=E.define(),sy={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>W.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},En=E.define();function ry(n){return[pd(),En.of(Object.assign(Object.assign({},sy),n))]}const Pl=E.define({combine:n=>n.some(e=>e)});function pd(n){let e=[oy];return n&&n.fixed===!1&&e.push(Pl.of(!0)),e}const oy=fe.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(En).map(e=>new fc(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(Pl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Pl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=W.iter(this.view.state.facet(Gs),this.view.viewport.from),i=[],s=this.gutters.map(r=>new ly(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==Me.Text&&o){$l(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==Me.Text){$l(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(En),t=n.state.facet(En),i=n.docChanged||n.heightChanged||n.viewportChanged||!W.eq(n.startState.facet(Gs),n.state.facet(Gs),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new fc(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>R.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==ie.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function cc(n){return Array.isArray(n)?n:[n]}function $l(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class ly{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=W.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new Od(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];$l(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),s=i?[i]:null;for(let r of e.state.facet(ny)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fc{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=cc(t.markers(e)),t.initialSpacer&&(this.spacer=new Od(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=cc(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!W.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Od{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),ay(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class wo extends Lt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function xo(n,e){return n.state.facet(Ei).formatNumber(e,n.state)}const fy=En.compute([Ei],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(hy)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new wo(xo(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,i)=>{for(let s of e.state.facet(cy)){let r=s(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Ei)!=e.state.facet(Ei),initialSpacer(e){return new wo(xo(e,uc(e.state.doc.lines)))},updateSpacer(e,t){let i=xo(t.view,uc(t.view.state.doc.lines));return i==e.number?e:new wo(i)},domEventHandlers:n.facet(Ei).domEventHandlers}));function uy(n={}){return[Ei.of(n),pd(),fy]}function uc(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(dy.range(s)))}return W.of(e)});function Oy(){return py}const gd=1024;let gy=0;class So{constructor(e,t){this.from=e,this.to=t}}class I{constructor(e={}){this.id=gy++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ye.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}I.closedBy=new I({deserialize:n=>n.split(" ")});I.openedBy=new I({deserialize:n=>n.split(" ")});I.group=new I({deserialize:n=>n.split(" ")});I.isolate=new I({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});I.contextHash=new I({perNode:!0});I.lookAhead=new I({perNode:!0});I.mounted=new I({perNode:!0});class cr{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[I.mounted.id]}}const my=Object.create(null);class Ye{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):my,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Ye(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(I.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(I.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}Ye.none=new Ye("",Object.create(null),0,8);class ya{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|Oe.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Sa(Ye.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new ce(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new ce(Ye.none,t,i,s)))}static build(e){return xy(e)}}ce.empty=new ce(Ye.none,[],[],0);class wa{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new wa(this.buffer,this.index)}}class ei{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ye.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Nn(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(md(s,i,f,f+c.length)){if(c instanceof ei){if(r&Oe.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new bt(new by(o,c,e,f),null,u)}else if(r&Oe.IncludeAnonymous||!c.type.isAnonymous||xa(c)){let u;if(!(r&Oe.IgnoreMounts)&&(u=cr.get(c))&&!u.overlay)return new je(u.tree,f,e,o);let p=new je(c,f,e,o);return r&Oe.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&Oe.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&Oe.IgnoreOverlays)&&(s=cr.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new je(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function pc(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function Cl(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class by{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class bt extends bd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new bt(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Oe.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new bt(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new bt(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new bt(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new ce(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function yd(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new je(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(Nn(l,e,t,!1))}}return s?yd(s):i}class Al{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof je)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof je?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&Oe.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Oe.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Oe.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&Oe.IncludeAnonymous||l instanceof ei||!l.type.isAnonymous||xa(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return Cl(this._tree,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function xa(n){return n.children.some(e=>e instanceof ei||!e.type.isAnonymous||xa(e))}function xy(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=gd,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new wa(t,t.length):t,a=i.types,h=0,c=0;function f(k,x,y,P,A,M){let{id:T,start:C,end:q,size:B}=l,U=c,re=h;for(;B<0;)if(l.next(),B==-1){let nt=r[T];y.push(nt),P.push(C-k);return}else if(B==-3){h=T;return}else if(B==-4){c=T;return}else throw new RangeError(`Unrecognized record size: ${B}`);let me=a[T],ze,ue,Be=C-k;if(q-C<=s&&(ue=m(l.pos-x,A))){let nt=new Uint16Array(ue.size-ue.skip),Te=l.pos-ue.size,Ee=nt.length;for(;l.pos>Te;)Ee=b(ue.start,nt,Ee);ze=new ei(nt,q-ue.start,i),Be=ue.start-k}else{let nt=l.pos-B;l.next();let Te=[],Ee=[],oi=T>=o?T:-1,$i=0,fs=q;for(;l.pos>nt;)oi>=0&&l.id==oi&&l.size>=0?(l.end<=fs-s&&(O(Te,Ee,C,$i,l.end,fs,oi,U,re),$i=Te.length,fs=l.end),l.next()):M>2500?u(C,nt,Te,Ee):f(C,nt,Te,Ee,oi,M+1);if(oi>=0&&$i>0&&$i-1&&$i>0){let Ya=p(me,re);ze=Sa(me,Te,Ee,0,Te.length,0,q-C,Ya,Ya)}else ze=g(me,Te,Ee,q-C,U-q,re)}y.push(ze),P.push(Be)}function u(k,x,y,P){let A=[],M=0,T=-1;for(;l.pos>x;){let{id:C,start:q,end:B,size:U}=l;if(U>4)l.next();else{if(T>-1&&q=0;B-=3)C[U++]=A[B],C[U++]=A[B+1]-q,C[U++]=A[B+2]-q,C[U++]=U;y.push(new ei(C,A[2]-q,i)),P.push(q-k)}}function p(k,x){return(y,P,A)=>{let M=0,T=y.length-1,C,q;if(T>=0&&(C=y[T])instanceof ce){if(!T&&C.type==k&&C.length==A)return C;(q=C.prop(I.lookAhead))&&(M=P[T]+C.length+q)}return g(k,y,P,A,M,x)}}function O(k,x,y,P,A,M,T,C,q){let B=[],U=[];for(;k.length>P;)B.push(k.pop()),U.push(x.pop()+y-A);k.push(g(i.types[T],B,U,M-A,C-M,q)),x.push(A-y)}function g(k,x,y,P,A,M,T){if(M){let C=[I.contextHash,M];T=T?[C].concat(T):[C]}if(A>25){let C=[I.lookAhead,A];T=T?[C].concat(T):[C]}return new ce(k,x,y,P,T)}function m(k,x){let y=l.fork(),P=0,A=0,M=0,T=y.end-s,C={size:0,start:0,skip:0};e:for(let q=y.pos-k;y.pos>q;){let B=y.size;if(y.id==x&&B>=0){C.size=P,C.start=A,C.skip=M,M+=4,P+=4,y.next();continue}let U=y.pos-B;if(B<0||U=o?4:0,me=y.start;for(y.next();y.pos>U;){if(y.size<0)if(y.size==-3)re+=4;else break e;else y.id>=o&&(re+=4);y.next()}A=me,P+=B,M+=re}return(x<0||P==k)&&(C.size=P,C.start=A,C.skip=M),C.size>4?C:void 0}function b(k,x,y){let{id:P,start:A,end:M,size:T}=l;if(l.next(),T>=0&&P4){let q=l.pos-(T-4);for(;l.pos>q;)y=b(k,x,y)}x[--y]=C,x[--y]=M-k,x[--y]=A-k,x[--y]=P}else T==-3?h=P:T==-4&&(c=P);return y}let w=[],S=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,w,S,-1,0);let Q=(e=n.length)!==null&&e!==void 0?e:w.length?S[0]+w[0].length:0;return new ce(a[n.topID],w.reverse(),S.reverse(),Q)}const Oc=new WeakMap;function Us(n,e){if(!n.isAnonymous||e instanceof ei||e.type!=n)return 1;let t=Oc.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof ce)){t=1;break}t+=Us(n,i)}Oc.set(e,t)}return t}function Sa(n,e,t,i,s,r,o,l,a){let h=0;for(let O=i;O=c)break;x+=y}if(S==Q+1){if(x>c){let y=O[Q];p(y.children,y.positions,0,y.children.length,g[Q]+w);continue}f.push(O[Q])}else{let y=g[S-1]+O[S-1].length-k;f.push(Sa(n,O,g,Q,S,k,y,null,a))}u.push(k+w-r)}}return p(e,t,i,s,0),(l||a)(f,u,o)}class Sy{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof bt?this.setBuffer(e.context.buffer,e.index,t):e instanceof je&&this.map.set(e.tree,t)}get(e){return e instanceof bt?this.getBuffer(e.context.buffer,e.index):e instanceof je?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class wi{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new wi(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let p=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=p>=O?null:new wi(p,O,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew So(s.from,s.to)):[new So(0,0)]:[new So(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class ky{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new I({perNode:!0});let vy=0;class Ge{constructor(e,t,i,s){this.name=e,this.set=t,this.base=i,this.modified=s,this.id=vy++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Ge&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Ge(i,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new fr(e);return i=>i.modified.indexOf(t)>-1?i:fr.get(i.base||i,i.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Qy=0;class fr{constructor(e){this.name=e,this.instances=[],this.id=Qy++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Py(t,l.modified));if(i)return i;let s=[],r=new Ge(e.name,s,e,t);for(let l of t)l.instances.push(r);let o=$y(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(fr.get(l,a));return r}}function Py(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function $y(n){let e=[[]];for(let t=0;ti.length-t.length)}function xd(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let p=s[f++];if(f==s.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new ur(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return Sd.add(e)}const Sd=new I;class ur{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function Cy(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Ay(n,e,t,i=0,s=n.length){let r=new Zy(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Zy{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(p=>!p.scope||p.scope(o)));let h=s,c=My(e)||ur.empty,f=Cy(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(I.mounted);if(u&&u.overlay){let p=e.node.enter(u.overlay[0].from+l,1),O=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,b=l;;m++){let w=m=S||!e.nextSibling())););if(!w||S>i)break;b=w.to+l,b>t&&(this.highlightRange(p.cursor(),Math.max(t,w.from+l),Math.min(i,b),"",O),this.startSpan(Math.min(i,b),h))}g&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function My(n){let e=n.type.prop(Sd);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Z=Ge.define,Rs=Z(),jt=Z(),gc=Z(jt),mc=Z(jt),Yt=Z(),Ts=Z(Yt),ko=Z(Yt),pt=Z(),li=Z(pt),ut=Z(),dt=Z(),Zl=Z(),yn=Z(Zl),Es=Z(),d={comment:Rs,lineComment:Z(Rs),blockComment:Z(Rs),docComment:Z(Rs),name:jt,variableName:Z(jt),typeName:gc,tagName:Z(gc),propertyName:mc,attributeName:Z(mc),className:Z(jt),labelName:Z(jt),namespace:Z(jt),macroName:Z(jt),literal:Yt,string:Ts,docString:Z(Ts),character:Z(Ts),attributeValue:Z(Ts),number:ko,integer:Z(ko),float:Z(ko),bool:Z(Yt),regexp:Z(Yt),escape:Z(Yt),color:Z(Yt),url:Z(Yt),keyword:ut,self:Z(ut),null:Z(ut),atom:Z(ut),unit:Z(ut),modifier:Z(ut),operatorKeyword:Z(ut),controlKeyword:Z(ut),definitionKeyword:Z(ut),moduleKeyword:Z(ut),operator:dt,derefOperator:Z(dt),arithmeticOperator:Z(dt),logicOperator:Z(dt),bitwiseOperator:Z(dt),compareOperator:Z(dt),updateOperator:Z(dt),definitionOperator:Z(dt),typeOperator:Z(dt),controlOperator:Z(dt),punctuation:Zl,separator:Z(Zl),bracket:yn,angleBracket:Z(yn),squareBracket:Z(yn),paren:Z(yn),brace:Z(yn),content:pt,heading:li,heading1:Z(li),heading2:Z(li),heading3:Z(li),heading4:Z(li),heading5:Z(li),heading6:Z(li),contentSeparator:Z(pt),list:Z(pt),quote:Z(pt),emphasis:Z(pt),strong:Z(pt),link:Z(pt),monospace:Z(pt),strikethrough:Z(pt),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:Es,documentMeta:Z(Es),annotation:Z(Es),processingInstruction:Z(Es),definition:Ge.defineModifier("definition"),constant:Ge.defineModifier("constant"),function:Ge.defineModifier("function"),standard:Ge.defineModifier("standard"),local:Ge.defineModifier("local"),special:Ge.defineModifier("special")};for(let n in d){let e=d[n];e instanceof Ge&&(e.name=n)}kd([{tag:d.link,class:"tok-link"},{tag:d.heading,class:"tok-heading"},{tag:d.emphasis,class:"tok-emphasis"},{tag:d.strong,class:"tok-strong"},{tag:d.keyword,class:"tok-keyword"},{tag:d.atom,class:"tok-atom"},{tag:d.bool,class:"tok-bool"},{tag:d.url,class:"tok-url"},{tag:d.labelName,class:"tok-labelName"},{tag:d.inserted,class:"tok-inserted"},{tag:d.deleted,class:"tok-deleted"},{tag:d.literal,class:"tok-literal"},{tag:d.string,class:"tok-string"},{tag:d.number,class:"tok-number"},{tag:[d.regexp,d.escape,d.special(d.string)],class:"tok-string2"},{tag:d.variableName,class:"tok-variableName"},{tag:d.local(d.variableName),class:"tok-variableName tok-local"},{tag:d.definition(d.variableName),class:"tok-variableName tok-definition"},{tag:d.special(d.variableName),class:"tok-variableName2"},{tag:d.definition(d.propertyName),class:"tok-propertyName tok-definition"},{tag:d.typeName,class:"tok-typeName"},{tag:d.namespace,class:"tok-namespace"},{tag:d.className,class:"tok-className"},{tag:d.macroName,class:"tok-macroName"},{tag:d.propertyName,class:"tok-propertyName"},{tag:d.operator,class:"tok-operator"},{tag:d.comment,class:"tok-comment"},{tag:d.meta,class:"tok-meta"},{tag:d.invalid,class:"tok-invalid"},{tag:d.punctuation,class:"tok-punctuation"}]);var vo;const Li=new I;function vd(n){return E.define({combine:n?e=>e.concat(n):void 0})}const ka=new I;class st{constructor(e,t,i=[],s=""){this.data=e,this.name=s,H.prototype.hasOwnProperty("tree")||Object.defineProperty(H.prototype,"tree",{get(){return ge(this)}}),this.parser=t,this.extension=[ti.of(this),H.languageData.of((r,o,l)=>{let a=bc(r,o,l),h=a.type.prop(Li);if(!h)return[];let c=r.facet(h),f=a.type.prop(ka);if(f){let u=a.resolve(o-a.from,l);for(let p of f)if(p.test(u,r)){let O=r.facet(p.facet);return p.type=="replace"?O:O.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return bc(e,t,i).type.prop(Li)==this.data}findRegions(e){let t=e.facet(ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(Li)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(I.mounted);if(l){if(l.tree.prop(Li)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new dr(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ge(n){let e=n.field(st.state,!1);return e?e.tree:ce.empty}class Ry{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let wn=null;class pr{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new pr(e,t,[],ce.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Ry(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=ce.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(wi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=wn;wn=this;try{return e()}finally{wn=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=yc(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=wi.applyChanges(i,a),s=ce.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=yc(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends wd{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=wn;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new ce(Ye.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return wn}}function yc(n,e,t){return wi.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class en{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new en(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=pr.create(e.facet(ti).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new en(i)}}st.state=be.define({create:en.init,update(n,e){for(let t of e.effects)if(t.is(st.setState))return t.value;return e.startState.facet(ti)!=e.state.facet(ti)?en.init(e.state):n.apply(e)}});let Qd=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Qd=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Qo=typeof navigator<"u"&&(!((vo=navigator.scheduling)===null||vo===void 0)&&vo.isInputPending)?()=>navigator.scheduling.isInputPending():null,Ty=fe.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(st.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(st.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Qd(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Qo&&Qo()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:st.setState.of(new en(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>qe(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ti=E.define({combine(n){return n.length?n[0]:null},enables:n=>[st.state,Ty,R.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ey{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Ly=E.define(),Xr=E.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Or(n){let e=n.facet(Xr);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function In(n,e){let t="",i=n.tabSize,s=n.facet(Xr)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?Dy(n,t,e):null}class jr{constructor(e,t={}){this.state=e,this.options=t,this.unit=Or(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return hn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Pd=new I;function Dy(n,e,t){let i=e.resolveStack(t),s=i.node.enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o!=i.node;o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return $d(i,n,t)}function $d(n,e,t){for(let i=n;i;i=i.next){let s=qy(i.node);if(s)return s(Qa.create(e,t,i))}return 0}function _y(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function qy(n){let e=n.type.prop(Pd);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(I.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Cd(o,!0,1,void 0,r&&!_y(o)?s.from:void 0)}return n.parent==null?Xy:null}function Xy(){return 0}class Qa extends jr{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new Qa(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(jy(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return $d(this.context.next,this.base,this.pos)}}function jy(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function Yy(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}l=a.to}}function zy({closing:n,align:e=!0,units:t=1}){return i=>Cd(i,e,t,n)}function Cd(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?Yy(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const By=n=>n.baseIndent;function Po({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Vy=200;function Ny(){return H.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+Vy)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=va(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],p=In(o,f);u!=p&&a.push({from:c.from,to:c.from+u.length,insert:p})}return a.length?[n,{changes:a,sequential:!0}]:n})}const Iy=E.define(),Ad=new I;function Fy(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function Gy(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function gr(n,e,t){for(let i of n.facet(Iy)){let s=i(n,e,t);if(s)return s}return Wy(n,e,t)}function Zd(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const Yr=X.define({map:Zd}),rs=X.define({map:Zd});function Md(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const Pi=be.define({create(){return _.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Yr)&&!Uy(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Pa),s=i?_.replace({widget:new nw(i(e.state,t.value))}):wc;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(rs)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>R.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function Uy(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function Rd(n,e){return n.field(Pi,!1)?e:e.concat(X.appendConfig.of(Ed()))}const Hy=n=>{for(let e of Md(n)){let t=gr(n.state,e.from,e.to);if(t)return n.dispatch({effects:Rd(n.state,[Yr.of(t),Td(n,t)])}),!0}return!1},Ky=n=>{if(!n.state.field(Pi,!1))return!1;let e=[];for(let t of Md(n)){let i=mr(n.state,t.from,t.to);i&&e.push(rs.of(i),Td(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function Td(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return R.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const Jy=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(Pi,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(rs.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},tw=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Hy},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ky},{key:"Ctrl-Alt-[",run:Jy},{key:"Ctrl-Alt-]",run:ew}],iw={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Pa=E.define({combine(n){return Qt(n,iw)}});function Ed(n){let e=[Pi,ow];return n&&e.push(Pa.of(n)),e}function Ld(n,e){let{state:t}=n,i=t.facet(Pa),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=mr(n.state,l.from,l.to);a&&n.dispatch({effects:rs.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const wc=_.replace({widget:new class extends _t{toDOM(n){return Ld(n,null)}}});class nw extends _t{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ld(e,this.value)}}const sw={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class $o extends Lt{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function rw(n={}){let e=Object.assign(Object.assign({},sw),n),t=new $o(e,!0),i=new $o(e,!1),s=fe.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(ti)!=o.state.facet(ti)||o.startState.field(Pi,!1)!=o.state.field(Pi,!1)||ge(o.startState)!=ge(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Ut;for(let a of o.viewportLineBlocks){let h=mr(o.state,a.from,a.to)?i:gr(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,ry({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||W.empty},initialSpacer(){return new $o(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=mr(o.state,l.from,l.to);if(h)return o.dispatch({effects:rs.of(h)}),!0;let c=gr(o.state,l.from,l.to);return c?(o.dispatch({effects:Yr.of(c)}),!0):!1}})}),Ed()]}const ow=R.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class os{constructor(e,t){this.specs=e;let i;function s(l){let a=Ht.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof st?l=>l.prop(Li)==o.data:o?l=>l==o:void 0,this.style=kd(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Ht(i):null,this.themeType=t.themeType}static define(e,t){return new os(e,t||{})}}const Ml=E.define(),Dd=E.define({combine(n){return n.length?[n[0]]:null}});function Co(n){let e=n.facet(Ml);return e.length?e:n.facet(Dd)}function _d(n,e){let t=[aw],i;return n instanceof os&&(n.module&&t.push(R.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Dd.of(n)):i?t.push(Ml.computeN([R.darkTheme],s=>s.facet(R.darkTheme)==(i=="dark")?[n]:[])):t.push(Ml.of(n)),t}class lw{constructor(e){this.markCache=Object.create(null),this.tree=ge(e.state),this.decorations=this.buildDeco(e,Co(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ge(e.state),i=Co(e.state),s=i!=Co(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return _.none;let i=new Ut;for(let{from:s,to:r}of e.visibleRanges)Ay(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=_.mark({class:a})))},s,r);return i.finish()}}const aw=si.high(fe.fromClass(lw,{decorations:n=>n.decorations})),hw=os.define([{tag:d.meta,color:"#404740"},{tag:d.link,textDecoration:"underline"},{tag:d.heading,textDecoration:"underline",fontWeight:"bold"},{tag:d.emphasis,fontStyle:"italic"},{tag:d.strong,fontWeight:"bold"},{tag:d.strikethrough,textDecoration:"line-through"},{tag:d.keyword,color:"#708"},{tag:[d.atom,d.bool,d.url,d.contentSeparator,d.labelName],color:"#219"},{tag:[d.literal,d.inserted],color:"#164"},{tag:[d.string,d.deleted],color:"#a11"},{tag:[d.regexp,d.escape,d.special(d.string)],color:"#e40"},{tag:d.definition(d.variableName),color:"#00f"},{tag:d.local(d.variableName),color:"#30a"},{tag:[d.typeName,d.namespace],color:"#085"},{tag:d.className,color:"#167"},{tag:[d.special(d.variableName),d.macroName],color:"#256"},{tag:d.definition(d.propertyName),color:"#00c"},{tag:d.comment,color:"#940"},{tag:d.invalid,color:"#f00"}]),cw=R.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),qd=1e4,Xd="()[]{}",jd=E.define({combine(n){return Qt(n,{afterCursor:!0,brackets:Xd,maxScanDistance:qd,renderMatch:dw})}}),fw=_.mark({class:"cm-matchingBracket"}),uw=_.mark({class:"cm-nonmatchingBracket"});function dw(n){let e=[],t=n.matched?fw:uw;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const pw=be.define({create(){return _.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(jd);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=yt(e.state,s.head,-1,i)||s.head>0&&yt(e.state,s.head-1,1,i)||i.afterCursor&&(yt(e.state,s.head,1,i)||s.headR.decorations.from(n)}),Ow=[pw,cw];function gw(n={}){return[jd.of(n),Ow]}const mw=new I;function Rl(n,e,t){let i=n.prop(e<0?I.openedBy:I.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Tl(n){let e=n.type.prop(mw);return e?e(n.node):n}function yt(n,e,t,i={}){let s=i.maxScanDistance||qd,r=i.brackets||Xd,o=ge(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=Rl(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return bw(n,e,t,a,c,h,r)}}return yw(n,e,t,o,l.type,s,r)}function bw(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let p=c.value;t<0&&(u+=p.length);let O=e+u*t;for(let g=t>0?0:p.length-1,m=t>0?p.length:-1;g!=m;g+=t){let b=o.indexOf(p[g]);if(!(b<0||i.resolveInner(O+g,1).type!=s))if(b%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:O+g,to:O+g+1},matched:b>>1==a>>1};f--}}t>0&&(u+=p.length)}return c.done?{start:h,matched:!1}:null}const ww=Object.create(null),xc=[Ye.none],Sc=[],kc=Object.create(null),xw=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xw[n]=Sw(ww,e);function Ao(n,e){Sc.indexOf(n)>-1||(Sc.push(n),console.warn(e))}function Sw(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||d[h];c?typeof c=="function"?a.length?a=a.map(c):Ao(h,`Modifier ${h} used at start of tag`):a.length?Ao(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:Ao(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=kc[s];if(r)return r.id;let o=kc[s]=Ye.define({id:xc.length,name:i,props:[xd({[i]:t})]});return xc.push(o),o.id}ie.RTL,ie.LTR;const kw=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=Ca(n.state,t.from);return i.line?vw(n):i.block?Pw(n):!1};function $a(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const vw=$a(Aw,0),Qw=$a(Yd,0),Pw=$a((n,e)=>Yd(n,e,Cw(e)),0);function Ca(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const xn=50;function $w(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-xn,i),o=n.sliceDoc(s,s+xn),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*xn?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+xn),f=n.sliceDoc(s-xn,s));let u=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(f)[0].length,O=f.length-p-t.length;return c.slice(u,u+e.length)==e&&f.slice(O,O+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-p-t.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function Cw(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Yd(n,e,t=e.selection.ranges){let i=t.map(r=>Ca(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>$w(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,p=u==f.length,O=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const El=Dt.define(),Zw=Dt.define(),Mw=E.define(),zd=E.define({combine(n){return Qt(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),Bd=be.define({create(){return wt.empty},update(n,e){let t=e.state.facet(zd),i=e.annotation(El);if(i){let a=Xe.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=br(c,c.length,t.minDepth,a):c=Id(c,e.startState.selection),new wt(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(Zw);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(he.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Xe.fromTransaction(e),o=e.annotation(he.time),l=e.annotation(he.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new wt(n.done.map(Xe.fromJSON),n.undone.map(Xe.fromJSON))}});function Rw(n={}){return[Bd,zd.of(n),R.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Vd:e.inputType=="historyRedo"?Ll:null;return i?(e.preventDefault(),i(t)):!1}})]}function zr(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Bd,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const Vd=zr(0,!1),Ll=zr(1,!1),Tw=zr(0,!0),Ew=zr(1,!0);class Xe{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Xe(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Xe(e.changes&&pe.fromJSON(e.changes),[],e.mapped&&St.fromJSON(e.mapped),e.startSelection&&v.fromJSON(e.startSelection),e.selectionsAfter.map(v.fromJSON))}static fromTransaction(e,t){let i=He;for(let s of e.startState.facet(Mw)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Xe(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,He)}static selection(e){return new Xe(void 0,He,void 0,void 0,e)}}function br(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function Lw(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function Dw(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Nd(n,e){return n.length?e.length?n.concat(e):n:e}const He=[],_w=200;function Id(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-_w));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),br(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Xe.selection([e])]}function qw(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Zo(n,e){if(!n.length)return n;let t=n.length,i=He;for(;t;){let s=Xw(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Xe.selection(i)]:He}function Xw(n,e,t){let i=Nd(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):He,t);if(!n.changes)return Xe.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Xe(s,X.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const jw=/^(input\.type|delete)($|\.)/;class wt{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new wt(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||jw.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Br(t,e))}function Ce(n){return n.textDirectionAt(n.state.selection.main.head)==ie.LTR}const Wd=n=>Fd(n,!Ce(n)),Gd=n=>Fd(n,Ce(n));function Ud(n,e){return ht(n,t=>t.empty?n.moveByGroup(t,e):Br(t,e))}const zw=n=>Ud(n,!Ce(n)),Bw=n=>Ud(n,Ce(n));function Vw(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Vr(n,e,t){let i=ge(n).resolveInner(e.head),s=t?I.closedBy:I.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;Vw(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?yt(n,i.from,1):yt(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,v.cursor(l,t?-1:1)}const Nw=n=>ht(n,e=>Vr(n.state,e,!Ce(n))),Iw=n=>ht(n,e=>Vr(n.state,e,Ce(n)));function Hd(n,e){return ht(n,t=>{if(!t.empty)return Br(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Kd=n=>Hd(n,!1),Jd=n=>Hd(n,!0);function ep(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Br(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomtp(n,!1),Dl=n=>tp(n,!0);function ri(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=v.cursor(i.from+r))}return s}const Fw=n=>ht(n,e=>ri(n,e,!0)),Ww=n=>ht(n,e=>ri(n,e,!1)),Gw=n=>ht(n,e=>ri(n,e,!Ce(n))),Uw=n=>ht(n,e=>ri(n,e,Ce(n))),Hw=n=>ht(n,e=>v.cursor(n.lineBlockAt(e.head).from,1)),Kw=n=>ht(n,e=>v.cursor(n.lineBlockAt(e.head).to,-1));function Jw(n,e,t){let i=!1,s=cn(n.selection,r=>{let o=yt(n,r.head,-1)||yt(n,r.head,1)||r.head>0&&yt(n,r.head-1,1)||r.headJw(n,e,!1);function it(n,e){let t=cn(n.state.selection,i=>{let s=e(i);return v.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Pt(n.state,t)),!0)}function ip(n,e){return it(n,t=>n.moveByChar(t,e))}const np=n=>ip(n,!Ce(n)),sp=n=>ip(n,Ce(n));function rp(n,e){return it(n,t=>n.moveByGroup(t,e))}const tx=n=>rp(n,!Ce(n)),ix=n=>rp(n,Ce(n)),nx=n=>it(n,e=>Vr(n.state,e,!Ce(n))),sx=n=>it(n,e=>Vr(n.state,e,Ce(n)));function op(n,e){return it(n,t=>n.moveVertically(t,e))}const lp=n=>op(n,!1),ap=n=>op(n,!0);function hp(n,e){return it(n,t=>n.moveVertically(t,e,ep(n).height))}const Qc=n=>hp(n,!1),Pc=n=>hp(n,!0),rx=n=>it(n,e=>ri(n,e,!0)),ox=n=>it(n,e=>ri(n,e,!1)),lx=n=>it(n,e=>ri(n,e,!Ce(n))),ax=n=>it(n,e=>ri(n,e,Ce(n))),hx=n=>it(n,e=>v.cursor(n.lineBlockAt(e.head).from)),cx=n=>it(n,e=>v.cursor(n.lineBlockAt(e.head).to)),$c=({state:n,dispatch:e})=>(e(Pt(n,{anchor:0})),!0),Cc=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.doc.length})),!0),Ac=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.selection.main.anchor,head:0})),!0),Zc=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fx=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),ux=({state:n,dispatch:e})=>{let t=Nr(n).map(({from:i,to:s})=>v.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:v.create(t),userEvent:"select"})),!0},dx=({state:n,dispatch:e})=>{let t=cn(n.selection,i=>{let s=ge(n),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return v.range(l.to,l.from)}return i});return t.eq(n.selection)?!1:(e(Pt(n,t)),!0)},px=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=v.create([t.main]):t.main.empty||(i=v.create([v.cursor(t.main.head)])),i?(e(Pt(n,i)),!0):!1};function ls(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=Ls(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=Ls(n,o,!1),l=Ls(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:v.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const cp=(n,e,t)=>ls(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&scp(n,!1,!0),fp=n=>cp(n,!0,!1),up=(n,e)=>ls(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=ve(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),dp=n=>up(n,!1),Ox=n=>up(n,!0),gx=n=>ls(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headls(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bx=n=>ls(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:G.of(["",""])},range:v.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},wx=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:ve(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:ve(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:v.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Nr(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function pp(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of Nr(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(v.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(v.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:v.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const xx=({state:n,dispatch:e})=>pp(n,e,!1),Sx=({state:n,dispatch:e})=>pp(n,e,!0);function Op(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Nr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const kx=({state:n,dispatch:e})=>Op(n,e,!1),vx=({state:n,dispatch:e})=>Op(n,e,!0),Qx=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Nr(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Px(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ge(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(I.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const Mc=gp(!1),$x=gp(!0);function gp(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Px(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new jr(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=va(h,r);for(c==null&&(c=hn(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:v.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const Cx=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new jr(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Aa(n,(r,o,l)=>{let a=va(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=In(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(Aa(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Xr)})}),{userEvent:"input.indent"})),!0),bp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Aa(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=hn(s,n.tabSize),o=0,l=In(n,Math.max(0,r-Or(n)));for(;o(n.setTabFocusMode(),!0),Zx=[{key:"Ctrl-b",run:Wd,shift:np,preventDefault:!0},{key:"Ctrl-f",run:Gd,shift:sp},{key:"Ctrl-p",run:Kd,shift:lp},{key:"Ctrl-n",run:Jd,shift:ap},{key:"Ctrl-a",run:Hw,shift:hx},{key:"Ctrl-e",run:Kw,shift:cx},{key:"Ctrl-d",run:fp},{key:"Ctrl-h",run:_l},{key:"Ctrl-k",run:gx},{key:"Ctrl-Alt-h",run:dp},{key:"Ctrl-o",run:yx},{key:"Ctrl-t",run:wx},{key:"Ctrl-v",run:Dl}],Mx=[{key:"ArrowLeft",run:Wd,shift:np,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:zw,shift:tx,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Gw,shift:lx,preventDefault:!0},{key:"ArrowRight",run:Gd,shift:sp,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Bw,shift:ix,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Uw,shift:ax,preventDefault:!0},{key:"ArrowUp",run:Kd,shift:lp,preventDefault:!0},{mac:"Cmd-ArrowUp",run:$c,shift:Ac},{mac:"Ctrl-ArrowUp",run:vc,shift:Qc},{key:"ArrowDown",run:Jd,shift:ap,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Cc,shift:Zc},{mac:"Ctrl-ArrowDown",run:Dl,shift:Pc},{key:"PageUp",run:vc,shift:Qc},{key:"PageDown",run:Dl,shift:Pc},{key:"Home",run:Ww,shift:ox,preventDefault:!0},{key:"Mod-Home",run:$c,shift:Ac},{key:"End",run:Fw,shift:rx,preventDefault:!0},{key:"Mod-End",run:Cc,shift:Zc},{key:"Enter",run:Mc,shift:Mc},{key:"Mod-a",run:fx},{key:"Backspace",run:_l,shift:_l},{key:"Delete",run:fp},{key:"Mod-Backspace",mac:"Alt-Backspace",run:dp},{key:"Mod-Delete",mac:"Alt-Delete",run:Ox},{mac:"Mod-Backspace",run:mx},{mac:"Mod-Delete",run:bx}].concat(Zx.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rx=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Nw,shift:nx},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Iw,shift:sx},{key:"Alt-ArrowUp",run:xx},{key:"Shift-Alt-ArrowUp",run:kx},{key:"Alt-ArrowDown",run:Sx},{key:"Shift-Alt-ArrowDown",run:vx},{key:"Escape",run:px},{key:"Mod-Enter",run:$x},{key:"Alt-l",mac:"Ctrl-l",run:ux},{key:"Mod-i",run:dx,preventDefault:!0},{key:"Mod-[",run:bp},{key:"Mod-]",run:mp},{key:"Mod-Alt-\\",run:Cx},{key:"Shift-Mod-k",run:Qx},{key:"Shift-Mod-\\",run:ex},{key:"Mod-/",run:kw},{key:"Alt-A",run:Qw},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Ax}].concat(Mx),Tx={key:"Tab",run:mp,shift:bp};function ee(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class tn{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Rc(l)):Rc,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return we(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=sa(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ue(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=yr(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Yi(t,e.sliceString(t,i));return Mo.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=yr(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(xp.prototype[Symbol.iterator]=Sp.prototype[Symbol.iterator]=function(){return this});function Ex(n){try{return new RegExp(n,Za),!0}catch{return!1}}function yr(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function ql(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=ee("input",{class:"cm-textfield",name:"line",value:e}),i=ee("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:wr.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},ee("label",n.state.phrase("Go to line"),": ",t)," ",ee("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,p=h?+h:l.number;if(h&&f){let m=p/100;a&&(m=m*(a=="-"?-1:1)+l.number/o.doc.lines),p=Math.round(o.doc.lines*m)}else h&&a&&(p=p*(a=="-"?-1:1)+l.number);let O=o.doc.line(Math.max(1,Math.min(o.doc.lines,p))),g=v.cursor(O.from+Math.max(0,Math.min(u,O.length)));n.dispatch({effects:[wr.of(!1),R.scrollIntoView(g.from,{y:"center"})],selection:g}),n.focus()}return{dom:i}}const wr=X.define(),Tc=be.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(wr)&&(n=t.value);return n},provide:n=>Vn.from(n,e=>e?ql:null)}),Lx=n=>{let e=Bn(n,ql);if(!e){let t=[wr.of(!0)];n.state.field(Tc,!1)==null&&t.push(X.appendConfig.of([Tc,Dx])),n.dispatch({effects:t}),e=Bn(n,ql)}return e&&e.dom.querySelector("input").select(),!0},Dx=R.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),_x={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},kp=E.define({combine(n){return Qt(n,_x,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function qx(n){let e=[Bx,zx];return n&&e.push(kp.of(n)),e}const Xx=_.mark({class:"cm-selectionMatch"}),jx=_.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ec(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=ne.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=ne.Word)}function Yx(n,e,t,i){return n(e.sliceDoc(t,t+1))==ne.Word&&n(e.sliceDoc(i-1,i))==ne.Word}const zx=fe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(kp),{state:t}=n,i=t.selection;if(i.ranges.length>1)return _.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return _.none;let a=t.wordAt(s.head);if(!a)return _.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return _.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Ec(o,t,s.from,s.to)&&Yx(o,t,s.from,s.to)))return _.none}else if(r=t.sliceDoc(s.from,s.to),!r)return _.none}let l=[];for(let a of n.visibleRanges){let h=new tn(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||Ec(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(jx.range(c,f)):(c>=s.to||f<=s.from)&&l.push(Xx.range(c,f)),l.length>e.maxMatches))return _.none}}return _.set(l)}},{decorations:n=>n.decorations}),Bx=R.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vx=({state:n,dispatch:e})=>{let{selection:t}=n,i=v.create(t.ranges.map(s=>n.wordAt(s.head)||v.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function Nx(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new tn(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new tn(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const Ix=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return Vx({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=Nx(n,i);return s?(e(n.update({selection:n.selection.addRange(v.range(s.from,s.to),!1),effects:R.scrollIntoView(s.to)})),!0):!1},fn=E.define({combine(n){return Qt(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sS(e),scrollToMatch:e=>R.scrollIntoView(e)})}});class vp{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Ex(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Ux(this):new Wx(this)}getCursor(e,t=0,i){let s=e.doc?e:H.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Ti(this,s,t,i):Ri(this,s,t,i)}}class Qp{constructor(e){this.spec=e}}function Ri(n,e,t,i){return new tn(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Fx(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Fx(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ri(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Ti(n,e,t,i){return new xp(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Gx(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function xr(n,e){return n.slice(ve(n,e,!1),e)}function Sr(n,e){return n.slice(e,ve(n,e))}function Gx(n){return(e,t,i)=>!i[0].length||(n(xr(i.input,i.index))!=ne.Word||n(Sr(i.input,i.index))!=ne.Word)&&(n(Sr(i.input,i.index+i[0].length))!=ne.Word||n(xr(i.input,i.index+i[0].length))!=ne.Word)}class Ux extends Qp{nextMatch(e,t,i){let s=Ti(this.spec,e,i,e.doc.length).next();return s.done&&(s=Ti(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Ti(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ti(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Fn=X.define(),Ma=X.define(),Wt=be.define({create(n){return new Ro(Xl(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Fn)?n=new Ro(t.value.create(),n.panel):t.is(Ma)&&(n=new Ro(n.query,t.value?Ra:null));return n},provide:n=>Vn.from(n,e=>e.panel)});class Ro{constructor(e,t){this.query=e,this.panel=t}}const Hx=_.mark({class:"cm-searchMatch"}),Kx=_.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jx=fe.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Wt))}update(n){let e=n.state.field(Wt);(e!=n.startState.field(Wt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return _.none;let{view:t}=this,i=new Ut;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?Kx:Hx)})}return i.finish()}},{decorations:n=>n.decorations});function as(n){return e=>{let t=e.state.field(Wt,!1);return t&&t.query.spec.valid?n(e,t):Cp(e)}}const kr=as((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=v.single(i.from,i.to),r=n.state.facet(fn);return n.dispatch({selection:s,effects:[Ta(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),$p(n),!0}),vr=as((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=v.single(s.from,s.to),o=n.state.facet(fn);return n.dispatch({selection:r,effects:[Ta(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),$p(n),!0}),eS=as((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:v.create(t.map(i=>v.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),tS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new tn(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(v.range(l.value.from,l.value.to))}return e(n.update({selection:v.create(r,o),userEvent:"select.search.matches"})),!0},Lc=as((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push(R.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l=v.single(r.from-c,r.to-c),h.push(Ta(n,r)),h.push(t.facet(fn).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),iS=as((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:R.announce.of(i),userEvent:"input.replace.all"}),!0});function Ra(n){return n.state.facet(fn).createPanel(n)}function Xl(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(fn);return new vp({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function Pp(n){let e=Bn(n,Ra);return e&&e.dom.querySelector("[main-field]")}function $p(n){let e=Pp(n);e&&e==n.root.activeElement&&e.select()}const Cp=n=>{let e=n.state.field(Wt,!1);if(e&&e.panel){let t=Pp(n);if(t&&t!=n.root.activeElement){let i=Xl(n.state,e.query.spec);i.valid&&n.dispatch({effects:Fn.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[Ma.of(!0),e?Fn.of(Xl(n.state,e.query.spec)):X.appendConfig.of(oS)]});return!0},Ap=n=>{let e=n.state.field(Wt,!1);if(!e||!e.panel)return!1;let t=Bn(n,Ra);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:Ma.of(!1)}),!0},nS=[{key:"Mod-f",run:Cp,scope:"editor search-panel"},{key:"F3",run:kr,shift:vr,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:kr,shift:vr,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ap,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tS},{key:"Mod-Alt-g",run:Lx},{key:"Mod-d",run:Ix,preventDefault:!0}];class sS{constructor(e){this.view=e;let t=this.query=e.state.field(Wt).query.spec;this.commit=this.commit.bind(this),this.searchField=ee("input",{value:t.search,placeholder:Ve(e,"Find"),"aria-label":Ve(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ee("input",{value:t.replace,placeholder:Ve(e,"Replace"),"aria-label":Ve(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ee("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=ee("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=ee("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return ee("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=ee("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>kr(e),[Ve(e,"next")]),i("prev",()=>vr(e),[Ve(e,"previous")]),i("select",()=>eS(e),[Ve(e,"all")]),ee("label",null,[this.caseField,Ve(e,"match case")]),ee("label",null,[this.reField,Ve(e,"regexp")]),ee("label",null,[this.wordField,Ve(e,"by word")]),...e.state.readOnly?[]:[ee("br"),this.replaceField,i("replace",()=>Lc(e),[Ve(e,"replace")]),i("replaceAll",()=>iS(e),[Ve(e,"replace all")])],ee("button",{name:"close",onclick:()=>Ap(e),"aria-label":Ve(e,"close"),type:"button"},["×"])])}commit(){let e=new vp({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Fn.of(e)}))}keydown(e){Ob(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?vr:kr)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Lc(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(Fn)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(fn).top}}function Ve(n,e){return n.state.phrase(e)}const Ds=30,_s=/[\s\.,:;?!]/;function Ta(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-Ds),o=Math.min(s,t+Ds),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-Ds;a--)if(!_s.test(l[a-1])&&_s.test(l[a])){l=l.slice(0,a);break}}return R.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const rS=R.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),oS=[Wt,si.low(Jx),rS];class Zp{constructor(e,t,i,s){this.state=e,this.pos=t,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ge(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Rp(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Dc(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lS(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:lS(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function aS(n,e){return t=>{for(let i=ge(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class _c{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function Gt(n){return n.selection.main.from}function Rp(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Ea=Dt.define();function hS(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>{if(l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i))return{range:l};let a=n.toText(e);return{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:a},range:v.cursor(l.from+r+a.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const qc=new WeakMap;function cS(n){if(!Array.isArray(n))return n;let e=qc.get(n);return e||qc.set(n,e=Mp(n)),e}const Qr=X.define(),Wn=X.define();class fS{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=sa(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!w||y==1&&m||Q==0&&y!=0)&&(t[f]==k||i[f]==k&&(u=!0)?o[f++]=w:o.length&&(b=!1)),Q=y,w+=Ue(k)}return f==a&&o[0]==0&&b?this.result(-100+(u?-200:0),o,e):p==a&&O==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):p==a?this.ret(-200+-700-e.length,[O,g]):f==a?this.result(-100+(u?-200:0)+-700+(b?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?Ue(we(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class uS{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:dS,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Xc(e(i),t(i)),optionClass:(e,t)=>i=>Xc(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Xc(n,e){return n?e?n+" "+e:n:e}function dS(n,e,t,i,s,r){let o=n.textDirection==ie.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,p=s.right-e.right,O=i.right-i.left,g=i.bottom-i.top;if(l&&u=g||w>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let m=(e.bottom-e.top)/r.offsetHeight,b=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/m}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function pS(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function To(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class OS{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(ke);this.optionContent=pS(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=To(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ke).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Wn.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=To(r.length,o,e.state.facet(ke).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=To(t.options.length,t.selected,this.view.state.facet(ke).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>qe(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&mS(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let p=s.appendChild(document.createElement("completion-section"));p.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let p=u(l,this.view.state,this.view,a);p&&c.appendChild(p)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew OS(t,n,e)}function mS(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function jc(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bS(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(ke);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new _c(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,p=r.filterStrict?new uS(f):new fS(f);for(let O of h.result.options)if(u=p.match(O.label)){let g=O.displayLabel?c?c(O,u.matched):[]:u.matched;s(new _c(O,h.source,g,u.score+(O.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,p)=>{var O,g;return((O=u.rank)!==null&&O!==void 0?O:1e9)-((g=p.rank)!==null&&g!==void 0?g:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):jc(h.completion)>jc(l)&&(o[o.length-1]=h),l=h.completion}return o}class Di{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Di(this.options,Yc(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=bS(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new Di(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(ke).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:vS,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Di(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Pr{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Pr(SS,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ke),r=(i.override||t.languageDataAt("autocomplete",Gt(t)).map(cS)).map(l=>(this.active.find(h=>h.source==l)||new Fe(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!yS(r,this.active)?o=Di.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new Fe(l.source,0):l));for(let l of e.effects)l.is(Lp)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new Pr(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?wS:xS}}function yS(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SS=[];function Tp(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(Ea);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Fe{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=Tp(e,t),s=this;(i&8||i&16&&this.touches(e))&&(s=new Fe(s.source,0)),i&4&&s.state==0&&(s=new Fe(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(Qr))s=new Fe(s.source,1,r.value?Gt(e.state):-1);else if(r.is(Wn))s=new Fe(s.source,0);else if(r.is(Ep))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Fe(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Gt(e.state))}}class zi extends Fe{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Gt(e.state);if((this.explicitPos<0?l<=r:lo||!s||t&2&&Gt(e.startState)==this.from)return new Fe(this.source,t&4?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return kS(s.validFor,e.state,r,o)?new zi(this.source,a,s,r,o):s.update&&(s=s.update(s,r,o,new Zp(e.state,l,a>=0)))?new zi(this.source,a,s,s.from,(i=s.to)!==null&&i!==void 0?i:Gt(e.state)):new Fe(this.source,1,a)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new zi(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Fe(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function kS(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Rp(n,!0).test(s)}const Ep=X.define({map(n,e){return n.map(t=>t.map(e))}}),Lp=X.define(),_e=be.define({create(){return Pr.start()},update(n,e){return n.update(e)},provide:n=>[ba.from(n,e=>e.tooltip),R.contentAttributes.from(n,e=>e.attrs)]});function La(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(_e).active.find(s=>s.source==e.source);return i instanceof zi?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},hS(n.state,t,i.from,i.to)),{annotations:Ea.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const vS=gS(_e,La);function qs(n,e="option"){return t=>{let i=t.state.field(_e,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Lp.of(l)}),!0}}const QS=n=>{let e=n.state.field(_e,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(_e,!1)?(n.dispatch({effects:Qr.of(!0)}),!0):!1,PS=n=>{let e=n.state.field(_e,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Wn.of(null)}),!0)};class $S{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const CS=50,AS=1e3,ZS=fe.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(_e).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(_e),t=n.state.facet(ke);if(!n.selectionSet&&!n.docChanged&&n.startState.field(_e)==e)return;let i=n.transactions.some(r=>{let o=Tp(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rCS&&Date.now()-o.time>AS){for(let l of o.context.abortListeners)try{l()}catch(a){qe(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(Qr)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(_e);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Gt(e),i=new Zp(e,t,n.explicitPos==t,this.view),s=new $S(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Wn.of(null)}),qe(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ke).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ke);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new Fe(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:Ep.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(_e,!1);if(e&&e.tooltip&&this.view.state.facet(ke).closeOnBlur){let t=e.open&&ud(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Wn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Qr.of(!1)}),20),this.composing=0}}}),MS=typeof navigator=="object"&&/Win/.test(navigator.platform),RS=si.highest(R.domEventHandlers({keydown(n,e){let t=e.state.field(_e,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(MS&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&La(e,i),!1}})),Dp=R.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class TS{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class Da{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Se.TrackDel),i=e.mapPos(this.to,1,Se.TrackDel);return t==null||i==null?null:new Da(this.field,t,i)}}class _a{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew Da(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new TS(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new _a(i,s)}}let ES=_.widget({widget:new class extends _t{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),LS=_.mark({class:"cm-snippetField"});class un{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(i=>(i.from==i.to?ES:LS).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new un(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const hs=X.define({map(n,e){return n&&n.map(e)}}),DS=X.define(),Gn=be.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(hs))return t.value;if(t.is(DS)&&n)return new un(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>R.decorations.from(n,e=>e?e.deco:_.none)});function qa(n,e){return v.create(n.filter(t=>t.field==e).map(t=>v.range(t.from,t.to)))}function _S(n){let e=_a.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:G.of(o)},scrollIntoView:!0,annotations:i?[Ea.of(i),he.userEvent.of("input.complete")]:void 0};if(l.length&&(a.selection=qa(l,0)),l.some(h=>h.field>0)){let h=new un(l,0),c=a.effects=[hs.of(h)];t.state.field(Gn,!1)===void 0&&c.push(X.appendConfig.of([Gn,zS,BS,Dp]))}t.dispatch(t.state.update(a))}}function _p(n){return({state:e,dispatch:t})=>{let i=e.field(Gn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:qa(i.ranges,s),effects:hs.of(r?null:new un(i.ranges,s)),scrollIntoView:!0})),!0}}const qS=({state:n,dispatch:e})=>n.field(Gn,!1)?(e(n.update({effects:hs.of(null)})),!0):!1,XS=_p(1),jS=_p(-1),YS=[{key:"Tab",run:XS,shift:jS},{key:"Escape",run:qS}],Bc=E.define({combine(n){return n.length?n[0]:YS}}),zS=si.highest(ns.compute([Bc],n=>n.facet(Bc)));function Le(n,e){return Object.assign(Object.assign({},e),{apply:_S(n)})}const BS=R.domEventHandlers({mousedown(n,e){let t=e.state.field(Gn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:qa(t.ranges,s.field),effects:hs.of(t.ranges.some(r=>r.field>s.field)?new un(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),Un={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},mi=X.define({map(n,e){let t=e.mapPos(n,-1,Se.TrackAfter);return t??void 0}}),Xa=new class extends Si{};Xa.startSide=1;Xa.endSide=-1;const qp=be.define({create(){return W.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(mi)&&(n=n.update({add:[Xa.range(t.value,t.value+1)]}));return n}});function VS(){return[IS,qp]}const Eo="()[]{}<>";function Xp(n){for(let e=0;e{if((NS?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Ue(we(i,0))==1||e!=s.from||t!=s.to)return!1;let r=GS(n.state,i);return r?(n.dispatch(r),!0):!1}),FS=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=jp(n,n.selection.main.head).brackets||Un.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=US(n.doc,o.head);for(let a of i)if(a==l&&Ir(n.doc,o.head)==Xp(we(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:v.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},WS=[{key:"Backspace",run:FS}];function GS(n,e){let t=jp(n,n.selection.main.head),i=t.brackets||Un.brackets;for(let s of i){let r=Xp(we(s,0));if(e==s)return r==s?JS(n,s,i.indexOf(s+s+s)>-1,t):HS(n,s,r,t.before||Un.before);if(e==r&&Yp(n,n.selection.main.from))return KS(n,s,r)}return null}function Yp(n,e){let t=!1;return n.field(qp).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Ir(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Ue(we(t,0)))}function US(n,e){let t=n.sliceString(e-2,e);return Ue(we(t,0))==t.length?t:t.slice(1)}function HS(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:mi.of(o.to+e.length),range:v.range(o.anchor+e.length,o.head+e.length)};let l=Ir(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:mi.of(o.head+e.length),range:v.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function KS(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&Ir(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:v.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function JS(n,e,t,i){let s=i.stringPrefixes||Un.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:mi.of(l.to+e.length),range:v.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=Ir(n.doc,a),c;if(h==e){if(Vc(n,a))return{changes:{insert:e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)};if(Yp(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:v.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=Nc(n,a-2*e.length,s))>-1&&Vc(n,c))return{changes:{insert:e+e+e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=ne.Word&&Nc(n,a,s)>-1&&!ek(n,a,e,s))return{changes:{insert:e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Vc(n,e){let t=ge(n).resolveInner(e+1);return t.parent&&t.from==e}function ek(n,e,t,i){let s=ge(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function Nc(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=ne.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=ne.Word)return r}return-1}function tk(n={}){return[RS,_e,ke.of(n),ZS,ik,Dp]}const zp=[{key:"Ctrl-Space",run:zc},{mac:"Alt-`",run:zc},{key:"Escape",run:PS},{key:"ArrowDown",run:qs(!0)},{key:"ArrowUp",run:qs(!1)},{key:"PageDown",run:qs(!0,"page")},{key:"PageUp",run:qs(!1,"page")},{key:"Enter",run:QS}],ik=si.highest(ns.computeN([ke],n=>n.facet(ke).defaultKeymap?[zp]:[]));class nk{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class ui{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(Hn).markerFilter;r&&(s=r(s,i));let o=_.set(s.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?_.widget({widget:new uk(l),diagnostic:l}).range(l.from):_.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new ui(o,t,nn(o))}}function nn(n,e=null,t=0){let i=null;return n.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new nk(s,r,o.diagnostic),!1}),i}function sk(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(Hn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(Bp))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function rk(n,e){return n.field(We,!1)?e:e.concat(X.appendConfig.of(Ok))}const Bp=X.define(),ja=X.define(),Vp=X.define(),We=be.define({create(){return new ui(_.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=nn(t,n.selected.diagnostic,r)||nn(t,null,r)}!t.size&&s&&e.state.facet(Hn).autoPanel&&(s=null),n=new ui(t,s,i)}for(let t of e.effects)if(t.is(Bp)){let i=e.state.facet(Hn).autoPanel?t.value.length?Kn.open:null:n.panel;n=ui.init(t.value,i,e.state)}else t.is(ja)?n=new ui(n.diagnostics,t.value?Kn.open:null,n.selected):t.is(Vp)&&(n=new ui(n.diagnostics,n.panel,t.value));return n},provide:n=>[Vn.from(n,e=>e.panel),R.decorations.from(n,e=>e.diagnostics)]}),ok=_.mark({class:"cm-lintRange cm-lintRange-active"});function lk(n,e,t){let{diagnostics:i}=n.state.field(We),s=[],r=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(eIp(n,t,!1)))}const hk=n=>{let e=n.state.field(We,!1);(!e||!e.panel)&&n.dispatch({effects:rk(n.state,[ja.of(!0)])});let t=Bn(n,Kn.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ic=n=>{let e=n.state.field(We,!1);return!e||!e.panel?!1:(n.dispatch({effects:ja.of(!1)}),!0)},ck=n=>{let e=n.state.field(We,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},fk=[{key:"Mod-Shift-m",run:hk,preventDefault:!0},{key:"F8",run:ck}],Hn=E.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},Qt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function Np(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Ip(n,e,t){var i;let s=t?Np(e.actions):[];return ee("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ee("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let p=nn(n.state.field(We).diagnostics,e);p&&r.apply(n,p.from,p.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),ee("u",h.slice(c,c+1)),h.slice(c+1)];return ee("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&ee("div",{class:"cm-diagnosticSource"},e.source))}class uk extends _t{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ee("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Fc{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ip(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Kn{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Ic(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Np(r.actions);for(let l=0;l{for(let r=0;rIc(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(We).selected;if(!e)return-1;for(let t=0;t{let h=-1,c;for(let f=i;fi&&(this.items.splice(i,h-i),s=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.topl.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(We),i=nn(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Vp.of(i)})}static open(e){return new Kn(e)}}function dk(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Xs(n){return dk(``,'width="6" height="3"')}const pk=R.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Xs("#d11")},".cm-lintRange-warning":{backgroundImage:Xs("orange")},".cm-lintRange-info":{backgroundImage:Xs("#999")},".cm-lintRange-hint":{backgroundImage:Xs("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Ok=[We,R.decorations.compute([We],n=>{let{selected:e,panel:t}=n.field(We);return!e||!t||e.from==e.to?_.none:_.set([ok.range(e.from,e.to)])}),ty(lk,{hideOn:sk}),pk],gk=(()=>[uy(),Oy(),Rb(),Rw(),rw(),xb(),Pb(),H.allowMultipleSelections.of(!0),Ny(),_d(hw,{fallback:!0}),gw(),VS(),tk(),Vb(),Fb(),qb(),qx(),ns.of([...WS,...Rx,...nS,...Yw,...tw,...zp,...fk])])();class $r{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new $r(e,[],t,i,i,0,[],0,s?new Wc(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new $r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new mk(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Wc{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class mk{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Cr{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Cr(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Cr(this.stack,this.pos,this.index)}}function Cn(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class Hs{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Gc=new Hs;class bk{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Gc,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Gc,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class Bi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;Fp(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Bi.prototype.contextual=Bi.prototype.fallback=Bi.prototype.extend=!1;class jl{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Cn(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Fp(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}jl.prototype.contextual=Bi.prototype.fallback=Bi.prototype.extend=!1;class cs{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Fp(n,e,t,i,s,r){let o=0,l=1<0){let O=n[p];if(a.allows(O)&&(e.token.value==-1||e.token.value==O||yk(O,e.token.value,s,r))){e.acceptToken(O);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,O=h+p+(p<<1),g=n[O],m=n[O+1]||65536;if(c=m)f=p+1;else{o=n[O+2],e.advance();continue e}}break}}function Uc(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function yk(n,e,t,i){let s=Uc(t,i,e);return s<0||Uc(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class wk{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Hc(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Hc(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof ce){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class xk{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Hs)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Hs,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Hs,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new wk(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&Qk(s);if(o)return Ne&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ne&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Ne&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(I.contextHash)||0)==c))return e.useNode(f,u),Ne&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof ce)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof ce&&f.positions[0]==0)f=p;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ne&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Kc(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ne&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let p=0;f.forceReduce()&&p<10&&(Ne&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));p++)Ne&&(u=this.stackID(f)+" -> ");for(let p of l.recoverByInsert(a))Ne&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Ne&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Kc(l,i)):(!s||s.scoren;class vk{constructor(e){this.start=e.start,this.shift=e.shift||Do,this.reduce=e.reduce||Do,this.reuse=e.reuse||Do,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ar extends wd{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new ya(t.map((l,a)=>Ye.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=gd;let o=Cn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new Bi(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let s=new Sk(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=At(this.data,r+2);else break;s=t(At(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=At(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(Ar.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=Jc(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Pk=312,$k=313,ef=1,Ck=2,Ak=3,Zk=4,Mk=314,Rk=316,Tk=317,Ek=5,Lk=6,Dk=0,Yl=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Wp=125,_k=59,zl=47,qk=42,Xk=43,jk=45,Yk=60,zk=44,Bk=63,Vk=46,Nk=91,Ik=new vk({start:!1,shift(n,e){return e==Ek||e==Lk||e==Rk?n:e==Tk},strict:!1}),Fk=new cs((n,e)=>{let{next:t}=n;(t==Wp||t==-1||e.context)&&n.acceptToken(Mk)},{contextual:!0,fallback:!0}),Wk=new cs((n,e)=>{let{next:t}=n,i;Yl.indexOf(t)>-1||t==zl&&((i=n.peek(1))==zl||i==qk)||t!=Wp&&t!=_k&&t!=-1&&!e.context&&n.acceptToken(Pk)},{contextual:!0}),Gk=new cs((n,e)=>{n.next==Nk&&!e.context&&n.acceptToken($k)},{contextual:!0}),Uk=new cs((n,e)=>{let{next:t}=n;if(t==Xk||t==jk){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(ef);n.acceptToken(i?ef:Ck)}}else t==Bk&&n.peek(1)==Vk&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(Ak))},{contextual:!0});function _o(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const Hk=new cs((n,e)=>{if(n.next!=Yk||!e.dialectEnabled(Dk)||(n.advance(),n.next==zl))return;let t=0;for(;Yl.indexOf(n.next)>-1;)n.advance(),t++;if(_o(n.next,!0)){for(n.advance(),t++;_o(n.next,!1);)n.advance(),t++;for(;Yl.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zk)return;for(let i=0;;i++){if(i==7){if(!_o(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Zk,-t)}),Kk=xd({"get set async static":d.modifier,"for while do if else switch try catch finally return throw break continue default case":d.controlKeyword,"in of await yield void typeof delete instanceof":d.operatorKeyword,"let var const using function class extends":d.definitionKeyword,"import export from":d.moduleKeyword,"with debugger as new":d.keyword,TemplateString:d.special(d.string),super:d.atom,BooleanLiteral:d.bool,this:d.self,null:d.null,Star:d.modifier,VariableName:d.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":d.function(d.variableName),VariableDefinition:d.definition(d.variableName),Label:d.labelName,PropertyName:d.propertyName,PrivatePropertyName:d.special(d.propertyName),"CallExpression/MemberExpression/PropertyName":d.function(d.propertyName),"FunctionDeclaration/VariableDefinition":d.function(d.definition(d.variableName)),"ClassDeclaration/VariableDefinition":d.definition(d.className),PropertyDefinition:d.definition(d.propertyName),PrivatePropertyDefinition:d.definition(d.special(d.propertyName)),UpdateOp:d.updateOperator,"LineComment Hashbang":d.lineComment,BlockComment:d.blockComment,Number:d.number,String:d.string,Escape:d.escape,ArithOp:d.arithmeticOperator,LogicOp:d.logicOperator,BitOp:d.bitwiseOperator,CompareOp:d.compareOperator,RegExp:d.regexp,Equals:d.definitionOperator,Arrow:d.function(d.punctuation),": Spread":d.punctuation,"( )":d.paren,"[ ]":d.squareBracket,"{ }":d.brace,"InterpolationStart InterpolationEnd":d.special(d.brace),".":d.derefOperator,", ;":d.separator,"@":d.meta,TypeName:d.typeName,TypeDefinition:d.definition(d.typeName),"type enum interface implements namespace module declare":d.definitionKeyword,"abstract global Privacy readonly override":d.modifier,"is keyof unique infer":d.operatorKeyword,JSXAttributeValue:d.attributeValue,JSXText:d.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":d.angleBracket,"JSXIdentifier JSXNameSpacedName":d.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":d.attributeName,"JSXBuiltin/JSXIdentifier":d.standard(d.tagName)}),Jk={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},ev={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},tv={__proto__:null,"<":187},iv=Ar.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Ik,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Kk],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Wk,Gk,Uk,Hk,2,3,4,5,6,7,8,9,10,11,12,13,14,Fk,new jl("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new jl("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>Jk[n]||-1},{term:339,get:n=>ev[n]||-1},{term:92,get:n=>tv[n]||-1}],tokenPrec:15004}),Gp=[Le("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Le("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Le("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Le("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Le("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Le(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Le("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Le(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Le(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Le('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Le('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],nv=Gp.concat([Le("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Le("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Le("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),tf=new Sy,Up=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Sn(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const sv=["FunctionDeclaration"],rv={FunctionDeclaration:Sn("function"),ClassDeclaration:Sn("class"),ClassExpression:()=>!0,EnumDeclaration:Sn("constant"),TypeAliasDeclaration:Sn("type"),NamespaceDeclaration:Sn("namespace"),VariableDefinition(n,e){n.matchContext(sv)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Hp(n,e){let t=tf.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(Oe.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=rv[o.name];if(l&&l(o,r)||Up.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of Hp(n,o.node))i.push(l);return!1}}),tf.set(e,i),i}const nf=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Kp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function ov(n){let e=ge(n.state).resolveInner(n.pos,-1);if(Kp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&nf.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)Up.has(s.name)&&(i=i.concat(Hp(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:nf}}const xi=dr.define({name:"javascript",parser:iv.configure({props:[Pd.add({IfStatement:Po({except:/^\s*({|else\b)/}),TryStatement:Po({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:By,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:zy({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Po({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Ad.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Fy,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Jp={test:n=>/^JSX/.test(n.name),facet:vd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},lv=xi.configure({dialect:"ts"},"typescript"),av=xi.configure({dialect:"jsx",props:[ka.add(n=>n.isTop?[Jp]:void 0)]}),hv=xi.configure({dialect:"jsx ts",props:[ka.add(n=>n.isTop?[Jp]:void 0)]},"typescript");let eO=n=>({label:n,type:"keyword"});const tO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(eO),cv=tO.concat(["declare","implements","private","protected","public"].map(eO));function fv(n={}){let e=n.jsx?n.typescript?hv:av:n.typescript?lv:xi,t=n.typescript?nv.concat(cv):Gp.concat(tO);return new Ey(e,[xi.data.of({autocomplete:aS(Kp,Mp(t))}),xi.data.of({autocomplete:ov}),n.jsx?pv:[]])}function uv(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function sf(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const dv=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),pv=R.inputHandler.of((n,e,t,i,s)=>{if((dv?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!xi.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=ge(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let p=f.parent,O=p.parent;if(O&&p.from==c-2&&((u=sf(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let g=`${u}>`;return{range:v.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(i==">"){let p=uv(f);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=sf(o.doc,p,c)))return{range:a,changes:{from:c,insert:``}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Ae=({variant:n,settings:e,styles:t})=>{const i=R.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),s=os.define(t);return[i,_d(s)]};Ae({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:d.comment,color:"#404080"},{tag:[d.string,d.regexp],color:"#999999"},{tag:d.number,color:"#7090B0"},{tag:[d.bool,d.null],color:"#8080A0"},{tag:[d.punctuation,d.derefOperator],color:"#805080"},{tag:d.keyword,color:"#60B0FF"},{tag:d.definitionKeyword,color:"#B0FFF0"},{tag:d.moduleKeyword,color:"#60B0FF"},{tag:d.operator,color:"#A0A0FF"},{tag:[d.variableName,d.self],color:"#008080"},{tag:d.operatorKeyword,color:"#A0A0FF"},{tag:d.controlKeyword,color:"#80A0FF"},{tag:d.className,color:"#70E080"},{tag:[d.function(d.propertyName),d.propertyName],color:"#50A0A0"},{tag:d.tagName,color:"#009090"},{tag:d.modifier,color:"#B0FFF0"},{tag:[d.squareBracket,d.attributeName],color:"#D0D0FF"}]});Ae({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:d.comment,color:"#787b8099"},{tag:d.string,color:"#86b300"},{tag:d.regexp,color:"#4cbf99"},{tag:[d.number,d.bool,d.null],color:"#ffaa33"},{tag:d.variableName,color:"#5c6166"},{tag:[d.definitionKeyword,d.modifier],color:"#fa8d3e"},{tag:[d.keyword,d.special(d.brace)],color:"#fa8d3e"},{tag:d.operator,color:"#ed9366"},{tag:d.separator,color:"#5c6166b3"},{tag:d.punctuation,color:"#5c6166"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#f2ae49"},{tag:[d.className,d.definition(d.typeName)],color:"#22a4e6"},{tag:[d.tagName,d.typeName,d.self,d.labelName],color:"#55b4d4"},{tag:d.angleBracket,color:"#55b4d480"},{tag:d.attributeName,color:"#f2ae49"}]});Ae({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:d.comment,color:"#6E6E6E"},{tag:[d.string,d.regexp,d.special(d.brace)],color:"#5C81B3"},{tag:d.number,color:"#C1E1B8"},{tag:d.bool,color:"#53667D"},{tag:[d.definitionKeyword,d.modifier,d.function(d.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[d.keyword,d.moduleKeyword,d.operatorKeyword,d.operator],color:"#697A8E",fontWeight:"bold"},{tag:[d.variableName,d.attributeName],color:"#708E67"},{tag:[d.function(d.variableName),d.definition(d.propertyName),d.derefOperator],color:"#fff"},{tag:d.tagName,color:"#A3D295"}]});Ae({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:d.comment,color:"#666666"},{tag:[d.string,d.special(d.brace)],color:"#54BE0D"},{tag:d.regexp,color:"#E9C062"},{tag:d.number,color:"#CF6A4C"},{tag:[d.keyword,d.operator],color:"#5EA6EA"},{tag:d.variableName,color:"#7587A6"},{tag:[d.definitionKeyword,d.modifier],color:"#F9EE98"},{tag:[d.propertyName,d.function(d.variableName)],color:"#937121"},{tag:[d.typeName,d.angleBracket,d.tagName],color:"#9B859D"}]});Ae({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:d.comment,color:"#6B4E32"},{tag:[d.keyword,d.operator,d.derefOperator],color:"#EF5D32"},{tag:d.className,color:"#EFAC32",fontWeight:"bold"},{tag:[d.typeName,d.propertyName,d.function(d.variableName),d.definition(d.variableName)],color:"#EFAC32"},{tag:d.definition(d.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:d.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[d.number,d.bool],color:"#6C99BB"},{tag:[d.variableName,d.self],color:"#7DAF9C"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#D9D762"},{tag:[d.angleBracket,d.tagName,d.attributeName],color:"#EFCB43"}]});Ae({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:d.comment,color:"#404040"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#00D8FF"},{tag:d.number,color:"#E62286"},{tag:[d.variableName,d.attributeName,d.self],color:"#E62286",fontWeight:"bold"},{tag:d.function(d.variableName),color:"#fff",fontWeight:"bold"}]});Ae({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:d.comment,color:"#BCC8BA"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#5D90CD"},{tag:[d.number,d.bool,d.null],color:"#46A609"},{tag:d.keyword,color:"#AF956F"},{tag:[d.definitionKeyword,d.modifier],color:"#C52727"},{tag:[d.angleBracket,d.tagName,d.attributeName],color:"#606060"},{tag:d.self,color:"#000"}]});Ae({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:d.comment,color:"#0088FF"},{tag:d.string,color:"#3AD900"},{tag:d.regexp,color:"#80FFC2"},{tag:[d.number,d.bool,d.null],color:"#FF628C"},{tag:[d.definitionKeyword,d.modifier],color:"#FFEE80"},{tag:d.variableName,color:"#CCCCCC"},{tag:d.self,color:"#FF80E1"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.definition(d.typeName),d.labelName],color:"#FFDD00"},{tag:[d.keyword,d.operator],color:"#FF9D00"},{tag:[d.propertyName,d.typeName],color:"#80FFBB"},{tag:d.special(d.brace),color:"#EDEF7D"},{tag:d.attributeName,color:"#9EFFFF"},{tag:d.derefOperator,color:"#fff"}]});Ae({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:d.comment,color:"#AEAEAE"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#8DFF8E"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.function(d.definition(d.variableName)),d.definition(d.typeName)],color:"#A3EBFF"},{tag:[d.number,d.bool,d.null],color:"#62E9BD"},{tag:[d.keyword,d.operator],color:"#2BF1DC"},{tag:[d.definitionKeyword,d.modifier],color:"#F8FBB1"},{tag:[d.variableName,d.self],color:"#B683CA"},{tag:[d.angleBracket,d.tagName,d.typeName,d.propertyName],color:"#60A4F1"},{tag:d.derefOperator,color:"#E0E0E0"},{tag:d.attributeName,color:"#7BACCA"}]});const Ov=Ae({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:d.comment,color:"#6272a4"},{tag:[d.string,d.special(d.brace)],color:"#f1fa8c"},{tag:[d.number,d.self,d.bool,d.null],color:"#bd93f9"},{tag:[d.keyword,d.operator],color:"#ff79c6"},{tag:[d.definitionKeyword,d.typeName],color:"#8be9fd"},{tag:d.definition(d.typeName),color:"#f8f8f2"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.attributeName],color:"#50fa7b"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:d.comment,color:"#AAAAAA"},{tag:[d.keyword,d.operator,d.typeName,d.tagName,d.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[d.attributeName,d.definition(d.propertyName)],color:"#4F9FD0"},{tag:[d.className,d.string,d.special(d.brace)],color:"#CF4F5F"},{tag:d.number,color:"#CF4F5F",fontWeight:"bold"},{tag:d.variableName,fontWeight:"bold"}]});Ae({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:d.comment,color:"#9995b7"},{tag:d.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[d.definitionKeyword,d.modifier],color:"#ff5792"},{tag:[d.className,d.tagName,d.definition(d.typeName)],color:"#0094f0"},{tag:[d.number,d.bool,d.null,d.special(d.brace)],color:"#5842ff"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#0095a8"},{tag:d.typeName,color:"#b3694d"},{tag:[d.propertyName,d.variableName],color:"#fa8900"},{tag:d.operator,color:"#ff5792"},{tag:d.self,color:"#e64100"},{tag:[d.string,d.regexp],color:"#00b368"},{tag:[d.paren,d.bracket],color:"#0431fa"},{tag:d.labelName,color:"#00bdd6"},{tag:d.attributeName,color:"#e64100"},{tag:d.angleBracket,color:"#9995b7"}]});Ae({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:d.comment,color:"#9893a5"},{tag:[d.bool,d.null],color:"#286983"},{tag:d.number,color:"#d7827e"},{tag:d.className,color:"#d7827e"},{tag:[d.angleBracket,d.tagName,d.typeName],color:"#56949f"},{tag:d.attributeName,color:"#907aa9"},{tag:d.punctuation,color:"#797593"},{tag:[d.keyword,d.modifier],color:"#286983"},{tag:[d.string,d.regexp],color:"#ea9d34"},{tag:d.variableName,color:"#d7827e"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:d.comment,color:"#CFCFCF"},{tag:[d.number,d.bool,d.null],color:"#E66C29"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.labelName,d.definition(d.typeName)],color:"#2EB43B"},{tag:d.keyword,color:"#D8B229"},{tag:d.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[d.definitionKeyword,d.modifier],color:"#925A47"},{tag:d.string,color:"#704D3D"},{tag:d.typeName,color:"#2F8996"},{tag:[d.variableName,d.propertyName],color:"#77ACB0"},{tag:d.self,color:"#77ACB0",fontWeight:"bold"},{tag:d.regexp,color:"#E3965E"},{tag:[d.tagName,d.angleBracket],color:"#BAA827"},{tag:d.attributeName,color:"#B06520"},{tag:d.derefOperator,color:"#000"}]});Ae({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:d.comment,color:"#93A1A1"},{tag:d.string,color:"#2AA198"},{tag:d.regexp,color:"#D30102"},{tag:d.number,color:"#D33682"},{tag:d.variableName,color:"#268BD2"},{tag:[d.keyword,d.operator,d.punctuation],color:"#859900"},{tag:[d.definitionKeyword,d.modifier],color:"#073642",fontWeight:"bold"},{tag:[d.className,d.self,d.definition(d.propertyName)],color:"#268BD2"},{tag:d.function(d.variableName),color:"#268BD2"},{tag:[d.bool,d.null],color:"#B58900"},{tag:d.tagName,color:"#268BD2",fontWeight:"bold"},{tag:d.angleBracket,color:"#93A1A1"},{tag:d.attributeName,color:"#93A1A1"},{tag:d.typeName,color:"#859900"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:d.comment,color:"#8E908C"},{tag:[d.variableName,d.self,d.propertyName,d.attributeName,d.regexp],color:"#C82829"},{tag:[d.number,d.bool,d.null],color:"#F5871F"},{tag:[d.className,d.typeName,d.definition(d.typeName)],color:"#C99E00"},{tag:[d.string,d.special(d.brace)],color:"#718C00"},{tag:d.operator,color:"#3E999F"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#4271AE"},{tag:d.keyword,color:"#8959A8"},{tag:d.derefOperator,color:"#4D4D4C"}]});class rf extends vt{beforeRender(e){this.state={content:F(z)(e.content,"")}}template(e){return D("section",{class:["editor",e.class]},D("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new R({doc:this.state.content.get(),extensions:[gk,ns.of([Tx]),fv(),Ov,R.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Vi;class gv extends vt{constructor(){super(...arguments);us(this,Vi,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:F(z)(t.width),height:F(z)(t.height)}}template(t){return D("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(ct(this,Vi)),this.state.height.subscribe(ct(this,Vi)),ct(this,Vi).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Vi=new WeakMap;class mv extends vt{constructor(){super(...arguments);qt(this,"state",{zoomed:z(!0)})}template(t){return D("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},D(gv,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const js="workshop-data-light@0.0.0__";function ai(n,e,{encode:t=JSON.stringify,decode:i=s=>{try{return JSON.parse(s)}catch{return s}}}={}){const s=localStorage.getItem(js+e),r=z(s?i(s):n);return s===null&&localStorage.setItem(js+e,t(r.current)),r.persist=o=>localStorage.setItem(js+e,t(o)),r.subscribe(r.persist),r.clear=()=>localStorage.removeItem(js+e),r}class bv extends vt{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var i,s,r,o;return D(hf,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ot)(null,this)},D("div",{class:"confirm-modal__content"},e.children),D(Ys,{class:"confirm-modal__toolbar"},D(Zt,{icon:((i=e.cancel)==null?void 0:i.icon)??GO,label:((s=e.cancel)==null?void 0:s.label)??"annuler","event-click":this.handleCancel}),D(Zt,{active:!0,icon:((r=e.confirm)==null?void 0:r.icon)??JO,label:((o=e.confirm)==null?void 0:o.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ot)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ot)(!1,this),this.destroy()}}const yv=async(n,e={})=>{if(await new Promise(i=>{Bl(D(bv,{"event-close":i,"event-input":i,...e},typeof e.message=="string"?D("div",{innerHTML:e.message}):e.message))}))return n()};var bi,Jn;class wv extends vt{constructor(){super(...arguments);qt(this,"state",{running:z(!1),frameCount:z(0),dataMode:z(!1)});qt(this,"store",{code:ai(Ha.toString(),"code"),data:ai("{}","data"),title:ai("Sans titre","title"),author:ai("Inconnu","author"),description:ai("","description"),frames:ai(300,"frames"),frameRate:ai(30,"frameRate"),ledCount:z(+"300")});qt(this,"tick",Ot);qt(this,"context",new g0);qt(this,"__module",Ot);us(this,bi,async()=>{const t=this.store.code.get();this.stop();try{this._module=await SO(()=>import("data:text/javascript,"+t),[]),this.tick=vO(this.context.frameRate,i=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(i),this.context.frameCount++,this.refs.scene.update(this.context)}catch(s){ct(this,Jn).call(this,s)}}),console.clear(),(this._module.setup??Ot)(),this.start()}catch(i){ct(this,Jn).call(this,i)}});us(this,Jn,t=>{this.stop(),console.clear(),console.error(t)})}template(){return D("main",{class:["app",{"is-running":this.state.running,"is-data-mode":this.state.dataMode}]},D("header",{class:"app__header"},D("h1",{class:"app__title"},D("span",{class:"app__logo",innerHTML:ng}),D("span",null,document.title)),D("a",{innerHTML:eg,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),D(rf,{class:"editor__code",ref:this.ref("editor"),content:this.store.code}),D(rf,{class:"editor__data",ref:this.ref("data"),content:this.store.data}),D(mv,{ref:this.ref("scene"),running:this.state.running}),D("footer",{class:"app__footer"},D(Ys,null,D(Zt,{icon:Hr(this.state.dataMode,t=>t?ig:tg),label:Hr(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),D(Zt,{icon:UO,title:"Commencer un nouveau programme","event-click":t=>yv(()=>{this.refs.data.clear("{}"),this.refs.editor.clear(Ha.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),D(Ys,null,D(Ys,{compact:!0},D(Zt,{icon:Hr(this.state.running,t=>t?KO:HO),"event-click":t=>{this.state.running.get()?this.stop():this.start()}}),D(pn,{class:"readonly",type:"number",value:this.state.frameCount}),D(pn,{type:"number",label:"/",titles:"frames",value:this.store.frames}),D("hr",null),D(pn,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),D(Zt,{icon:Ua,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["data","ledCount","frames","frameRate"]){const i=this.createContextPropHandler(t);this.store[t].subscribe(i),i(this.store[t].get())}this.store.frames.subscribe(ct(this,bi)),this.store.frameRate.subscribe(ct(this,bi)),this.store.code.subscribe(ct(this,bi)),ct(this,bi).call(this,this.store.code.get())}createContextPropHandler(t){return i=>{this.context[t]=i,this.context.reset()}}start(){this.context.reset(),Fa.add(this.tick),this.state.running.set(!0)}stop(){Fa.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(D(hf,{title:"Exporter l’animation",class:"app__export",ref:i=>{t=i}},D("fieldset",null,D(pn,{type:"text",label:"titre",value:this.store.title}),D(pn,{type:"text",label:"auteur·ice",value:this.store.author}),D("textarea",{value:this.store.description,"event-input":i=>this.store.description.set(i.target.value),rows:"4",placeholder:"description"})),D("footer",null,D(Zt,{icon:Ua,label:"exporter","event-click":async()=>{await x0({context:this.context,setup:this._module.setup??Ot,draw:this._module.draw??this._module.default??Ot,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${qo(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}bi=new WeakMap,Jn=new WeakMap;Bl(D(wv,null)); diff --git a/assets/index-aa850578.js b/assets/index-aa850578.js new file mode 100644 index 0000000..dee055c --- /dev/null +++ b/assets/index-aa850578.js @@ -0,0 +1,230 @@ +var n9=Object.defineProperty;var s9=(n,e,t)=>e in n?n9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(s9(n,typeof e!="symbol"?e+"":e,t),t),Eb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Eb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Eb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Eb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function i9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let wb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),kb=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}wb=t??"",e||(r[n]=wb),(e||a9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,wb)}};function o9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};Cb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{kb(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&kb(e,i)(t,n)}}function l9(n){return Array.isArray(n)?n:[n]}function pl(n,e){if(Array.isArray(n))return u9(n,e);if(n instanceof window.Element)return p9(n);if(n===null||typeof n!="object"||!n.vnode)return c9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return f9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return h9(n,t,e);if(n.isComponent)return AD(n,t,e)}function u9(n,e){n=l9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=O9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":x9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},E9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(E9);function C9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var dc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Qo=!1,wx=!1,kx,fi;function Bu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Qo?null:dc.requestAnimationFrame(Bu),Qo&&(Qo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function w9(n,e){Ax(qa,n,e)&&mc()}function k9(n,e){Ax(ja,n,e)&&mc()}function A9(n,e){Ax(Ki,n,e)&&WI()}function P9(n){Px(qa,n)&&mc()}function T9(n,e){Px(ja,n)&&mc()}function D9(n){Px(Ki,n)&&Tx()}function WI(n){Qo=!1,!xi&&(n=!!n,Ji=null,n?Bu():xi=dc.requestAnimationFrame(Bu))}function I9(){xi||(Qo=!0,Ji=null,xi=dc.requestAnimationFrame(Bu))}function Tx(){xi&&(dc.cancelAnimationFrame(xi),xi=null)}function R9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:A9,addAfter:k9,addBefore:w9,remove:D9,removeAfter:T9,removeBefore:P9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:I9,dispose:R9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Ab(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Ab(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Ab(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Ab(this,e),e=e.next}},F9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends F9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Pb(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},_9="ui-backdrop-1l3kn107",B9={backdrop:_9,"loader-spin":"ui-loader-spin-1l3kn1"};class L9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[B9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const N9="ui-button-1urez107",M9="ui-button__label-1urez161",$9="ui-button__icon-1urez171",Tb={button:N9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:M9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:$9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const j9="ui-input-ada4i107",q9="ui-input__icon-ada4i150",ko={input:j9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const Q9="ui-modal-1ng3s107",V9="ui-modal__header-1ng3s119",U9="ui-modal__title-1ng3s125",W9="ui-modal__content-1ng3s129",Po={modal:Q9,modal__header:V9,modal__title:U9,modal__content:W9,"loader-spin":"ui-loader-spin-1ng3s1"},G9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(L9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:G9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const z9="ui-toolbar-1r0eh107",Z9={toolbar:z9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Eu extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[Z9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const X9=` + + +`,Y9=` + + + +`,H9=` + + + +`,K9=` + + + +`,J9=` + + +`,e4=` + + + + + + +`,FD=` + + + + +`,t4=` + + + + +`,r4=` + + + + +`,_D=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,n4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nh4(d4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},JI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])JI[`[object ${n}]`]=n.toLowerCase();function dr(n){return JI[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:gc,min:eR,max:tR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=gc*2,Db=gc/3,m4=gc/180,g4=180/gc;function rR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const y4="3.1.2",hr=(...n)=>new Ct(...n);hr.version=y4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},b4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,v4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,nR=n=>{if(n.match(b4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(v4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Yl}=Math,sR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Yl(e),t=Yl(t),r=Yl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Yl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=sR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return nR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},x4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=x4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Zo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=O4(e,t,r),[C,A,_]=iR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},O4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},iR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=aR(e,t,r),[A,_,B]=S4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function S4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const aR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const E4=(...n)=>new Ct(...n,"lab");Object.assign(hr,{lab:E4,getLabWhitePoint:Zo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:C4}=Math,w4=1e-7,k4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=k4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return A4(...this._rgb.slice(0,3))};const A4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:C4((n+.055)/1.055,2.4)),bn={},Va=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Va(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:P4,cos:T4}=Math,oR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*m4,[e,T4(r)*t,P4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=oR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},D4=(...n)=>{const e=rR(ur(n,"hcl"));return Fx(...e)},{sqrt:I4,atan2:R4,round:F4}=Math,lR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=I4(t*t+r*r);let l=(R4(r,t)*g4+360)%360;return F4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return rR(_x(this._rgb))};const _4=(...n)=>new Ct(...n,"lch"),B4=(...n)=>new Ct(...n,"hcl");Object.assign(hr,{lch:_4,hcl:B4});lr.format.lch=Fx;lr.format.hcl=D4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Va(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Va(this,"black",n,...e)};const L4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=L4;const{sqrt:_b,pow:Oa}=Math,N4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=N4;const M4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=M4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},uR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=uR;bn.hcl=uR;const $4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},j4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return j4(this._rgb)};const q4=(...n)=>new Ct(...n,"num");Object.assign(hr,{num:q4});lr.format.num=$4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const Q4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=Q4;const{floor:V4}=Math,U4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=V4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},W4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=eR(e,t,r),l=tR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return W4(this._rgb)};const G4=(...n)=>new Ct(...n,"hcg");hr.hcg=G4;lr.format.hcg=U4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=z4;const{cos:Sa}=Math,Z4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:X4,sqrt:Y4,acos:H4}=Math,K4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=X4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=Y4((e-t)*(e-t)+(e-r)*(t-r)),i=H4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return K4(this._rgb)};const J4=(...n)=>new Ct(...n,"hsi");hr.hsi=J4;lr.format.hsi=Z4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const eQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=eQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},cR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=eR(e,t,r),l=tR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return cR(this._rgb)};const tQ=(...n)=>new Ct(...n,"hsl");hr.hsl=tQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const rQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=rQ;const{floor:nQ}=Math,sQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=nQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:iQ,max:aQ}=Math,oQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=iQ(e,t,r),l=aQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return oQ(this._rgb)};const lQ=(...n)=>new Ct(...n,"hsv");hr.hsv=lQ;lr.format.hsv=sQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const uQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=uQ;function Lu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=cQ([e,t,r]),[A,_,B]=iR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function cQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Lu(t,n);return Lu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=aR(e,t,r);return[...fQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Lu(e,n);return Lu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const pQ=(...n)=>new Ct(...n,"oklab");Object.assign(hr,{oklab:pQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const hQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=hQ;const dQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=dQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:mQ}=Math,gQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return yQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},yQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:bQ}=Math;function Nu(n){let e="rgb",t=hr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&hr.brewer&&hr.brewer[Ye.toLowerCase()]&&(Ye=hr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=bQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=hr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=hr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=hr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Ur=20;for(;Math.abs(er)>.01&&Ur-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=vQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return hr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=hr(Ye),ot):t},ot}function vQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const xQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=xQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},SQ=n=>{const e=OQ(n);return e.scale=()=>Nu(e),e},{round:fR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(fR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:fR(e):e)};const EQ=(...n)=>new Ct(...n,"rgb");Object.assign(hr,{rgb:EQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=hr(t).rgb(),i=hr(e).rgb();return hr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},CQ=n=>n,wQ=(n,e)=>n*e/255,kQ=(n,e)=>n>e?e:n,AQ=(n,e)=>n>e?n:e,PQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),TQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),DQ=(n,e)=>255*(1-(1-e/255)/(n/255)),IQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(CQ));ms.multiply=Di(Ii(wQ));ms.screen=Di(Ii(PQ));ms.overlay=Di(Ii(TQ));ms.darken=Di(Ii(kQ));ms.lighten=Di(Ii(AQ));ms.dodge=Di(Ii(IQ));ms.burn=Di(Ii(DQ));const{pow:RQ,sin:FQ,cos:_Q}=Math;function BQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=RQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=_Q(_),me=FQ(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return hr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>hr.scale(C),C.hue(t),C}const LQ="0123456789abcdef",{floor:NQ,random:MQ}=Math,$Q=()=>{let n="#";for(let e=0;e<6;e++)n+=LQ.charAt(NQ(MQ()*16));return new Ct(n,"hex")},{log:ND,pow:jQ,floor:qQ,abs:QQ}=Math;function pR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>hR(t,r,i),t}function hR(n,e="equal",t=7){dr(n)=="array"&&(n=pR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const VQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,UQ=5e-4,WQ=.1,$D=1.14,Hl=.022,jD=1.414,GQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Va(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Hl?t:t+Math.pow(Hl-t,jD),l=r>=Hl?r:r+Math.pow(Hl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:zQ,max:ZQ,atan2:QD,abs:VD,cos:Kl,sin:UD,exp:XQ,PI:WD}=Math;function YQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=VD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Kl(h(Nt-30))+.24*Kl(h(2*Nt))+.32*Kl(h(3*Nt+6))-.2*Kl(h(4*Nt-63));let Yt=_t-It;Yt=VD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*UD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Ur=1+.045*ot,On=1+.015*ot*At,qr=30*XQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*UD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Ur),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Ur))*(Yt/(i*On)));return ZQ(0,zQ(100,hn))}function HQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const KQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},JQ={cool(){return Nu([hr.hsl(180,1,.9),hr.hsl(250,.7,.4)])},hot(){return Nu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},dR=Object.keys(vv),GD=new Map(dR.map(n=>[n.toLowerCase(),n])),eV=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(dR)}}):vv,tV=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,rV=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return rV(this._rgb)};const nV=(...n)=>new Ct(...n,"cmyk");Object.assign(hr,{cmyk:nV});lr.format.cmyk=tV;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const sV=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},iV=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},aV=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},oV=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},mR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},lV=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,uV=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return sV(cR(e),t);if(t.substr(0,3)==="lab"){const r=Zo();Ks("d50");const i=iV(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Zo();Ks("d50");const i=aV(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?oV(Lx(e)):t.substr(0,5)==="oklch"?lV(mR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},gR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=oR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Mu=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,yc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,yR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),bR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),vR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),xR=new RegExp("^hsla?\\("+rs+[yc,Mu,Mu].join(eo)+to+"\\)$"),OR=new RegExp("^hsl?\\("+rs+[yc,Mu,Mu].join(Nx)+rs+"\\)$"),SR=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ER=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),CR=new RegExp("^lch\\("+rs+[ds,ds,yc].join(eo)+to+"\\)$"),wR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),kR=new RegExp("^oklch\\("+rs+[ds,ds,yc].join(eo)+to+"\\)$"),{round:AR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(AR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(yR))||(e=n.match(bR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(vR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(xR))||(e=n.match(OR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(SR)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=AR(r[i]);return r[3]=+e[4],r}if(e=n.match(ER)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Zo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Zo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(gR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>yR.test(n)||xR.test(n)||ER.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||bR.test(n)||vR.test(n)||OR.test(n)||SR.test(n)||n==="transparent";Ct.prototype.css=function(n){return uV(this._rgb,n)};const cV=(...n)=>new Ct(...n,"css");hr.css=cV;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const fV=(...n)=>new Ct(...n,"gl");hr.gl=fV;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return sR(this._rgb,n)};const pV=(...n)=>new Ct(...n,"hex");hr.hex=pV;lr.format.hex=nR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:Jl}=Math,PR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*Jl(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*Jl(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*Jl(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*Jl(r),i=255),[t,r,i,1]},{round:hV}=Math,dV=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=PR(C);A[2]/A[0]>=r/t?l=C:i=C}return hV(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return dV(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(hr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=PR;Ct.prototype.oklch=function(){return mR(this._rgb)};const mV=(...n)=>new Ct(...n,"oklch");Object.assign(hr,{oklch:mV});lr.format.oklch=gR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(hr,{analyze:pR,average:gQ,bezier:SQ,blend:ms,brewer:eV,Color:Ct,colors:Qa,contrast:VQ,contrastAPCA:GQ,cubehelix:BQ,deltaE:YQ,distance:HQ,input:lr,interpolate:Va,limits:hR,mix:Va,random:$Q,scale:Nu,scales:JQ,valid:KQ});class gV{constructor(){or(this,"PROPERTIES",{...p4,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:hr,rgb:(e=0,t=e,r=t=e)=>hr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>hr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{for(let i=Math.round(e);i{this.line(0,this.ledCount,e)},gradient:(e,t,r,i)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))yV(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let r=0;r"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(bV);const vV=xv;var ea={},xV={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ua(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ua(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new TR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new DR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=EV(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new CV(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=Cu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Ua(this,e,t);let i=Cu(this.text,Cu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Ua(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function EV(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Cu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class TR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class DR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=TR.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=function(){return this});class CV{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ua(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?IR:kV)(n,e,r)}function IR(n,e,t){if(e==n.length)return e;e&&RR(n.charCodeAt(e))&&FR(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function kV(n,e,t){for(;e>0;){let r=IR(n,e-2,t);if(r=56320&&n<57344}function FR(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!FR(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return RR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Xo(n),C=new Xo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Xo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function BR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new wu([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new wu(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new wu(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class wu{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=ju(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new LR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class LR{constructor(e,t){this.inner=e,this.prec=t}}class bc{of(e){return new wv(this,e)}reconfigure(e){return bc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class $u{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of PV(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>AV($e,me,ie))}}let q=_.map(Y=>Y(C));return new $u(e,h,q,C,A,l)}}function PV(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof LR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof wu)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Uo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function ju(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const NR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),MR=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),$R=$t.define(),jR=$t.define(),qR=$t.define(),QR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new TV}}class TV{of(e){return new ri(this,e)}}class DV{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new DV(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&BR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function IV(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=UR(e,Ia(l),!1)}return n}function FV(n){let e=n.startState,t=e.facet(qR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const _V=[];function Ia(n){return n==null?_V:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const BV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function LV(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||BV.test(t)))return!0}return!1}function NV(n){return e=>{if(!/\S/.test(e))return Br.Space;if(LV(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=$u.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=$u.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return BR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(QR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(NR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return NV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=MR;Sr.readOnly=QR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=NR;Sr.changeFilter=$R;Sr.transactionFilter=jR;Sr.transactionExtender=qR;bc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class WR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new WR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new GR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Yo.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yo.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?MV(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function MV(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new GR(h,t,r,l));return i.length==1?i[0]:new Yo(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yo.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){eu(this.active,e),eu(this.activeTo,e),eu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;tu(this.active,t,r),tu(this.activeTo,t,i),tu(this.activeRank,t,l),e&&tu(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&eu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new $V(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class $V{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},jV=typeof navigator<"u"&&/Mac/.test(navigator.platform),qV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ho[un]=String.fromCharCode(un);for(var qb in ki)Ho.hasOwnProperty(qb)||(Ho[qb]=ki[qb]);function QV(n){var e=jV&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||qV&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ho:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ko(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function ku(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function Jo(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wo(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function vc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function VV(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function zR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function UV(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=VV(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=zR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class GV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function ZR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function HR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!qu(t))r=oa(t),t=t.parentNode;else return null}}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Vx){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function eF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:xc,ie_version:rF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:nF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const XV=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>XV||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return YV(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(XR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return sF(this,e)}coordsAt(e,t){return aF(this,e,t)}}function YV(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?vc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Vx;function sF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?iF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function aF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function KV(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=oF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new dl(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class hl extends Ht{constructor(e){let{start:t,end:r}=oF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof hl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Qu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}hl.prototype.point=!1;class dl extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof dl&&this.spec.class==e.spec.class&&Qu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}dl.prototype.mapMode=cn.TrackBefore;dl.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&JV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function oF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function JV(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),tF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Qu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){iF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return sF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(XR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=Jo(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=aF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Go{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ru(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(ru(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(ru(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(ru(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new Go(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function ru(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Ux=Rr.RTL;function lF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function cF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function iU(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Uv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Uv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function fF(n){return[new vi(0,n,0)]}let pF="";function oU(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),pF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),xF=$t.define({combine:n=>n.some(e=>e)}),OF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const nu=sr.define({map:(n,e)=>n.map(e)}),SF=sr.define();function Tn(n,e,t){let r=n.facet(gF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let uU=0;const Lo=$t.define();class Vr{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Vr(uU++,e,r,i,C=>{let A=[Lo.of(C)];return h&&A.push(el.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Vr.define(r=>new e(r),t)}}class Vb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const EF=$t.define(),zx=$t.define(),el=$t.define(),CF=$t.define(),Zx=$t.define(),wF=$t.define();function p2(n,e){let t=n.state.facet(wF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=lU(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const kF=$t.define();function AF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(kF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const No=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Vu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Vu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!gU(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?fU(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=dU(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=Go.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=Go.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=Go.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);eF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(SF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&ku(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&cU(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Wo(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Wo(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&mU(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Ko(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=pU(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?HR:KR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Wo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ko(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?Jo(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=Jo(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new JR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(el).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(CF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=AF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;UV(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function yU(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function vU(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Ub(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=Jo(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Ub(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=bU(e,Qe),ct=vU(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Ub(B,Qe)?B=m2(B,Qe.bottom):q&&Ub(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function TF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&xU(Qe,Je,B)||Qt.chrome&&OU(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function xU(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function OU(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function SU(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=oU(i,l,h,C,t),B=pF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function EU(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function CU(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=TF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Au(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(kU(e,r.node,r.offset)?t:0))}}function kU(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class AU{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:DU(e),A=new wU(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=IU(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=PU(n,e,t));return n.state.facet(yF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function PU(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&PF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function TU(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function DU(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function IU(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class RU{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&ZU(e.contentDOM.ownerDocument)}handleEvent(e){!jU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=FU(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&RF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=IF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||_U.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function FU(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const IF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],_U="dthko",RF=[16,17,18,20,91,92,224,225],su=6;function iu(n){return Math.max(0,n)*.7+8}function BU(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class LU{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=WV(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&NU(e,t),this.dragging=$U(e,t)&&BF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&BU(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=AF(this.view);e.clientX-A.left<=i+su?t=-iu(i-e.clientX):e.clientX+A.right>=h-su&&(t=iu(e.clientX-h)),e.clientY-A.top<=l+su?r=-iu(l-e.clientY):e.clientY+A.bottom>=C-su&&(r=iu(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function NU(n,e){let t=n.state.facet(hF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function MU(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function $U(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Ko(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function jU(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),FF=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function qU(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),_F(n,t.value)},50)}function Oc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function _F(n,e){e=Oc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(mF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=UU(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new LU(n,e,t,r)),r&&n.observer.ignore(()=>{ZR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return yU(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function QU(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:QU(n,t,e.clientX,e.clientY)}}const VU=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function BF(n){if(!VU)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function UU(n,e){let t=E2(n,e),r=BF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=WU(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function WU(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Oc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Oc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&MU(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=FF?null:e.clipboardData;return t?(_F(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(qU(n),!1)};function GU(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function zU(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Oc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=zU(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=FF?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(GU(n,t),!1)};const LF=ri.define();function NF(n,e){let t=[];for(let r of n.facet(bF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:LF.of(!0)}):null}function MF(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=NF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),MF(n)};ns.blur=n=>{n.observer.clearSelectionRange(),MF(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=IF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function ZU(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class XU{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Pu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends $F{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Un||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Un(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Pu&&(A=-2);let Y=new Un(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Pu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Pu)&&(za=!0),Uu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class HU extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Uu(this.left,e),this.right=Uu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const KU=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Un?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Un(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=KU)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let t=new Un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function r7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new XU(t),this.stateDeco=e.facet(el).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new au(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push($o(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(el).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,JU(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=zR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=YR(e.scrollDOM);let me=(this.printing?r7:t7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new YU(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new au(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||$o(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||$o(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return $o(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class au{constructor(e,t){this.from=e,this.to=t}}function s7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function lu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function i7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function $o(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>$o(i,e)):n._content)}const uu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),jF=wi.newName(),qF=wi.newName(),QF={"&light":"."+jF,"&dark":"."+qF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const a7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},QF),o7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class l7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new GV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new c7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!ku(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Wo(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ko(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&u7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=ku(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&ku(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new AU(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=DF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Wo(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function u7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class c7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:SF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ko(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||zV(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(nu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Lo).map(i=>new Vb(i));for(let i of this.plugins)i.update(this);this.observer=new l7(this),this.inputState=new RU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(LF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=NF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Vu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(nu)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Wu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(No)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(uu)!=i.state.facet(uu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!DF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(Lo).map(r=>new Vb(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Lo),r=e.state.facet(Lo);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Vb(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(YR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Vu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?qF:jF)+" "+this.state.facet(uu)}updateAttrs(){let e=N2(this,EF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(No);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(a7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>EU(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return SU(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,CU(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),TF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return vc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(vF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>f7)return fF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||cF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=aU(e.text,t,r);return this.bidiCache.push(new Wu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ZR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return nu.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return nu.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Vr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[uu.of(r),No.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(No.of(Kv("."+Hv,e,QF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=No;Mt.inputHandler=yF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=OF;Mt.focusChangeEffect=bF;Mt.perLineTextDirection=vF;Mt.exceptionSink=gF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=mF;Mt.dragMovesSelection=dF;Mt.clickAddsSelectionRange=hF;Mt.decorations=el;Mt.outerDecorations=CF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=wF;Mt.scrollMargins=kF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=EF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const f7=4096,L2={};class Wu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const p7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function h7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function m7(n,e,t){return UF(VF(n.state),e,n,t)}let gi=null;const g7=4e3;function y7(n,e=p7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>h7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},g7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function UF(n,e,t,r){Jv=e;let i=QV(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",RF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+cu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+cu(me,e,!0)])||e.shiftKey&&(_e=Ho[e.keyCode])!=i&&_e!=me&&Y(ie[C+cu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+cu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class gl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=WF(e);return[new gl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return b7(e,t,r)}}function WF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function b7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=WF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Ur.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function v7(n,e){return n.constructor==e.constructor&&n.eq(e)}class x7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Tu)!=e.state.facet(Tu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Tu);for(;t!v7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Tu=$t.define();function GF(n){return[Vr.define(e=>new x7(e,n)),Tu.of(n)]}const zF=!Qt.ios,tl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function O7(n={}){return[tl.of(n),S7,E7,C7,xF.of(!0)]}function ZF(n){return n.startState.facet(tl)!=n.state.facet(tl)}const S7=GF({above:!0,markers(n){let{state:e}=n,t=e.facet(tl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||zF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of gl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ZF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(tl).cursorBlinkRate+"ms"}const E7=GF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:gl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ZF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const C7=Ri.highest(Mt.theme(ex)),XF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),jo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(XF)?r.value:t,n)}}),w7=Vr.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(jo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(jo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(jo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(jo)!=n&&this.view.dispatch({effects:XF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function k7(){return[jo,w7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function A7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class P7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of A7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",T7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),D7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function I7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Du=$t.define({combine(n){let e=bs(n,{render:null,specialChars:T7,addSpecialChars:null});return(e.replaceTabs=!I7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function R7(n={}){return[Du.of(n),F7()]}let Q2=null;function F7(){return Q2||(Q2=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Du)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new P7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new N7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new L7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Du);n.startState.facet(Du)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const _7="•";function B7(n){return n>=32?_7:n==10?"␤":String.fromCharCode(9216+n)}class L7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=B7(this.code),r=e.state.phrase("Control character")+" "+(D7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class N7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function M7(){return j7}const $7=Ht.line({class:"cm-activeLine"}),j7=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push($7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function Q7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function V2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?Q7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function V7(n,e){let t=V2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=V2(n,i);if(!C)return r;let A=q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function U7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?V7(t,r):null)}const W7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},G7={style:"cursor: crosshair"};function z7(n={}){let[e,t]=W7[n.key||"Alt"],r=Vr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?G7:null})]}const Io="-10000px";class YF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function Z7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||Z7}}}),U2=new WeakMap,Kx=Vr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new YF(n,Sc,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=U2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||Y7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),X7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Y7={x:0,y:0},Sc=$t.define({enables:[Kx,X7]}),Gu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Ec{static create(e){return new Ec(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new YF(e,Gu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const H7=Sc.compute([Gu],n=>{let e=n.facet(Gu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Ec.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class K7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Ec.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!J7(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!eW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const fu=4;function J7(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-fu&&e.clientX<=r+fu&&e.clientY>=i-fu&&e.clientY<=l+fu}function eW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function tW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(rW)&&(i=[]);return i},provide:i=>Gu.from(i)});return{active:r,extension:[r,Vr.define(i=>new K7(i,n,r,t,e.hoverTime||300)),H7]}}function HF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const rW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function rl(n,e){let t=n.plugin(KF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const KF=Vr.fromClass(class{constructor(n){this.input=n.state.facet(nl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new pu(n,!0,e.topContainer),this.bottom=new pu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new pu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new pu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(nl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class pu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const nl=$t.define({enables:KF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Iu=$t.define(),nW=$t.define(),sW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},zo=$t.define();function JF(n){return[e_(),zo.of(Object.assign(Object.assign({},sW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function e_(n){let e=[iW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const iW=Vr.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Iu),this.view.viewport.from),r=[],i=this.gutters.map(l=>new aW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(zo),t=n.state.facet(zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Iu),n.state.facet(Iu),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class aW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new t_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(nW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new t_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class t_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),oW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const cW=zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(lW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(uW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function fW(n={}){return[Aa.of(n),e_(),cW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(pW.range(i)))}return gr.of(e)});function dW(){return hW}const r_=1024;let mW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=mW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const gW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):gW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return xW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function sl(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(n_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new yW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class yW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends s_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function i_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(sl(C,e,t,!1))}}return i?i_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function xW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=r_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Ur=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Vs=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Vs>=0&&C.id==Vs&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Vs,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Vs,_t+1);if(Vs>=0&&si>0&&si-1&&si>0){let El=ie(Ur,$r);On=rO(Ur,hn,dn,0,hn.length,0,Yt-At,El,El)}else On=_e(Ur,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Ur=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Ur,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Ru(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Ru(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class OW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class SW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let EW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=EW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Zu(e);return r=>r.modified.indexOf(t)>-1?r:Zu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let CW=0;class Zu{constructor(e){this.name=e,this.instances=[],this.id=CW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&wW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=kW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Zu.get(C,A));return l}}function wW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function kW(n){let e=[[]];for(let t=0;tr.length-t.length)}function o_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Xu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return l_.add(e)}const l_=new mr;class Xu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function AW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function PW(n,e,t,r=0,i=n.length){let l=new TW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class TW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=DW(e)||Xu.empty,q=AW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function DW(n){let e=n.type.prop(l_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,du=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),mu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),gu=Ft(),re={comment:du,lineComment:Ft(du),blockComment:Ft(du),docComment:Ft(du),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:mu,docString:Ft(mu),character:Ft(mu),attributeValue:Ft(mu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:gu,documentMeta:Ft(gu),annotation:Ft(gu),processingInstruction:Ft(gu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}u_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function c_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Yu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class IW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Hu{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Hu(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new IW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends a_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Hu.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let f_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(f_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,RW=Vr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=f_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,RW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class FW{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const _W=$t.define(),Cc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ku(n){let e=n.facet(Cc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function il(n,e){let t="",r=n.tabSize,i=n.facet(Cc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?BW(n,t,e):null}class wc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ku(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const p_=new mr;function BW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return h_(r,n,t)}function h_(n,e,t){for(let r=n;r;r=r.next){let i=NW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function LW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function NW(n){let e=n.type.prop(p_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>d_(h,!0,1,void 0,l&&!LW(h)?i.from:void 0)}return n.parent==null?MW:null}function MW(){return 0}class iO extends wc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if($W(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return h_(this.context.next,this.base,this.pos)}}function $W(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function jW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function qW({closing:n,align:e=!0,units:t=1}){return r=>d_(r,e,t,n)}function d_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?jW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const QW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const VW=200;function UW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+VW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=il(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const WW=$t.define(),m_=new mr;function GW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function ZW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Ju(n,e,t){for(let r of n.facet(WW)){let i=r(n,e,t);if(i)return i}return zW(n,e,t)}function g_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const kc=sr.define({map:g_}),yl=sr.define({map:g_});function y_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(kc)&&!XW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new rG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(yl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function XW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function b_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(x_()))}const YW=n=>{for(let e of y_(n)){let t=Ju(n.state,e.from,e.to);if(t)return n.dispatch({effects:b_(n.state,[kc.of(t),v_(n,t)])}),!0}return!1},HW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of y_(n)){let r=ec(n.state,t.from,t.to);r&&e.push(yl.of(r),v_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function v_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const KW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(yl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},eG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:YW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:HW},{key:"Ctrl-Alt-[",run:KW},{key:"Ctrl-Alt-]",run:JW}],tG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,tG)}});function x_(n){let e=[ca,iG];return n&&e.push(aO.of(n)),e}function O_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=ec(n.state,C.from,C.to);A&&n.dispatch({effects:yl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return O_(n,null)}}});class rG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return O_(e,this.value)}}const nG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function sG(n={}){let e=Object.assign(Object.assign({},nG),n),t=new nv(e,!0),r=new nv(e,!1),i=Vr.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=ec(h.state,A.from,A.to)?r:Ju(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,JF({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=ec(h.state,C.from,C.to);if(_)return h.dispatch({effects:yl.of(_)}),!0;let B=Ju(h.state,C.from,C.to);return B?(h.dispatch({effects:kc.of(B)}),!0):!1}})}),x_()]}const iG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=u_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new bl(e,t||{})}}const lx=$t.define(),S_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(S_)}function E_(n,e){let t=[oG],r;return n instanceof bl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(S_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class aG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)PW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const oG=Ri.high(Vr.fromClass(aG,{decorations:n=>n.decorations})),lG=bl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),uG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),C_=1e4,w_="()[]{}",k_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:w_,maxScanDistance:C_,renderMatch:pG})}}),cG=Ht.mark({class:"cm-matchingBracket"}),fG=Ht.mark({class:"cm-nonmatchingBracket"});function pG(n){let e=[],t=n.matched?cG:fG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const hG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(k_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),dG=[hG,uG];function mG(n={}){return[k_.of(n),dG]}const gG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(gG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||C_,l=r.brackets||w_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return yG(n,e,t,A,B,_,l)}}return bG(n,e,t,h,C.type,i,l)}function yG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const vG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),xG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xG[n]=OG(vG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function OG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[o_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const SG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?EG(n):r.block?wG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const EG=oO(PG,0),CG=oO(A_,0),wG=oO((n,e)=>A_(n,e,AG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function kG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function AG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function A_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>kG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),TG=ri.define(),DG=$t.define(),P_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),T_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(P_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=tc(B,B.length,t.minDepth,A):B=R_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(TG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function IG(n={}){return[T_,P_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?D_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Ac(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(T_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const D_=Ac(0,!1),px=Ac(1,!1),RG=Ac(0,!0),FG=Ac(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(DG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function tc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function _G(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function BG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function I_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],LG=200;function R_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),tc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function NG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=MG(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function MG(n,e,t){let r=I_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const $G=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||$G.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Pc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const __=n=>F_(n,!vn(n)),B_=n=>F_(n,vn(n));function L_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Pc(t,e))}const qG=n=>L_(n,!vn(n)),QG=n=>L_(n,vn(n));function VG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Tc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;VG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const UG=n=>vs(n,e=>Tc(n.state,e,!vn(n))),WG=n=>vs(n,e=>Tc(n.state,e,vn(n)));function N_(n,e){return vs(n,t=>{if(!t.empty)return Pc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const M_=n=>N_(n,!1),$_=n=>N_(n,!0);function j_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Pc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>q_(n,!1),hx=n=>q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const GG=n=>vs(n,e=>Fi(n,e,!0)),zG=n=>vs(n,e=>Fi(n,e,!1)),ZG=n=>vs(n,e=>Fi(n,e,!vn(n))),XG=n=>vs(n,e=>Fi(n,e,vn(n))),YG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function KG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headKG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function Q_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>Q_(n,!vn(n)),U_=n=>Q_(n,vn(n));function W_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const ez=n=>W_(n,!vn(n)),tz=n=>W_(n,vn(n)),rz=n=>ss(n,e=>Tc(n.state,e,!vn(n))),nz=n=>ss(n,e=>Tc(n.state,e,vn(n)));function G_(n,e){return ss(n,t=>n.moveVertically(t,e))}const z_=n=>G_(n,!1),Z_=n=>G_(n,!0);function X_(n,e){return ss(n,t=>n.moveVertically(t,e,j_(n).height))}const lI=n=>X_(n,!1),uI=n=>X_(n,!0),sz=n=>ss(n,e=>Fi(n,e,!0)),iz=n=>ss(n,e=>Fi(n,e,!1)),az=n=>ss(n,e=>Fi(n,e,!vn(n))),oz=n=>ss(n,e=>Fi(n,e,vn(n))),lz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),cz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),fz=({state:n,dispatch:e})=>{let t=Dc(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},pz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},hz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function vl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=yu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=yu(n,h,!1),C=yu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const Y_=(n,e,t)=>vl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iY_(n,!1,!0),H_=n=>Y_(n,!0,!1),K_=(n,e)=>vl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),J_=n=>K_(n,!1),dz=n=>K_(n,!0),mz=n=>vl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headvl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),yz=n=>vl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},vz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Dc(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function eB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Dc(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const xz=({state:n,dispatch:e})=>eB(n,e,!1),Oz=({state:n,dispatch:e})=>eB(n,e,!0);function tB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Dc(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Sz=({state:n,dispatch:e})=>tB(n,e,!1),Ez=({state:n,dispatch:e})=>tB(n,e,!0),Cz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Dc(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function wz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=rB(!1),kz=rB(!0);function rB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&wz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new wc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Az=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new wc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=il(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Cc)})}),{userEvent:"input.indent"})),!0),sB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=il(n,Math.max(0,l-Ku(n)));for(;h(n.setTabFocusMode(),!0),Tz=[{key:"Ctrl-b",run:__,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:B_,shift:U_},{key:"Ctrl-p",run:M_,shift:z_},{key:"Ctrl-n",run:$_,shift:Z_},{key:"Ctrl-a",run:YG,shift:lz},{key:"Ctrl-e",run:HG,shift:uz},{key:"Ctrl-d",run:H_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:mz},{key:"Ctrl-Alt-h",run:J_},{key:"Ctrl-o",run:bz},{key:"Ctrl-t",run:vz},{key:"Ctrl-v",run:hx}],Dz=[{key:"ArrowLeft",run:__,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:qG,shift:ez,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ZG,shift:az,preventDefault:!0},{key:"ArrowRight",run:B_,shift:U_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:XG,shift:oz,preventDefault:!0},{key:"ArrowUp",run:M_,shift:z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:zG,shift:iz,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:GG,shift:sz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:cz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:H_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:J_},{key:"Mod-Delete",mac:"Alt-Delete",run:dz},{mac:"Mod-Backspace",run:gz},{mac:"Mod-Delete",run:yz}].concat(Tz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Iz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:UG,shift:rz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:WG,shift:nz},{key:"Alt-ArrowUp",run:xz},{key:"Shift-Alt-ArrowUp",run:Sz},{key:"Alt-ArrowDown",run:Oz},{key:"Shift-Alt-ArrowDown",run:Ez},{key:"Escape",run:hz},{key:"Mod-Enter",run:kz},{key:"Alt-l",mac:"Ctrl-l",run:fz},{key:"Mod-i",run:pz,preventDefault:!0},{key:"Mod-[",run:sB},{key:"Mod-]",run:nB},{key:"Mod-Alt-\\",run:Az},{key:"Shift-Mod-k",run:Cz},{key:"Shift-Mod-\\",run:JG},{key:"Mod-/",run:SG},{key:"Alt-A",run:CG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Pz}].concat(Dz),Rz={key:"Tab",run:nB,shift:sB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=rc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=rc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(oB.prototype[Symbol.iterator]=lB.prototype[Symbol.iterator]=function(){return this});function Fz(n){try{return new RegExp(n,cO),!0}catch{return!1}}function rc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:nc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[nc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const nc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(nc)&&(n=t.value);return n},provide:n=>nl.from(n,e=>e?mx:null)}),_z=n=>{let e=rl(n,mx);if(!e){let t=[nc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Bz])),n.dispatch({effects:t}),e=rl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Bz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Lz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uB=$t.define({combine(n){return bs(n,Lz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Nz(n){let e=[Qz,qz];return n&&e.push(uB.of(n)),e}const Mz=Ht.mark({class:"cm-selectionMatch"}),$z=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function jz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const qz=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(uB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&jz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push($z.range(B,q)):(B>=i.to||q<=i.from)&&C.push(Mz.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Qz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Uz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Wz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Vz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Uz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new nZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class cB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Fz(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Xz(this):new zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class fB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?Gz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Gz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new oB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Zz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function sc(n,e){return n.slice(pn(n,e,!1),e)}function ic(n,e){return n.slice(e,pn(n,e))}function Zz(n){return(e,t,r)=>!r[0].length||(n(sc(r.input,r.index))!=Br.Word||n(ic(r.input,r.index))!=Br.Word)&&(n(ic(r.input,r.index+r[0].length))!=Br.Word||n(sc(r.input,r.index+r[0].length))!=Br.Word)}class Xz extends fB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const al=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(al)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>nl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Yz=Ht.mark({class:"cm-searchMatch"}),Hz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Kz=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Hz:Yz)})}return r.finish()}},{decorations:n=>n.decorations});function xl(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):dB(e)}}const ac=xl((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),hB(n),!0}),oc=xl((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),hB(n),!0}),Jz=xl((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),eZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=xl((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),tZ=xl((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new cB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function pB(n){let e=rl(n,pO);return e&&e.dom.querySelector("[main-field]")}function hB(n){let e=pB(n);e&&e==n.root.activeElement&&e.select()}const dB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=pB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:al.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?al.of(gx(n.state,e.query.spec)):sr.appendConfig.of(iZ)]});return!0},mB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=rl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},rZ=[{key:"Mod-f",run:dB,scope:"editor search-panel"},{key:"F3",run:ac,shift:oc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ac,shift:oc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:mB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:eZ},{key:"Mod-Alt-g",run:_z},{key:"Mod-d",run:Wz,preventDefault:!0}];class nZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ac(e),[Qn(e,"next")]),r("prev",()=>oc(e),[Qn(e,"previous")]),r("select",()=>Jz(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>tZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>mB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new cB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:al.of(e)}))}keydown(e){m7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?oc:ac)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(al)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const bu=30,vu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-bu),h=Math.min(i,t+bu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-bu;A--)if(!vu.test(C[A-1])&&vu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const sZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),iZ=[Oi,Ri.low(Kz),sZ];class gB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(bB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function aZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:aZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function oZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function bB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function lZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function uZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=yB(n)),e}const lc=sr.define(),ol=sr.define();class cZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class fZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function pZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function hZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class dZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=hZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ol.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&gZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew dZ(t,n,e)}function gZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function yZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new fZ(q):new cZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=yZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:EZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class uc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new uc(OZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(uZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!bZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(OB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new uc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?vZ:xZ}}function bZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const OZ=[];function vB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=vB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(lc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ol))i=new Wn(i.source,0);else if(l.is(xB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return SZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new gB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function SZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):bB(n,!0).test(i)}const xB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),OB=sr.define(),Bn=Hr.define({create(){return uc.start()},update(n,e){return n.update(e)},provide:n=>[Sc.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},lZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const EZ=mZ(Bn,mO);function xu(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:OB.of(C)}),!0}}const CZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:lc.of(!0)}),!0):!1,wZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ol.of(null)}),!0)};class kZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const AZ=50,PZ=1e3,TZ=Vr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=vB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lAZ&&Date.now()-h.time>PZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(lc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new gB(e,t,n.explicitPos==t,this.view),i=new kZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ol.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:xB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&HF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ol.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:lc.of(!1)}),20),this.composing=0}}}),DZ=typeof navigator=="object"&&/Win/.test(navigator.platform),IZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(DZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),SB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class RZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new RZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let FZ=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),_Z=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?FZ:_Z).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Ol=sr.define({map(n,e){return n&&n.map(e)}}),BZ=sr.define(),ll=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ol))return t.value;if(t.is(BZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function LZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Ol.of(_)];t.state.field(ll,!1)===void 0&&B.push(sr.appendConfig.of([ll,qZ,QZ,SB]))}t.dispatch(t.state.update(A))}}function EB(n){return({state:e,dispatch:t})=>{let r=e.field(ll,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Ol.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const NZ=({state:n,dispatch:e})=>n.field(ll,!1)?(e(n.update({effects:Ol.of(null)})),!0):!1,MZ=EB(1),$Z=EB(-1),jZ=[{key:"Tab",run:MZ,shift:$Z},{key:"Escape",run:NZ}],kI=$t.define({combine(n){return n.length?n[0]:jZ}}),qZ=Ri.highest(ml.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:LZ(n)})}const QZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ll,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Ol.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ul={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const CB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function VZ(){return[WZ,CB]}const cv="()[]{}<>";function wB(n){for(let e=0;e{if((UZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=ZZ(n.state,r);return l?(n.dispatch(l),!0):!1}),GZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=kB(n,n.selection.main.head).brackets||ul.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=XZ(n.doc,h.head);for(let A of r)if(A==C&&Ic(n.doc,h.head)==wB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},zZ=[{key:"Backspace",run:GZ}];function ZZ(n,e){let t=kB(n,n.selection.main.head),r=t.brackets||ul.brackets;for(let i of r){let l=wB(ln(i,0));if(e==i)return l==i?KZ(n,i,r.indexOf(i+i+i)>-1,t):YZ(n,i,l,t.before||ul.before);if(e==l&&AB(n,n.selection.main.from))return HZ(n,i,l)}return null}function AB(n,e){let t=!1;return n.field(CB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Ic(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function XZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function YZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Ic(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function HZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Ic(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t,r){let i=r.stringPrefixes||ul.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Ic(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(AB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!JZ(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function JZ(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function eX(n={}){return[IZ,Bn,fn.of(n),TZ,tX,SB]}const PB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:wZ},{key:"ArrowDown",run:xu(!0)},{key:"ArrowUp",run:xu(!1)},{key:"PageDown",run:xu(!0,"page")},{key:"PageUp",run:xu(!1,"page")},{key:"Enter",run:CZ}],tX=Ri.highest(ml.computeN([fn],n=>n.facet(fn).defaultKeymap?[PB]:[]));class rX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new pX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new rX(i,l,h.diagnostic),!1}),r}function TB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Rc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function DB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(NB))}function nX(n,e){return{effects:DB(n,[Rc.of(e)])}}const Rc=sr.define(),xO=sr.define(),IB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Rc)){let r=e.state.facet(Ls).autoPanel?t.value.length?cl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?cl.open:null,n.selected):t.is(IB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[nl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),sX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function iX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).to_B(n,t,!1)))}const aX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:DB(n.state,[xO.of(!0)])});let t=rl(n,cl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},oX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},lX=[{key:"Mod-Shift-m",run:aX,preventDefault:!0},{key:"F8",run:oX}],uX=Vr.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(nX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function cX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function fX(n,e={}){return[Ls.of({source:n,config:e}),uX,NB]}function FB(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function _B(n,e,t){var r;let i=t?FB(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class pX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=_B(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class cl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=FB(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:IB.of(r)})}static open(e){return new cl(e)}}function Fu(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Ou(n){return Fu(``,'width="6" height="3"')}const hX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ou("#d11")},".cm-lintRange-warning":{backgroundImage:Ou("orange")},".cm-lintRange-info":{backgroundImage:Ou("#999")},".cm-lintRange-hint":{backgroundImage:Ou("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class BB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)mX(e,t,r)),t}}function dX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,dX(n,e)}let{hoverTime:i}=n.state.facet(Fc),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function gX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new BB(t[i]).range(+i));return gr.of(r,!0)}const yX=JF({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new BB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(Fc).markerFilter;for(let r of e.effects)if(r.is(Rc)){let i=r.value;t&&(i=t(i||[],e.state)),n=gX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),LB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=TB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Sc.from(n)}),bX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Fu('')},".cm-lint-marker-warning":{content:Fu('')},".cm-lint-marker-error":{content:Fu('')}}),NB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([sX.range(e.from,e.to)])}),tW(iX,{hideOn:TB}),hX],Fc=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function vX(n={}){return[Fc.of(n),yx,yX,bX,LB]}const xX=(()=>[fW(),dW(),R7(),IG(),sG(),O7(),k7(),Sr.allowMultipleSelections.of(!0),UW(),E_(lG,{fallback:!0}),mG(),VZ(),eX(),U7(),z7(),M7(),Nz(),ml.of([...zZ,...Iz,...rZ,...jG,...eG,...PB,...lX])])();class cc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new cc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new cc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new OX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class OX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class fc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new fc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new fc(this.stack,this.pos,this.index)}}function qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class _u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new _u;class SX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;MB(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if(MB(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class Sl{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function MB(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||EX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function EX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class CX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class wX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new _u)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new _u,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new _u,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new CX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&TX(i);if(h)return Vn&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Vn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Vn&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Vn&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Vn&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Vn&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Vn&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Vn&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Vn&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Vn&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class PX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class pc extends a_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r_;let h=qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new kX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(pc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const DX=312,IX=313,MI=1,RX=2,FX=3,_X=4,BX=314,LX=316,NX=317,MX=5,$X=6,jX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$B=125,qX=59,xx=47,QX=42,VX=43,UX=45,WX=60,GX=44,zX=63,ZX=46,XX=91,YX=new PX({start:!1,shift(n,e){return e==MX||e==$X||e==LX?n:e==NX},strict:!1}),HX=new Sl((n,e)=>{let{next:t}=n;(t==$B||t==-1||e.context)&&n.acceptToken(BX)},{contextual:!0,fallback:!0}),KX=new Sl((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==QX)||t!=$B&&t!=qX&&t!=-1&&!e.context&&n.acceptToken(DX)},{contextual:!0}),JX=new Sl((n,e)=>{n.next==XX&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new Sl((n,e)=>{let{next:t}=n;if(t==VX||t==UX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:RX)}}else t==zX&&n.peek(1)==ZX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(FX))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const tY=new Sl((n,e)=>{if(n.next!=WX||!e.dialectEnabled(jX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==GX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(_X,-t)}),rY=o_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),nY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},sY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},iY={__proto__:null,"<":187},aY=pc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:YX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[rY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[KX,JX,eY,tY,2,3,4,5,6,7,8,9,10,11,12,13,14,HX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>nY[n]||-1},{term:339,get:n=>sY[n]||-1},{term:92,get:n=>iY[n]||-1}],tokenPrec:15004}),jB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],oY=jB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new OW,qB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const lY=["FunctionDeclaration"],uY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(lY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function QB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=uY[h.name];if(C&&C(h,l)||qB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of QB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function cY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)qB.has(i.name)&&(r=r.concat(QB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Yu.define({name:"javascript",parser:aY.configure({props:[p_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:QW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:qW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),m_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":GW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),UB={test:n=>/^JSX/.test(n.name),facet:c_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},fY=Ei.configure({dialect:"ts"},"typescript"),pY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[UB]:void 0)]}),hY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[UB]:void 0)]},"typescript");let WB=n=>({label:n,type:"keyword"});const GB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(WB),dY=GB.concat(["declare","implements","private","protected","public"].map(WB));function mY(n={}){let e=n.jsx?n.typescript?hY:pY:n.typescript?fY:Ei,t=n.typescript?oY.concat(dY):jB.concat(GB);return new FW(e,[Ei.data.of({autocomplete:oZ(VB,yB(t))}),Ei.data.of({autocomplete:cY}),n.jsx?bY:[]])}function gY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const yY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),bY=Mt.inputHandler.of((n,e,t,r,i)=>{if((yY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=gY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function vY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(xY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function xY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},OY={get exports(){return Ox},set exports(n){Ox=n}};const SY={define:!1,require:!1},EY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},CY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},wY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},kY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},AY={assert:!0,expect:!0,should:!0},PY={exports:!0,global:!1,module:!1,require:!1},TY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},DY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},IY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},RY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},UY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},GY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},ZY={$:!1,jQuery:!1},XY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},YY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},HY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},KY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},JY={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},eH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},rH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},nH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},sH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},iH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},aH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},oH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},lH={browser:!1,chrome:!1,opr:!1},uH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},cH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},fH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},pH={amd:SY,applescript:EY,atomtest:CY,browser:wY,builtin:kY,chai:AY,commonjs:PY,couch:TY,devtools:DY,embertest:IY,es2015:RY,es2016:FY,es2017:_Y,es2018:BY,es2019:LY,es2020:NY,es2021:MY,es2022:$Y,es2023:jY,es2024:qY,es2025:QY,es3:VY,es5:UY,greasemonkey:WY,jasmine:GY,jest:zY,jquery:ZY,meteor:XY,mocha:YY,mongo:HY,nashorn:KY,node:JY,nodeBuiltin:eH,phantomjs:tH,prototypejs:rH,protractor:nH,qunit:sH,rhino:iH,serviceworker:aH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:oH,webextensions:lH,worker:uH,wsh:cH,yui:fH};(function(n){n.exports=pH})(OY);const hH=S9(Ox);var hc={},dH={get exports(){return hc},set exports(n){hc=n}},dv,VI;function mH(){return VI||(VI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var HB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,_c=function(c){return HB.exec(c).slice(1)};function Cl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Nc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Bc(c){var s=Lc(c),u=JB(c,-1)==="/";return c=SO(Nc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Lc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Bc(Nc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=Cl(c).substr(1),s=Cl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function V(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,V=G.type||j.wrap,te=this.__keys[V],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+V+".");for(W=te.length;(W-=1)>=0;)if($=te[W],U=G[$],!!U){if(Array.isArray(U)){for(K=U.length;(K-=1)>=0;)if(U[K]&&!E(L,U[K])){if(S(V,te[W]))j=new g(U[K],[$,K],"Property",null);else if(b(U[K]))j=new g(U[K],[$,K],null,null);else continue;I.push(j)}}else if(b(U)){if(E(L,U))continue;I.push(new g(U,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,V;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(V,1)):V+=1;if(V===I.length)return a.Break;if(I[V].extendedRange[0]>Q.range[1])return a.Skip}}),V=0,k(F,{leave:function(Q){for(var $;VQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}(Mc)),Mc}var oo={},tL="esrecurse",rL="ECMAScript AST recursive visitor",nL="https://github.com/estools/esrecurse",sL="esrecurse.js",iL="4.3.0",aL={node:">=4.0"},oL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],lL={type:"git",url:"https://github.com/estools/esrecurse.git"},uL={estraverse:"^5.2.0"},cL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},fL="BSD-2-Clause",pL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},hL={presets:["es2015"]},dL={name:tL,description:rL,homepage:nL,main:sL,version:iL,engines:aL,maintainers:oL,repository:lL,dependencies:uL,devDependencies:cL,license:fL,scripts:pL,babel:hL},RO;function mL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class V extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:U}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===U.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===U.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===U.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===U.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===U.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===U.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===U.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===U.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===U.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Vt=256,tr=Re|Se|Vt;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ue=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Ut=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ut.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Vt)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Vt))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vt)>0},Ut.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,V.lastIndex=w,w+=V.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var pr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var w=V.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){V.lastIndex=this.pos;var tt=V.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new pr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ve=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ve&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Vt|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Ut.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new pr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Ut.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Vi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Vi(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Ui(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Ui(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Qc}var NO;function yL(){return NO||(NO=1,function(c){const s=gL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(jc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||jc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(qc)),qc.exports}var uo={},MO;function bL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Al(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=jc(),s=yL(),u=bL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var U=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,U.get?U:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],U=W.at(-1),ae={type:o.Template,value:K.slice(te.start,U.end)};return te.loc&&(ae.loc={start:te.loc.start,end:U.loc.end}),te.range&&(ae.start=te.range[0],ae.end=U.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,U=this._acornTokTypes;if(te===U.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===U.privateId)W.type=o.PrivateIdentifier;else if(te===U.semi||te===U.comma||te===U.parenL||te===U.parenR||te===U.braceL||te===U.braceR||te===U.dot||te===U.bracketL||te===U.colon||te===U.question||te===U.bracketR||te===U.ellipsis||te===U.arrow||te===U.jsxTagStart||te===U.incDec||te===U.starstar||te===U.jsxTagEnd||te===U.prefix||te===U.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===U.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===U.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===U.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===U.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===U.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,U=K.tokens,ae=this._tokens,z=()=>{U.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),U.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),U=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:U,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,U,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=U,ce.range=[te,U]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(U,ae){(typeof U!="object"||U===null)&&(U={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=U.sourceType,ue=E(U),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const U=this[k],ae=U.tokens;return U.comments&&(ae.comments=U.comments),ae}finishNode(...U){const ae=super.finishNode(...U);return this[D](ae)}finishNodeAt(...U){const ae=super.finishNodeAt(...U);return this[D](ae)}parse(){const U=this[k],ae=super.parse();if(ae.sourceType=U.originalSourceType,U.comments&&(ae.comments=U.comments),U.tokens&&(ae.tokens=U.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return U.lastToken&&(ae.range&&(ae.range[1]=U.lastToken.range[1]),ae.loc&&(ae.loc.end=U.lastToken.loc.end),ae.end=U.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(U){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(U)}raise(U,ae){const z=W.acorn.getLineInfo(this.input,U),ue=new SyntaxError(ae);throw ue.index=U,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(U,ae){this.raise(U,ae)}unexpected(U){let ae="Unexpected token";if(U!=null){if(this.pos=U,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(U){const ae=super.jsx_readString(U);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](U){return U.type==="TemplateElement"&&this[k].templateElements.push(U),U.type.includes("Function")&&!U.generator&&(U.generator=!1),U}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),V=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=V,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function vL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",U="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[V]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[U]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ve||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Ut}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var xL="eslint",OL="9.12.0",SL="Nicholas C. Zakas ",EL="An AST-based pattern checker for JavaScript.",CL={eslint:"./bin/eslint.js"},wL="./lib/api.js",kL="./lib/types/index.d.ts",AL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},PL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},TL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},DL={"pre-commit":"lint-staged"},IL=["LICENSE","README.md","bin","conf","lib","messages"],RL="eslint/eslint",FL="https://eslint.org/donate",_L="https://eslint.org",BL="https://github.com/eslint/eslint/issues/",LL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},NL={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},ML={jiti:"*"},$L={jiti:{optional:!0}},jL=["ast","lint","javascript","ecmascript","espree"],qL="MIT",QL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:xL,version:OL,author:SL,description:EL,bin:CL,main:wL,types:kL,exports:AL,typesVersions:PL,scripts:TL,gitHooks:DL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:IL,repository:RL,funding:FL,homepage:_L,bugs:BL,dependencies:LL,devDependencies:NL,peerDependencies:ML,peerDependenciesMeta:$L,keywords:jL,license:qL,engines:QL},Pl={},xs=[],Zn=[],UL=typeof Uint8Array<"u"?Uint8Array:Array,Vc=!1;function qO(){Vc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new UL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function GL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function zL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Tl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function VO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var ZL={}.toString,UO=Array.isArray||function(c){return ZL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var XL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Dl();function Dl(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Us(c,s){if(Dl()=Dl())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Dl().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return Fl(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function eN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return cN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return lN(this,s,u);case"latin1":case"binary":return uN(this,s,u);case"base64":return aN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return tN(this,s,u,p);case"utf8":case"utf-8":return rN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return nN(this,s,u,p);case"base64":return sN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function aN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return oN(p)}var KO=4096;function oN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Tl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Tl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Il(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2};function Rl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Rl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Il(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Il(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Rl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Rl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),VO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),VO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function gN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return WL(hN(c))}function _l(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function bN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||vN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function vN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),Ml(s)?u.showHidden=s:s&&tf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=ON),Nl(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ON(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function SN(c,s){return c}function EN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Nl(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Nl(c,p,u)),p}var a=CN(c,s);if(a)return a;var d=Object.keys(s),v=EN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Xc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Xc(s)}var o="",y=!1,O=["{","}"];if(Hc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Xc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=wN(c,s,u,v,d):g=d.map(function(f){return Yc(c,s,u,v,f,y)}),c.seen.pop(),kN(g,o,O)}function CN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Kc(s))return c.stylize(""+s,"number");if(Ml(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Xc(c){return"["+Error.prototype.toString.call(c)+"]"}function wN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function kN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Hc(c){return Array.isArray(c)}function Ml(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Kc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&Jc(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&Jc(c)==="[object Date]"}function ha(c){return Li(c)&&(Jc(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function $l(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function Jc(c){return Object.prototype.toString.call(c)}function ef(c){return c<10?"0"+c.toString(10):c.toString(10)}var AN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function PN(){var c=new Date,s=[ef(c.getHours()),ef(c.getMinutes()),ef(c.getSeconds())].join(":");return[c.getDate(),AN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",PN(),Bl.apply(null,arguments))}function tf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function rf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,V=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=V(xe/je);xe>G*k>>1;Ge+=S)xe=V(xe/G);return V(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>V((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtV(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),V(Ge/nr)>b-ut&&$("overflow"),ut+=V(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnV((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Vt(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ue=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ue))Ce=Ce.replace(Ue,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Vt(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Ut(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var pr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:pr.domainHost,parse:pr.parse,serialize:pr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ve="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ve+"%"+Ve+Ve+"%"+Ve+Ve)+"|"+a("%[89A-Fa-f]"+Ve+"%"+Ve+Ve)+"|"+a("%"+Ve+Ve)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return V[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,U=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;bf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],V=L[3],Q=L[5];return(j<=23&&G<=59&&V<=59||j==23&&G==59&&V==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return bf}var vf,TS;function MN(){return TS||(TS=1,vf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),vf}var xf,DS;function $N(){return DS||(DS=1,xf=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),xf}var Of,IS;function jN(){return IS||(IS=1,Of=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),Cf}var wf,BS;function UN(){return BS||(BS=1,wf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),wf}var kf,LS;function WN(){return LS||(LS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),kf}var Af,NS;function GN(){return NS||(NS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Af}var Pf,MS;function zN(){return MS||(MS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Pf}var Tf,$S;function ZN(){return $S||($S=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,V=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Tf}var Df,jS;function qS(){return jS||(jS=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Df}var If,QS;function VS(){return QS||(QS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),If}var Rf,US;function WS(){return US||(US=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,GS;function zS(){return GS||(GS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,ZS;function XN(){return ZS||(ZS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,XS;function YN(){return XS||(XS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Bf}var Lf,YS;function HN(){return YS||(YS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Lf}var Nf,HS;function KN(){return HS||(HS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Nf}var Mf,KS;function JN(){return KS||(KS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(U),P=s.schema.patternProperties||{},N=Object.keys(P).filter(U),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,V=s.opts.removeAdditional,Q=j||G||V,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ue=s.util.getProperty(z),it=x+Ue,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ue,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Ut=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),Mf}var $f,JS;function eM(){return JS||(JS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),qf}var Qf,r1;function nM(){return r1||(r1=1,Qf={$ref:MN(),allOf:$N(),anyOf:jN(),$comment:qN(),const:QN(),contains:VN(),dependencies:UN(),enum:WN(),format:GN(),if:zN(),items:ZN(),maximum:qS(),minimum:qS(),maxItems:VS(),minItems:VS(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:XN(),not:YN(),oneOf:HN(),pattern:KN(),properties:JN(),propertyNames:eM(),required:tM(),uniqueItems:rM(),validate:wS()}),Qf}var Vf,n1;function sM(){if(n1)return Vf;n1=1;var c=nM(),s=da().toHash;return Vf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Vf}var Uf,s1;function iM(){if(s1)return Uf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Uf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),V={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...V},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...V},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...V},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...V,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,U=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Vt=new Error(qt,{cause:kt});throw kt.code&&(Vt.code=kt.code),Vt}}validateEnvironment(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Pl.Legacy=Re,Pl}var ql={exports:{}},Ql={exports:{}},Hf,m1;function o$(){if(m1)return Hf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Hf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Hf}var Kf,g1;function y1(){if(g1)return Kf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=o$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ql,Ql.exports)),Ql.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var u$={isatty:v1,ReadStream:x1,WriteStream:O1},c$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:u$,isatty:v1}),f$=i(c$),S1;function p$(){return S1||(S1=1,function(c,s){const u=f$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=mH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?ql.exports=l$():ql.exports=p$()),ql.exports}var Jf,C1;function ep(){if(C1)return Jf;C1=1;const c=wl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),V=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ve=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ve=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ve=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ve=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ve},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),U=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ve=Object.getOwnPropertyDescriptor(Te,ke);if(Ve)return Ve;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ve=0;Ve":return{value:Te.value>Ve.value};case">=":return{value:Te.value>=Ve.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ve.value};case">>>":return{value:Te.value>>>Ve.value};case"+":return{value:Te.value+Ve.value};case"-":return{value:Te.value-Ve.value};case"*":return{value:Te.value*Ve.value};case"/":return{value:Te.value/Ve.value};case"%":return{value:Te.value%Ve.value};case"**":return{value:Te.value**Ve.value};case"|":return{value:Te.value|Ve.value};case"^":return{value:Te.value^Ve.value};case"&":return{value:Te.value&Ve.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ve=ue(Ie.arguments,ke);if(Ve!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ve)};if(U.has(Pe[de]))return{value:Ve[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ve)};if(U.has(Oe))return{value:Ve[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ve=Te.defs[0];if(Ve.parent&&Ve.parent.kind==="const"&&Ve.node.id.type==="Identifier")return ce(Ve.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ve=ce(Ie.right,ke);if(Ve!=null)return Ve}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ve=pe(Ie,ke);if(Ve!=null&&!z(Te.value,Ve.value))return{value:Te.value[Ve.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ve=ue(Ie.arguments,ke);if(Te!=null&&Ve!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ve)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ve of Ie.properties)if(Ve.type==="Property"){if(Ve.kind!=="init")return null;const lt=pe(Ve,ke),Oe=ce(Ve.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ve.type==="SpreadElement"||Ve.type==="ExperimentalSpreadProperty"){const lt=ce(Ve.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ve=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ve!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ve)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ve=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ve}=Ie;return typeof this[Ve]=="function"?this[Ve](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ve}=Ie;for(const lt of Te[Ve]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ve=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ve},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ve,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ve=Ie|0,lt=ke,Oe=Te,!(Ve>=1))throw new TypeError("'times' should be a positive integer.")}else Ve=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ve>0);return Ve===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Vt=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ve=ke-1;Ve>=0&&Ie.charCodeAt(Ve)===92;--Ve)Te=!Te;return Te}function fe(Ie,ke,Te){const Ve=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}function Ue(Ie,ke,Te){const Ve=[];let lt=0;for(const Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Vt.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ve}=Vt.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ve||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ue(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Ut=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function pr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ve=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ve.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ve=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ve,!0))}for(const Te of this.globalObjectNames){const Ve=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ve,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ve=oe(Te.arguments[0]);if(Ve==null||!Bt(ke,Ve))continue;const lt=ke[Ve],Oe=[Ve];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ve of Te.body){if(!Pt.test(Ve.type)||Ve.source==null)continue;const lt=Ve.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ve,path:Pe,type:se,info:Oe[se]}),Ve.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ve,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ve.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ve,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ve[se]&&(yield{node:Pe,path:Te,type:se,info:Ve[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ve)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ve){let lt=ke;for(;pr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ve,Pe))return;Te=Te.concat(Pe);const de=Ve[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ve[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ve[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ve[Ut]&&(yield{node:Oe,path:Te,type:Ut,info:Ve[Ut]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve),yield*this._iteratePropertyReferences(Oe,Te,Ve));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ve))}*_iterateLhsReferences(ke,Te,Ve){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ve,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ve,Oe))continue;const Pe=Te.concat(Oe),de=Ve[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ve))}*_iterateImportReferences(ke,Te,Ve){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ve,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Ut,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Ut,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:V,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Ut,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=V,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(tp)),tp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Ul,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=op;function op(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",op)}En.notDeepStrictEqual=lp;function lp(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",lp)}En.strictEqual=up;function up(c,s,u){c!==s&&Cn(c,s,u,"===",up)}En.notStrictEqual=cp;function cp(c,s,u){c===s&&Cn(c,s,u,"!==",cp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function b$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=b$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var v$=Object.freeze({__proto__:null,AssertionError:Ul,assert:mo,deepEqual:ip,deepStrictEqual:ap,default:En,doesNotThrow:j1,equal:np,fail:Cn,ifError:q1,notDeepEqual:op,notDeepStrictEqual:lp,notEqual:sp,notStrictEqual:cp,ok:mo,strictEqual:up,throws:$1}),Wl=i(v$),fp,Q1;function go(){return Q1||(Q1=1,fp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),fp}var yo={},V1;function bo(){return V1||(V1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var pp,U1;function x$(){if(U1)return pp;U1=1;const c=go(),s=bo();return pp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},pp}var hp,W1;function O$(){if(W1)return hp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return hp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},hp}var dp,G1;function mp(){if(G1)return dp;G1=1;const c=go();return dp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},dp}var gp,z1;function S$(){if(z1)return gp;z1=1;const c=mp();return gp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},gp}var yp,Z1;function E$(){if(Z1)return yp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return yp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},xp}var Op,H1;function w$(){if(H1)return Op;H1=1;const c=mp();return Op=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Op}var Sp,K1;function k$(){if(K1)return Sp;K1=1;const c=x$(),s=O$(),u=S$(),p=E$(),a=vp(),d=C$(),v=w$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Sp={forward:new m(a,p),backward:new m(s,c)},Sp}var Ep,J1;function A$(){if(J1)return Ep;J1=1;const c=vp();return Ep=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Ep}var Cp,eE;function P$(){if(eE)return Cp;eE=1;const c=Wl,{isCommentToken:s}=Kr(),u=k$(),p=vp(),a=A$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return Cp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Pp}var Tp,lE;function Dp(){if(lE)return Tp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Ip=d,Ip}var Rp,cE;function D$(){if(cE)return Rp;cE=1;const c=Dp(),s=T$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,V=this.thrownForkContext;G.add=f.bind(null,G,V,j),V.add=f.bind(null,V,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const V=this.choiceContext;return V.trueForkContext.addAll(I.trueForkContext),V.falseForkContext.addAll(I.falseForkContext),V.nullishForkContext.addAll(I.nullishForkContext),V.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const V=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,V,I.defaultBodySegments)):j.add(V));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Rp=P,Rp}var Fp,fE;function pE(){if(fE)return Fp;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return Fp=c,Fp}var _p,hE;function I$(){if(hE)return _p;hE=1;const c=D$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Bp=R,Bp}var Lp,mE;function gE(){return mE||(mE=1,Lp=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Lp}var ji={},Np={exports:{}},Mp={exports:{}},$p,yE;function F$(){if(yE)return $p;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Qp={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)U?te:U}),s=K(function(te,U){return te0?1:0},d=K(function(te,U){return~~(te/U)}),v=K(function(te,U){return te%U}),m=K(function(te,U){return Math.floor(te/U)}),o=K(function(te,U){var ae;return(te%(ae=U)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,U){return Math.pow(te,U)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,U){return Math.atan2(te,U)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},V=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,U){var ae;for(te=Math.abs(te),U=Math.abs(U);U!==0;)ae=te%U,te=U,U=ae;return te}),W=K(function(te,U){return Math.abs(Math.floor(te/$(te,U)*U))}),Vp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:V,odd:Q,gcd:$,lcm:W};function K(te,U){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,zB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,zB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Xp,FE;function V$(){var j;if(FE)return Xp;FE=1;const{isCommentToken:c}=Kr(),s=P$(),u=Gl(),p=ep(),a=nE(),{directivesPattern:d}=iE(),v=R$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=$c(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,V){const Q=[];let $=0,W=0;for(;$=V.length||$=V.range[0]||V.range[0]<=G.range[0]&&V.range[1]>=G.range[0]}function F(G,V,Q,$){if(R(V,Q))return!1;const[W,K]=V.range[1]<=Q.range[0]?[V,Q]:[Q,V],te=G.getLastToken(W)||W,U=G.getFirstToken(K)||K;let ae=te;for(;ae!==U;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==U&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,V={},Q={}){for(const $ of new Set([...Object.keys(V),...Object.keys(Q)])){const W=V[$]===void 0?void 0:T(V[$]),te=Q[$]&&Q[$].value||W,U=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=U!==void 0,ae.eslintExplicitGlobalComments=U,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,V){Object.keys(V).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,U,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,U=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=U||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const U=this.scopeManager.acquire(te,K);if(U)return U.type==="function-expression-name"?($.set(Q,U.childScopes[0]),U.childScopes[0]):($.set(Q,U),U)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const U=te.variables.find(ae=>ae.name===Q);if(U)return U.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:U,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(U);if(!(te.type==="Line"&&!ue)){if(U==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${U} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(U){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=U.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(U=>{const{label:ae,value:z}=f.parseDirective(U.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:U.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(U),K[ue].value=ce):K[ue]={comments:[U],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:U.loc}):Q.push({ruleId:null,loc:U.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Xp=L,Xp}var Yp,_E;function BE(){return _E||(_E=1,Yp={SourceCode:V$()}),Yp}var Hp,LE;function zl(){return LE||(LE=1,Hp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Hp}var Kp,NE;function U$(){if(NE)return Kp;NE=1;const c=zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Kp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Kp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function Jp(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W$(c){return function(s){if(Array.isArray(s))return eh(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return eh(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?eh(c,s):void 0}}function eh(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[V]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[V]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,V,Q,$,W,K,te;function U(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(V=$.length;(V-=1)>=0;)if($[V]){if(S(I,Q[G]))j=new g($[V],[te,V],"Property",new x($,V));else{if(!b($[V]))continue;j=new g($[V],[te,V],null,new x($,V))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||U(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)V.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(V),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var V;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),G$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=pr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,V=pr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=pr(["\\",'"'],!0,!1),U=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=pr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=pr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=pr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=pr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=pr(["/"],!0,!1),qt=Zt(":not(",!1),Vt=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ue=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Ut=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function pr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beUt&&(Ut=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ve(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(V))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Vt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ue)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&VE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&VE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function rh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Zl.VisitorKeys[p]?Zl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function nh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=Jp(u,1)[0];if(!d)return!1;for(var v=rh(d,a),m=0;m0&&nh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return ah={getPlaceholderMatcher:c,interpolate:s},ah}var oh,YE;function Y$(){if(YE)return oh;YE=1;const c=Wl,{RuleFixer:s}=Z$(),{interpolate:u}=X$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return oh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},oh}function H$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var lh,HE;function K$(){if(HE)return lh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),lh={LazyLoadingRuleMap:s},lh}var uh={exports:{}},xo={},ch={exports:{}},KE;function J$(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}ch.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),ch.exports}var fh={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}fh.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),fh.exports}var ph={exports:{}},tC;function e3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}ph.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),ph.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=J$(),xo.code=eC(),xo.keyword=e3()}()),xo}var hh,sC;function iC(){return sC||(sC=1,hh={LATEST_ECMA_VERSION:2025}),hh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=wl(),u=nC(),p=Al(),a=zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=Gl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function V(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function U(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Vt(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ue(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Ut(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ue(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ue):ee.getFirstToken(X,Ue)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ve(ee.left,ee.operator),Ke=be&&ve&&Ve(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ve(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:U,isES5Constructor:G,getUpperFunction:V,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Ut,isDotToken:qt,isQuestionDotToken:Vt,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Vt),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ue),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ue,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=V(Ne);if(Ke===null||!U(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!U(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(U(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},dh}var mh,lC;function r3(){if(lC)return mh;lC=1;const c=Ze();return mh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},mh}var gh,uC;function n3(){if(uC)return gh;uC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},gh}var yh,cC;function s3(){if(cC)return yh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return yh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},yh}var bh,fC;function i3(){if(fC)return bh;fC=1;const c=Ze();return bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},bh}var vh,pC;function a3(){if(pC)return vh;pC=1;const c=Ze();return vh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},vh}var xh,hC;function o3(){if(hC)return xh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return xh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},xh}var Oh,dC;function l3(){if(dC)return Oh;dC=1;const c=Ze();return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Oh}var Sh,mC;function u3(){return mC||(mC=1,Sh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Sh}var Eh,gC;function c3(){if(gC)return Eh;gC=1;const c=Ze();return Eh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Eh}var Ch,yC;function f3(){if(yC)return Ch;yC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},Ch}var wh,bC;function p3(){return bC||(bC=1,wh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),wh}var kh,vC;function h3(){if(vC)return kh;vC=1;const c=Ze();return kh={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},kh}var Ah,xC;function d3(){if(xC)return Ah;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ah={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ah}var Ph,OC;function m3(){if(OC)return Ph;OC=1;const c=Ze();return Ph={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Ph}var Th,SC;function g3(){if(SC)return Th;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Th={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Th}var Dh,EC;function y3(){if(EC)return Dh;EC=1;const c=Ze();return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Dh}var Ih,CC;function b3(){if(CC)return Ih;CC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Ih}var Rh,wC;function Qi(){if(wC)return Rh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Rh={upperCaseFirst:u,getGraphemeCount:p},Rh}var Fh,kC;function v3(){if(kC)return Fh;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Fh={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},Fh}var _h,AC;function x3(){if(AC)return _h;AC=1;const c=Ze();return _h={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},_h}var Bh,PC;function O3(){if(PC)return Bh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Bh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Bh}var Lh,TC;function S3(){return TC||(TC=1,Lh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Lh}var Nh,DC;function E3(){if(DC)return Nh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Nh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const V=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+V)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},Mh}var $h,RC;function w3(){if(RC)return $h;RC=1;const c=/^no default$/iu;return $h={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},$h}var jh,FC;function k3(){return FC||(FC=1,jh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),jh}var qh,_C;function A3(){return _C||(_C=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),qh}var Qh,BC;function P3(){if(BC)return Qh;BC=1;const c=Ze();return Qh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Qh}var Vh,LC;function Uh(){return LC||(LC=1,Vh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Vh}var Wh,NC;function T3(){if(NC)return Wh;NC=1;const c=Ze(),s=Uh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Wh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Wh}var Gh,MC;function D3(){return MC||(MC=1,Gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),Gh}var zh,$C;function I3(){if($C)return zh;$C=1;const c=Ze();return zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},zh}var Zh,jC;function R3(){if(jC)return Zh;jC=1;const{getStaticValue:c}=Kr();return Zh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Zh}var Xh,qC;function F3(){if(qC)return Xh;qC=1;const c=Ze();return Xh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Yh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Yh}var Hh,VC;function B3(){if(VC)return Hh;VC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Hh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Hh}var Kh,UC;function L3(){return UC||(UC=1,Kh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Kh}var Jh,WC;function N3(){return WC||(WC=1,Jh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return nd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},nd}var sd,YC;function Q3(){if(YC)return sd;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},sd}var id,HC;function V3(){return HC||(HC=1,id={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),id}var ad,KC;function U3(){return KC||(KC=1,ad={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),ad}var od,JC;function W3(){if(JC)return od;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return od={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},od}var ld,ew;function G3(){if(ew)return ld;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ld={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ld}var ud,tw;function z3(){if(tw)return ud;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return ud={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},ud}var cd,rw;function Z3(){return rw||(rw=1,cd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),cd}var fd,nw;function X3(){if(nw)return fd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},fd}var pd,sw;function Y3(){if(sw)return pd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function V(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function U(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:U}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||U(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(U,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[U.range[1]-U.loc.end.column,U.range[1]-U.loc.end.column+z+ue]:[U.range[0]-U.loc.start.column,U.range[0]-U.loc.start.column+z+ue];s.report({node:U,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(U,ae){const z=ae?o.getLastToken(U):o.getFirstToken(U),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(U,ae){const z=ae===!0?o.getLastToken(U,1):o.getTokenBefore(U),ue=ae===!0?U.loc.end.line:U.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(U,ae){const z=g(U,!1);if(U.type!=="ArrayExpression"&&U.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab),U.type==="IfStatement"&&U.alternate){const ue=o.getTokenBefore(U.alternate);b(ue,ae),f(U.alternate)||b(U.alternate,ae)}if(U.type==="TryStatement"&&U.handler){const ue=o.getFirstToken(U.handler);b(ue,ae)}if(U.type==="TryStatement"&&U.finalizer){const ue=o.getTokenBefore(U.finalizer);b(ue,ae)}if(U.type==="DoWhileStatement"){const ue=o.getTokenAfter(U.body);b(ue,ae)}}function S(U,ae){U.forEach(z=>b(z,ae))}function E(U,ae){const z=o.getLastToken(U),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(U,!0)&&x(U,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(U,ae){const z=o.getLastToken(U,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(U,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(U,ae){const z=g(U,!1);(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab,{line:U.loc.start.line,column:U.loc.start.column})}function T(U,ae,z){let ue=U.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(U){return T(U,"VariableDeclarator")}function F(U,ae){return ae&&ae.parent.loc.start.line===U.loc.start.line&&ae.parent.declarations.length>1}function P(U){const ae=U.parent;return ae.arguments.length>=2&&ae.arguments[1]===U?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(U){const ae=U.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==U)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(U){const ae=U.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(U.body,z),E(U,z-ue)}function L(U){const ae=o.getLastToken(U),z=U.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(U){if(L(U))return;let ae=U.type==="ArrayExpression"?U.elements:U.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(U);if(f(U)){const ce=U.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==U.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=U.parent.type==="ObjectExpression"?U.parent.properties:U.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(U)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(U,z)}else z=g(U).goodChar;m[U.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[U.type],F(U,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===U.loc.end.line)&&E(U,z+(F(U,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(U){return U.type==="BlockStatement"||U.type==="ClassBody"||U.body&&U.body.type==="BlockStatement"||U.consequent&&U.consequent.type==="BlockStatement"}function V(U){if(L(U))return;if(U.parent&&(U.parent.type==="FunctionExpression"||U.parent.type==="FunctionDeclaration"||U.parent.type==="ArrowFunctionExpression")){I(U);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];U.parent&&ue.includes(U.parent.type)&&G(U)?ae=g(U.parent).goodChar:U.parent&&U.parent.type==="CatchClause"?ae=g(U.parent.parent).goodChar:ae=g(U).goodChar,U.type==="IfStatement"&&U.consequent.type!=="BlockStatement"?z=[U.consequent]:Array.isArray(U.body)?z=U.body:z=[U.body],z.length>0&&S(z,ae+v),U.type==="BlockStatement"&&E(U,ae)}function Q(U){return U.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==U.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(U){const ae=Q(U),z=g(U).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[U.kind];if(S(ae,ne),o.getLastToken(U).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(U,g(ce).goodChar):E(U,ne-v)}function W(U){U.body.type!=="BlockStatement"&&V(U)}function K(U,ae){const z=U.type==="SwitchStatement"?U:U.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(U){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(U).replace(o.getText(U.argument),"");return ae.test(z)}return{Program(U){U.body.length>0&&S(U.body,g(U).goodChar)},ClassBody:V,BlockStatement:V,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(U){U.consequent.type!=="BlockStatement"&&U.consequent.loc.start.line>U.loc.start.line&&V(U)},VariableDeclaration(U){U.declarations.at(-1).loc.start.line>U.declarations[0].loc.start.line&&$(U)},ObjectExpression(U){j(U)},ArrayExpression(U){j(U)},MemberExpression(U){if(typeof m.MemberExpression>"u"||L(U)||T(U,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(U,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(U).goodChar+v*m.MemberExpression,z=[U.property],ue=o.getTokenBefore(U.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(U){const ae=g(U).goodChar,z=K(U,ae);S(U.cases,z),E(U,ae)},SwitchCase(U){if(L(U))return;const ae=K(U);S(U.consequent,ae+v)},FunctionDeclaration(U){L(U)||(m.FunctionDeclaration.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(U){L(U)||(m.FunctionExpression.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(U){if(L(U))return;const ae=g(U).goodChar;te(U)?k(U,ae):b(U,ae)},CallExpression(U){L(U)||(m.CallExpression.arguments==="first"&&U.arguments.length?S(U.arguments.slice(1),U.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(U.arguments,g(U).goodChar+v*m.CallExpression.arguments))}}}},hd}var dd,aw;function K3(){if(aw)return dd;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return dd={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const U=W.length-K;if((U&&te==="strict"||U<0&&te==="minimum"||U>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=U>0,pe=Math.abs(U),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),U,ae,z;f&&$>1?(U=f.beforeColon,ae=f.afterColon,z=f.mode):(U=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?U:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,U,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):V(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},gd}var yd,uw;function t5(){if(uw)return yd;uw=1;const c=Ze(),s=Uh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:V,ExportNamedDeclaration:U,ExportDefaultDeclaration:U,ExportAllDeclaration:U,FunctionDeclaration:G,ImportDeclaration:U,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:V,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},yd}var bd,cw;function r5(){if(cw)return bd;cw=1;const c=Ze();return bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},bd}var vd,fw;function n5(){if(fw)return vd;fw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},vd}var xd,pw;function s5(){if(pw)return xd;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function V($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const U=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&V($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(U<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(U)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},xd}var Od,hw;function i5(){if(hw)return Od;hw=1;const c=Ze();return Od={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Od}var Sd,dw;function a5(){if(dw)return Sd;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Sd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Sd}var Ed,mw;function o5(){if(mw)return Ed;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Ed={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),V=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||V)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield V.insertTextBefore(W,I.operator),yield V.removeRange([R.range[0],P.range[0]]),yield V.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield V.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Ed}var Cd,gw;function l5(){return gw||(gw=1,Cd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),Cd}var wd,yw;function u5(){return yw||(yw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),wd}var kd,bw;function c5(){if(bw)return kd;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return kd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(V,Q){let $=0;return V.replace(/\t/gu,(W,K)=>{const te=K+$,U=Q?te%Q:0,ae=Q-U;$+=ae-1}),Array.from(V).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(V,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===V.length)}function D(V,Q,$){const W=$.loc.start,K=$.loc.end,te=!V.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===V.length)}function T(V){if(!V||!V.parent||V.type!=="JSXEmptyExpression"||V.parent.type!=="JSXExpressionContainer")return!1;const Q=V.parent;return Q.loc.start.line===Q.loc.end.line}function R(V,Q){return V.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(V,Q,$){Array.isArray(V[Q])||(V[Q]=[]),V[Q].push($)}function P(){return a.ast.tokens.filter(V=>V.type==="String"||V.type==="JSXText"&&a.getNodeByRangeIndex(V.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(V=>V.type==="Template")}function I(){return a.ast.tokens.filter(V=>V.type==="RegularExpression")}function L(V){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?V.at(-1)!==$.parent&&V.push($.parent):V.push(Q)}),V}function G(V){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),U=N(),ae=L(U),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:V,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:V,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},kd}var Ad,vw;function f5(){if(vw)return Ad;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Ad={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Ad}var Pd,xw;function p5(){if(xw)return Pd;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Pd}var Td,Ow;function h5(){return Ow||(Ow=1,Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Td}var Dd,Sw;function d5(){if(Sw)return Dd;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Dd}var Id,Ew;function m5(){if(Ew)return Id;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Id}var Rd,Cw;function g5(){if(Cw)return Rd;Cw=1;const c=Ze();return Rd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Rd}var Fd,ww;function y5(){if(ww)return Fd;ww=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const V=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=V+K.length;return G.replaceTextRange([V,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=V+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const U=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=U.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([V,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},Fd}var _d,kw;function b5(){if(kw)return _d;kw=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},_d}var Bd,Aw;function v5(){if(Aw)return Bd;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Bd={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Bd}var Ld,Pw;function x5(){if(Pw)return Ld;Pw=1;const c=Ze();return Ld={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Ld}var Nd,Tw;function O5(){if(Tw)return Nd;Tw=1;const c=Ze();return Nd={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Nd}var Md,Dw;function S5(){return Dw||(Dw=1,Md={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),Md}var $d,Iw;function E5(){if(Iw)return $d;Iw=1;const c=Ze();return $d={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},$d}var jd,Rw;function C5(){if(Rw)return jd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return jd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},jd}var qd,Fw;function w5(){if(Fw)return qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},qd}var Qd,_w;function k5(){return _w||(_w=1,Qd={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Qd}var Vd,Bw;function A5(){if(Bw)return Vd;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Vd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Vd}var Ud,Lw;function P5(){if(Lw)return Ud;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Ud={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Ud}var Wd,Nw;function T5(){return Nw||(Nw=1,Wd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Wd}var Gd,Mw;function D5(){return Mw||(Mw=1,Gd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),Gd}var zd,$w;function I5(){return $w||($w=1,zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),zd}var Zd,jw;function R5(){if(jw)return Zd;jw=1;const c=Ze();return Zd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Zd}var Xd,qw;function F5(){if(qw)return Xd;qw=1;const c=Ze();return Xd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Xd}var Yd,Qw;function _5(){return Qw||(Qw=1,Yd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Yd}var Hd,Vw;function B5(){if(Vw)return Hd;Vw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Hd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Hd}var Kd,Uw;function L5(){if(Uw)return Kd;Uw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Kd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Kd}var Jd,Ww;function N5(){if(Ww)return Jd;Ww=1;const c=Ze();return Jd={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},Jd}var em,Gw;function M5(){if(Gw)return em;Gw=1;const c=Ze();return em={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},em}var tm,zw;function $5(){if(zw)return tm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return tm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},tm}var rm,Zw;function j5(){if(Zw)return rm;Zw=1;const{isConstant:c}=Ze();return rm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},rm}var nm,Xw;function q5(){return Xw||(Xw=1,nm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),nm}var sm,Yw;function Q5(){return Yw||(Yw=1,sm={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),sm}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,V=33,Q=35,$=36,W=37,K=38,te=40,U=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Vt=66,tr=68,fe=70,Ue=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Ut=98,ir=99,Ot=100,Zt=102,pr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ve=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,U,be,ve,at,ht,dt]),Xn=new Set([K,V,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,U,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,V,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Vi(nt){return ws(nt)||bt(nt)}class Ui{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===U&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==V)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(V))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==U&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ue)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ve)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Vi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Ui(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Ui(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Ui,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var im,Kw;function V5(){if(Kw)return im;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return im={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},im}var am,Jw;function U5(){return Jw||(Jw=1,am={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),am}var om,ek;function W5(){return ek||(ek=1,om={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,tk;function G5(){return tk||(tk=1,lm={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),lm}var um,rk;function z5(){return rk||(rk=1,um={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),um}var cm,nk;function Z5(){if(nk)return cm;nk=1;const c=Ze();return cm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},cm}var fm,sk;function X5(){if(sk)return fm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return fm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},fm}var pm,ik;function Y5(){if(ik)return pm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return pm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},pm}var hm,ak;function H5(){if(ak)return hm;ak=1;const c=Ze();return hm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},hm}var dm,ok;function K5(){if(ok)return dm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return dm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},dm}var mm,lk;function Oo(){if(lk)return mm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return mm=s,mm}var gm,uk;function J5(){if(uk)return gm;uk=1;const c=Ze(),s=Oo();return gm={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),V=p.getTokenBefore(G);if(V.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===V.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},gm}var ym,ck;function ej(){if(ck)return ym;ck=1;const c=Ze();return ym={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},ym}var bm,fk;function tj(){if(fk)return bm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return bm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},bm}var vm,pk;function rj(){if(pk)return vm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return vm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},vm}var xm,hk;function nj(){if(hk)return xm;hk=1;const c=Ze();return xm={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},xm}var Om,dk;function sj(){return dk||(dk=1,Om={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Om}var Sm,mk;function ij(){return mk||(mk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Sm}var Em,gk;function aj(){if(gk)return Em;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Em={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Em}var Cm,yk;function oj(){if(yk)return Cm;yk=1;const c=Ze();return Cm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},Cm}var wm,bk;function lj(){if(bk)return wm;bk=1;const c=Ze();return wm={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},wm}var km,vk;function uj(){if(vk)return km;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return km={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},km}var Am,xk;function cj(){if(xk)return Am;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ue||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function V(fe){for(let Ue=fe;Ue;Ue=Ue.parent)if(Ue.type==="ReturnStatement"||Ue.type==="ArrowFunctionExpression"&&Ue.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ue=p.getLastToken(fe),mt=p.getTokenBefore(Ue);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ue)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ue.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ue.range[1],mt.range[0]);return Bt.replaceTextRange([Ue.range[0],mt.range[1]],(te(fe)?" ":"")+se+(U(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ue=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ue=Ue.object,mt=Ue.type;return mt==="CallExpression"}function Be(fe){const Ue=fe.callee;j(Ue,d(fe))&&(L(Ue)||!(ae(fe)||Ue.type==="NewExpression"&&!Q(Ue)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ue.type==="MemberExpression"&&pe(Ue)||!fe.optional&&Ue.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ue=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ue||mt===Ue&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ue||Pt===Ue&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ue=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ue,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ue)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ue){const mt=[fe];let Pt=fe;for(;Pt!==Ue;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ue){return Se(Ue,fe).reverse()}function Me(fe,Ue){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ue);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ue);case"MemberExpression":return fe.computed&&fe.property===Ue;case"ConditionalExpression":return fe.consequent===Ue;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ue,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ue),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ue=>Ue.node===fe)}function qt(fe){T.reports=T.reports.filter(Ue=>Ue.node!==fe)}function Vt(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Vt(fe.parent):!1}function tr({left:fe,operator:Ue,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ue)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ue=>Ue&&j(Ue,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ue=>z(Ue)&&I(Ue)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ue=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ue);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ue)&&a.add(Ue),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ue=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ue.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ue.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ue.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&a.add(Ue)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ue=>{const mt=we(fe,Ue);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ue=>Ue.value&&j(Ue.value,k)).forEach(Ue=>ne(Ue.value))},ObjectPattern(fe){fe.properties.filter(Ue=>{const mt=Ue.value;return z(mt)&&I(mt)}).forEach(Ue=>ne(Ue.value))},Property(fe){if(fe.computed){const{key:Ue}=fe;Ue&&j(Ue,k)&&ne(Ue)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ue=fe.argument;z(Ue)&&I(Ue)&&ne(Ue)},ReturnStatement(fe){const Ue=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ue,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ue=d(fe);fe.expressions.filter(mt=>j(mt,Ue)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ue=p.getFirstToken(fe);K(Ue,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ue}=fe,mt=p.getLastToken(fe);Ue.loc.end.line===mt.loc.start.line?ce(fe):L(Ue)&&ne(Ue)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ue=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ue,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ue=>Ue&&I(Ue)).forEach(ne)},AssignmentPattern(fe){const{left:Ue,right:mt}=fe;z(Ue)&&I(Ue)&&ne(Ue),mt&&j(mt,k)&&ne(mt)}}}},Tm}var Dm,Ek;function hj(){if(Ek)return Dm;Ek=1;const c=Oo(),s=Ze();return Dm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Dm}var Im,Ck;function dj(){if(Ck)return Im;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Im={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Im}var Rm,wk;function mj(){if(wk)return Rm;wk=1;const c=Ze();return Rm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Rm}var Fm,kk;function gj(){if(kk)return Fm;kk=1;const c=Ze();return Fm={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},Fm}var _m,Ak;function yj(){return Ak||(Ak=1,_m={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),_m}var Bm,Pk;function bj(){if(Pk)return Bm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Bm}var Lm,Tk;function vj(){return Tk||(Tk=1,Lm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Lm}var Nm,Dk;function xj(){if(Dk)return Nm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Nm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Nm}var Mm,Ik;function Oj(){if(Ik)return Mm;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return Mm={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},Mm}var $m,Rk;function Sj(){if(Rk)return $m;Rk=1;const c=Ze();return $m={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},$m}var jm,Fk;function Ej(){if(Fk)return jm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return jm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},jm}var qm,_k;function Cj(){if(_k)return qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},qm}var Qm,Bk;function wj(){if(Bk)return Qm;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Qm={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Qm}var Vm,Lk;function kj(){if(Lk)return Vm;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Vm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const V=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:V,column:Q.index},end:{line:V,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let V=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],V+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),V=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Vm}var Um,Nk;function Aj(){if(Nk)return Um;Nk=1;const{getStaticPropertyName:c}=Ze();return Um={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Um}var Wm,Mk;function Pj(){if(Mk)return Wm;Mk=1;const c=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Wm}var Gm,$k;function Tj(){if($k)return Gm;$k=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},Gm}var zm,jk;function Dj(){return jk||(jk=1,zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),zm}var Zm,qk;function Ij(){return qk||(qk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Zm}var Xm,Qk;function Rj(){if(Qk)return Xm;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Xm={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Xm}var Ym,Vk;function Fj(){return Vk||(Vk=1,Ym={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Ym}var Hm,Uk;function _j(){if(Uk)return Hm;Uk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Hm={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),Jm}var eg,zk;function Nj(){return zk||(zk=1,eg=function(s){return s>=127462&&s<=127487}),eg}var tg,Zk;function Mj(){return Zk||(Zk=1,tg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),tg}var rg,Xk;function $j(){if(Xk)return rg;Xk=1;const c=Bj(),s=Lj(),u=Nj(),p=Mj();return rg={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},rg}var ng,Yk;function sg(){if(Yk)return ng;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return ng={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},ng}var ig,Hk;function jj(){if(Hk)return ig;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ig={parseStringLiteral:o,parseTemplateToken:y},ig}var ag,Kk;function qj(){if(Kk)return ag;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=$j(),x=Ze(),{isValidWithUnicodeFlag:g}=sg(),{parseStringLiteral:f,parseTemplateToken:b}=jj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,V=I[j].end,Q=N.slice(G,V);return R(P,Q)}return ag={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var V;const N=(V=P.options[0])==null?void 0:V.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let U=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return U??(U=f(ce)),F(ne,ce,U)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return U??(U=b(ce)),F(ne,ce,U)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];U??(U=b(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];U??(U=f(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,U;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),U=a(z,$);else{if(ue.regex)continue;te=String(ue.value),U=""}typeof U=="string"&&G(ae,te,U,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},ag}var og,Jk;function Qj(){if(Jk)return og;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return og={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},og}var lg,eA;function Vj(){return eA||(eA=1,lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),lg}var ug,tA;function Uj(){return tA||(tA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),ug}var cg,rA;function Wj(){return rA||(rA=1,cg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),cg}var fg,nA;function Gj(){if(nA)return fg;nA=1;const c=Ze();return fg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},fg}var pg,sA;function zj(){if(sA)return pg;sA=1;const c=Ze();return pg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},pg}var hg,iA;function Zj(){return iA||(iA=1,hg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),hg}var dg,aA;function Xj(){return aA||(aA=1,dg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),dg}var mg,oA;function Yj(){return oA||(oA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),mg}var gg,lA;function Hj(){return lA||(lA=1,gg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),gg}var yg,uA;function Kj(){return uA||(uA=1,yg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),yg}var bg,cA;function Jj(){return cA||(cA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),bg}var vg,fA;function eq(){if(fA)return vg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},vg}var xg,pA;function tq(){if(pA)return xg;pA=1;const c=["Symbol","BigInt"];return xg={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},xg}var Og,hA;function rq(){if(hA)return Og;hA=1;const c=Ze();return Og={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Og}var Sg,dA;function nq(){return dA||(dA=1,Sg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Sg}var Eg,mA;function sq(){return mA||(mA=1,Eg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Eg}var Cg,gA;function iq(){if(gA)return Cg;gA=1;const{getVariableByName:c}=Ze();return Cg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},Cg}var wg,yA;function aq(){if(yA)return wg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return wg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},wg}var kg,bA;function oq(){if(bA)return kg;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return kg={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},kg}var Ag,vA;function lq(){if(vA)return Ag;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Ag={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Ag}var Pg,xA;function uq(){return xA||(xA=1,Pg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Pg}var Tg,OA;function cq(){return OA||(OA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Tg}var Dg,SA;function fq(){if(SA)return Dg;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Dg={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Dg}var Ig,EA;function pq(){return EA||(EA=1,Ig={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Ig}var Rg,CA;function hq(){if(CA)return Rg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Rg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Rg}var Fg,wA;function dq(){return wA||(wA=1,Fg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),Fg}var _g,kA;function mq(){return kA||(kA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),_g}var Bg,AA;function gq(){if(AA)return Bg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Bg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Bg}var Lg,PA;function yq(){if(PA)return Lg;PA=1;const{getStaticPropertyName:c}=Ze();return Lg={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Lg}var Ng,TA;function bq(){if(TA)return Ng;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Ng={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Ng}var Mg,DA;function vq(){if(DA)return Mg;DA=1;const c=Ze();return Mg={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},Mg}var $g,IA;function xq(){if(IA)return $g;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return $g={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},$g}var jg,RA;function Oq(){if(RA)return jg;RA=1;const c=Ze();return jg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},jg}var qg,FA;function Sq(){return FA||(FA=1,qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),qg}var Qg,_A;function BA(){if(_A)return Qg;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,U)=>Object.defineProperty(K,te,{value:U}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,U,ae)=>U.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,U)=>te+6{const ae=U.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,U,ae,z)=>te===p?`\\[${U}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(U)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let U=T[K];return U||(U=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=U),te?new RegExp(U,"i"):new RegExp(U)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,U,ae,z){this.origin=te,this.pattern=U,this.negative=ae,this.regex=z}}const L=(K,te)=>{const U=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(U,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,U)=>F(K)?K?G.isNotRelative(K)?U(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:U("path must not be empty",TypeError):U(`path must be a string, but got \`${te}\``,TypeError),V=K=>y.test(K);G.isNotRelative=V,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:U=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=U,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const U=L(te,this._ignoreCase);this._added=!0,this._rules.push(U)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,U){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!U)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,U,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,U,ae,z)}_t(te,U,ae,z){if(te in U)return U[te];if(z||(z=te.split(O)),z.pop(),!z.length)return U[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,U,ae,z);return U[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Qg=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=U=>/^\\\\\?\\/.test(U)||/["<>|\u0000-\u001F]+/u.test(U)?U:U.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=U=>te.test(U)||V(U)}return Qg}var Vg,LA;function Eq(){if(LA)return Vg;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Vg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Vg}var Ug,NA;function Cq(){if(NA)return Ug;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Ug}var Wg,MA;function wq(){if(MA)return Wg;MA=1;const c=Ze();return Wg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Wg}var Gg,$A;function kq(){return $A||($A=1,Gg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),Gg}var zg,jA;function Aq(){if(jA)return zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},zg}var Zg,qA;function Pq(){if(qA)return Zg;qA=1;const c=Ze();return Zg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Zg}var Xg,QA;function Tq(){if(QA)return Xg;QA=1;const c=Ze();return Xg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Xg}var Yg,VA;function Dq(){if(VA)return Yg;VA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Hg}var Kg,WA;function Rq(){if(WA)return Kg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Kg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Kg}var Jg,GA;function Fq(){if(GA)return Jg;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return Jg={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},Jg}var e0,zA;function _q(){if(zA)return e0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return e0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,V=>u.has(V.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},e0}var t0,ZA;function Bq(){if(ZA)return t0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return t0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},t0}var r0,XA;function Lq(){return XA||(XA=1,r0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},i0}var a0,JA;function jq(){return JA||(JA=1,a0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),a0}var o0,eP;function qq(){return eP||(eP=1,o0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),o0}var l0,tP;function Qq(){if(tP)return l0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return l0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},l0}var u0,rP;function Vq(){if(rP)return u0;rP=1;const c=Ze();return u0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},u0}var c0,nP;function Uq(){if(nP)return c0;nP=1;const c=Ze();return c0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&V{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},f0}var p0,iP;function Gq(){if(iP)return p0;iP=1;const c=Ze();return p0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},p0}var h0,aP;function zq(){return aP||(aP=1,h0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),h0}var d0,oP;function Zq(){return oP||(oP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let V=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(V.type);)V=V.parent;f(G)&&!S(G)&&!g(G)&&!(y&&V.type==="ArrayPattern")&&!(O&&V.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),d0}var m0,lP;function Xq(){if(lP)return m0;lP=1;const c=Ze();return m0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},m0}var g0,uP;function Yq(){if(uP)return g0;uP=1;const c=ep(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},g0}var y0,cP;function Hq(){if(cP)return y0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return y0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return b0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},b0}var v0,pP;function Jq(){if(pP)return v0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return v0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},v0}var x0,hP;function e6(){if(hP)return x0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return x0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},x0}var O0,dP;function t6(){if(dP)return O0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return O0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},O0}var S0,mP;function r6(){if(mP)return S0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return S0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},S0}var E0,gP;function n6(){if(gP)return E0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return E0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},C0}var w0,bP;function i6(){return bP||(bP=1,w0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),w0}var k0,vP;function a6(){if(vP)return k0;vP=1;const c=Ze();return k0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(V){if(a.destructuredArrayIgnorePattern&&V.name.parent.type==="ArrayPattern")return"array-destructure";switch(V.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(V){let Q,$;switch(V){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${V}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"defined",additional:$}}function y(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"assigned a value",additional:$}}function O(V,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:V.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(V){const Q=V.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(V){return V.type==="Property"&&V.parent.type==="ObjectPattern"&&p.test(V.parent.properties.at(-1).type)}function b(V){if(a.ignoreRestSiblings){const Q=V.defs.some(W=>f(W.name.parent)),$=V.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(V){return V.isRead()}function E(V,Q){let $=V.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(V){const Q=[];return V.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(V,Q){return V.range[0]>=Q.range[0]&&V.range[1]<=Q.range[1]}function T(V){const Q=V.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===V?T(Q):!0:!1}function R(V,Q){const $=V.identifier,W=$.parent,K=V.from.variableScope,te=V.resolved.scope.variableScope,U=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!U?W.right:null}function F(V,Q){let $=V,W=V.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(V,Q){const $=c.getUpperFunction(V);return $&&D($,Q)&&F($,Q)}function N(V,Q){const $=V.identifier,W=$.parent;return V.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(V){let Q=V.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(V){if(V.eslintUsed)return!0;const Q=k(V),$=Q.length>0;let W=null;return V.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(V){const Q=V.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(V)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(V,Q){const $=V.variables,W=V.childScopes;let K,te;if(V.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(U))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"variable")});continue}}!L(U)&&!g(U)&&!b(U)&&Q.push(U)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let U;te.length>0&&(U=te.at(-1)),s.report({node:U?U.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:V,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},k0}var A0,xP;function o6(){if(xP)return A0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return A0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},P0}var T0,SP;function u6(){if(SP)return T0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return T0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const V=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=V.length-1;do Q--,$--;while(T[Q]===V[$]);const W=$+1,K=V.slice(0,W),te=V.slice(W),U=te.find(o),ae=U&&U.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},T0}var D0,EP;function c6(){if(EP)return D0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return D0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},D0}var I0,CP;function f6(){return CP||(CP=1,I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),I0}var R0,wP;function p6(){if(wP)return R0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},R0}var F0,kP;function h6(){if(kP)return F0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},F0}var _0,AP;function d6(){if(AP)return _0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return B0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const V=P[0];if(I==="^"&&V.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!V.negate||V.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},L0}var N0,DP;function y6(){if(DP)return N0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return N0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},N0}var M0,IP;function b6(){if(IP)return M0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return M0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},M0}var $0,RP;function v6(){return RP||(RP=1,$0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),$0}var j0,FP;function x6(){if(FP)return j0;FP=1;const c=zl(),s=Ze(),u=40;return j0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},j0}var q0,_P;function O6(){if(_P)return q0;_P=1;const c=Ze();return q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},q0}var Q0,BP;function S6(){return BP||(BP=1,Q0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),Q0}var V0,LP;function E6(){if(LP)return V0;LP=1;const c={enum:["beside","below","any"]};return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},V0}var U0,NP;function C6(){if(NP)return U0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return U0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},U0}var W0,MP;function w6(){if(MP)return W0;MP=1;const c=Ze();return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},W0}var G0,$P;function k6(){return $P||($P=1,G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+U;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${U}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function V(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":V,"FunctionDeclaration:exit":V,"FunctionExpression:exit":V,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},z0}var Z0,qP;function P6(){if(qP)return Z0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return Z0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!V||G.required&&V?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(V=>V.range[0]===I.parent.range[0]),G=L[j-1];return V=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(V.replaceText($,",")):W.push(V.insertTextAfter($,",")),W.push(V.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const V=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(V.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(V.loc.start.line>G.loc.end.line||V.type==="Line"||V.type==="Block"){let $=V;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),V=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&V&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},Z0}var X0,QP;function T6(){return QP||(QP=1,X0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),X0}var Y0,VP;function D6(){if(VP)return Y0;VP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return Y0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},Y0}var H0,UP;function I6(){if(UP)return H0;UP=1;const c=Ze();return H0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},H0}var K0,WP;function R6(){if(WP)return K0;WP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},K0}var J0,GP;function F6(){if(GP)return J0;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),U=j(K,Q);te.verify(D,K,Q,U)}F.prevNode=Q}function V(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:V,"SwitchCase:exit":N}}},J0}var ey,zP;function _6(){if(zP)return ey;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ey={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ey}var ty,ZP;function B6(){if(ZP)return ty;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EV.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const V=L.declarations[0];if(V.init){const Q=V.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(V=>V.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let V=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?V+=Q.id.properties.length:Q.id.type==="ArrayPattern"?V+=Q.id.elements.length:V+=1}),G=G&&T===V}I.forEach(V=>{f.report({node:V,messageId:"useConst",data:V,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ty}var ry,XP;function L6(){if(XP)return ry;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ry={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ry}var ny,YP;function N6(){if(YP)return ny;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return ny={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},ny}var sy,HP;function M6(){if(HP)return sy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return sy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},sy}var iy,KP;function $6(){if(KP)return iy;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return iy={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},iy}var ay,JP;function j6(){if(JP)return ay;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return ay={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},ay}var oy,eT;function q6(){if(eT)return oy;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const V=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),V[1]),L.range[1]];yield T.removeRange(V),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return oy={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},oy}var ly,tT;function Q6(){if(tT)return ly;tT=1;const c=Ze();return ly={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},ly}var uy,rT;function V6(){return rT||(rT=1,uy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),uy}var cy,nT;function U6(){if(nT)return cy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=sg();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return cy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function V($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:U}of K.iterateGlobalReferences(te))if(b&&F(U)){const ae=U.arguments[0];if(U.arguments.length===2){const z=[],ue=D(U.arguments[1])||"";V(U,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&V(U,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:U,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(U,Q(U,`/${Be}/${pe}`))}}))})}else{const z=[];V(U,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:U,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(U,Q(U,ue))}}))})}}else if(R(U)){let ae=D(U.arguments[0]),z=!1,ue;if(U.arguments[1]&&(ue=D(U.arguments[1])),V(U,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},hy}var dy,oT;function Z6(){if(oT)return dy;oT=1;const c=Al(),s=Ze(),u=Uh();return dy={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},dy}var my,lT;function X6(){if(lT)return my;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return my={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},my}var gy,uT;function Y6(){if(uT)return gy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return gy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},gy}var yy,cT;function H6(){if(cT)return yy;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return yy={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},yy}var by,fT;function K6(){if(fT)return by;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return by={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},by}var vy,pT;function J6(){if(pT)return vy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=sg();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return vy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},vy}var xy,hT;function e8(){return hT||(hT=1,xy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),xy}var Oy,dT;function t8(){return dT||(dT=1,Oy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Oy}var Sy,mT;function r8(){if(mT)return Sy;mT=1;const c=Oo(),s=Ze();return Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,V,Q;L?(G="extraSemi",Q=j.loc,V=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},V=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:V})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),V=j||G;L&&V?g(I,!0):!L&&!V&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Sy}var Ey,gT;function n8(){if(gT)return Ey;gT=1;const c=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Ey}var Cy,yT;function s8(){if(yT)return Cy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},Cy}var wy,bT;function i8(){return bT||(bT=1,wy={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),wy}var ky={exports:{}},vT;function a8(){if(vT)return ky.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Py}var Ty,ST;function u8(){if(ST)return Ty;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Ty={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Ty}var Dy,ET;function c8(){if(ET)return Dy;ET=1;const c=Ze();return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Dy}var Iy,CT;function f8(){if(CT)return Iy;CT=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Iy}var Ry,wT;function p8(){if(wT)return Ry;wT=1;const{isEqToken:c}=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Ry}var Fy,kT;function h8(){if(kT)return Fy;kT=1;const c=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},Fy}var _y,AT;function d8(){if(AT)return _y;AT=1;const c=zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return _y={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},_y}var By,PT;function m8(){if(PT)return By;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},By}var Ly,TT;function g8(){if(TT)return Ly;TT=1;const c=Ze();return Ly={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ly}var Ny,DT;function y8(){if(DT)return Ny;DT=1;const c=Ze();return Ny={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},Ny}var My,IT;function b8(){if(IT)return My;IT=1;const c=Ze();return My={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},My}var $y,RT;function v8(){return RT||(RT=1,$y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),$y}var jy,FT;function x8(){return FT||(FT=1,jy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),jy}var qy,_T;function O8(){if(_T)return qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},qy}var Qy,BT;function S8(){if(BT)return Qy;BT=1;const c=Ze();return Qy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Qy}var Vy,LT;function E8(){return LT||(LT=1,Vy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Wy}var Gy,$T;function k8(){return $T||($T=1,Gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),Gy}var zy,jT;function A8(){if(jT)return zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,V=>V.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},zy}var Zy,qT;function QT(){if(qT)return Zy;qT=1;const{LazyLoadingRuleMap:c}=K$();return Zy=new c(Object.entries({"accessor-pairs":()=>t3(),"array-bracket-newline":()=>r3(),"array-bracket-spacing":()=>n3(),"array-callback-return":()=>s3(),"array-element-newline":()=>i3(),"arrow-body-style":()=>a3(),"arrow-parens":()=>o3(),"arrow-spacing":()=>l3(),"block-scoped-var":()=>u3(),"block-spacing":()=>c3(),"brace-style":()=>f3(),"callback-return":()=>p3(),camelcase:()=>h3(),"capitalized-comments":()=>d3(),"class-methods-use-this":()=>m3(),"comma-dangle":()=>g3(),"comma-spacing":()=>y3(),"comma-style":()=>b3(),complexity:()=>v3(),"computed-property-spacing":()=>x3(),"consistent-return":()=>O3(),"consistent-this":()=>S3(),"constructor-super":()=>E3(),curly:()=>C3(),"default-case":()=>w3(),"default-case-last":()=>k3(),"default-param-last":()=>A3(),"dot-location":()=>P3(),"dot-notation":()=>T3(),"eol-last":()=>D3(),eqeqeq:()=>I3(),"for-direction":()=>R3(),"func-call-spacing":()=>F3(),"func-name-matching":()=>_3(),"func-names":()=>B3(),"func-style":()=>L3(),"function-call-argument-newline":()=>N3(),"function-paren-newline":()=>M3(),"generator-star-spacing":()=>$3(),"getter-return":()=>j3(),"global-require":()=>q3(),"grouped-accessor-pairs":()=>Q3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>U3(),"id-blacklist":()=>W3(),"id-denylist":()=>G3(),"id-length":()=>z3(),"id-match":()=>Z3(),"implicit-arrow-linebreak":()=>X3(),indent:()=>Y3(),"indent-legacy":()=>H3(),"init-declarations":()=>K3(),"jsx-quotes":()=>J3(),"key-spacing":()=>e5(),"keyword-spacing":()=>t5(),"line-comment-position":()=>r5(),"linebreak-style":()=>n5(),"lines-around-comment":()=>s5(),"lines-around-directive":()=>i5(),"lines-between-class-members":()=>a5(),"logical-assignment-operators":()=>o5(),"max-classes-per-file":()=>l5(),"max-depth":()=>u5(),"max-len":()=>c5(),"max-lines":()=>f5(),"max-lines-per-function":()=>p5(),"max-nested-callbacks":()=>h5(),"max-params":()=>d5(),"max-statements":()=>m5(),"max-statements-per-line":()=>g5(),"multiline-comment-style":()=>y5(),"multiline-ternary":()=>b5(),"new-cap":()=>v5(),"new-parens":()=>x5(),"newline-after-var":()=>O5(),"newline-before-return":()=>S5(),"newline-per-chained-call":()=>E5(),"no-alert":()=>C5(),"no-array-constructor":()=>w5(),"no-async-promise-executor":()=>k5(),"no-await-in-loop":()=>A5(),"no-bitwise":()=>P5(),"no-buffer-constructor":()=>T5(),"no-caller":()=>D5(),"no-case-declarations":()=>I5(),"no-catch-shadow":()=>R5(),"no-class-assign":()=>F5(),"no-compare-neg-zero":()=>_5(),"no-cond-assign":()=>B5(),"no-confusing-arrow":()=>L5(),"no-console":()=>N5(),"no-const-assign":()=>M5(),"no-constant-binary-expression":()=>$5(),"no-constant-condition":()=>j5(),"no-constructor-return":()=>q5(),"no-continue":()=>Q5(),"no-control-regex":()=>V5(),"no-debugger":()=>U5(),"no-delete-var":()=>W5(),"no-div-regex":()=>G5(),"no-dupe-args":()=>z5(),"no-dupe-class-members":()=>Z5(),"no-dupe-else-if":()=>X5(),"no-dupe-keys":()=>Y5(),"no-duplicate-case":()=>H5(),"no-duplicate-imports":()=>K5(),"no-else-return":()=>J5(),"no-empty":()=>ej(),"no-empty-character-class":()=>tj(),"no-empty-function":()=>rj(),"no-empty-pattern":()=>nj(),"no-empty-static-block":()=>sj(),"no-eq-null":()=>ij(),"no-eval":()=>aj(),"no-ex-assign":()=>oj(),"no-extend-native":()=>lj(),"no-extra-bind":()=>uj(),"no-extra-boolean-cast":()=>cj(),"no-extra-label":()=>fj(),"no-extra-parens":()=>pj(),"no-extra-semi":()=>hj(),"no-fallthrough":()=>dj(),"no-floating-decimal":()=>mj(),"no-func-assign":()=>gj(),"no-global-assign":()=>yj(),"no-implicit-coercion":()=>bj(),"no-implicit-globals":()=>vj(),"no-implied-eval":()=>xj(),"no-import-assign":()=>Oj(),"no-inline-comments":()=>Sj(),"no-inner-declarations":()=>Ej(),"no-invalid-regexp":()=>Cj(),"no-invalid-this":()=>wj(),"no-irregular-whitespace":()=>kj(),"no-iterator":()=>Aj(),"no-label-var":()=>Pj(),"no-labels":()=>Tj(),"no-lone-blocks":()=>Dj(),"no-lonely-if":()=>Ij(),"no-loop-func":()=>Rj(),"no-loss-of-precision":()=>Fj(),"no-magic-numbers":()=>_j(),"no-misleading-character-class":()=>qj(),"no-mixed-operators":()=>Qj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Uj(),"no-multi-assign":()=>Wj(),"no-multi-spaces":()=>Gj(),"no-multi-str":()=>zj(),"no-multiple-empty-lines":()=>Zj(),"no-native-reassign":()=>Xj(),"no-negated-condition":()=>Yj(),"no-negated-in-lhs":()=>Hj(),"no-nested-ternary":()=>Kj(),"no-new":()=>Jj(),"no-new-func":()=>eq(),"no-new-native-nonconstructor":()=>tq(),"no-new-object":()=>rq(),"no-new-require":()=>nq(),"no-new-symbol":()=>sq(),"no-new-wrappers":()=>iq(),"no-nonoctal-decimal-escape":()=>aq(),"no-obj-calls":()=>oq(),"no-object-constructor":()=>lq(),"no-octal":()=>uq(),"no-octal-escape":()=>cq(),"no-param-reassign":()=>fq(),"no-path-concat":()=>pq(),"no-plusplus":()=>hq(),"no-process-env":()=>dq(),"no-process-exit":()=>mq(),"no-promise-executor-return":()=>gq(),"no-proto":()=>yq(),"no-prototype-builtins":()=>bq(),"no-redeclare":()=>vq(),"no-regex-spaces":()=>xq(),"no-restricted-exports":()=>Oq(),"no-restricted-globals":()=>Sq(),"no-restricted-imports":()=>Eq(),"no-restricted-modules":()=>Cq(),"no-restricted-properties":()=>wq(),"no-restricted-syntax":()=>kq(),"no-return-assign":()=>Aq(),"no-return-await":()=>Pq(),"no-script-url":()=>Tq(),"no-self-assign":()=>Dq(),"no-self-compare":()=>Iq(),"no-sequences":()=>Rq(),"no-setter-return":()=>Fq(),"no-shadow":()=>_q(),"no-shadow-restricted-names":()=>Bq(),"no-spaced-func":()=>Lq(),"no-sparse-arrays":()=>Nq(),"no-sync":()=>Mq(),"no-tabs":()=>$q(),"no-template-curly-in-string":()=>jq(),"no-ternary":()=>qq(),"no-this-before-super":()=>Qq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Uq(),"no-undef":()=>Wq(),"no-undef-init":()=>Gq(),"no-undefined":()=>zq(),"no-underscore-dangle":()=>Zq(),"no-unexpected-multiline":()=>Xq(),"no-unmodified-loop-condition":()=>Yq(),"no-unneeded-ternary":()=>Hq(),"no-unreachable":()=>Kq(),"no-unreachable-loop":()=>Jq(),"no-unsafe-finally":()=>e6(),"no-unsafe-negation":()=>t6(),"no-unsafe-optional-chaining":()=>r6(),"no-unused-expressions":()=>n6(),"no-unused-labels":()=>s6(),"no-unused-private-class-members":()=>i6(),"no-unused-vars":()=>a6(),"no-use-before-define":()=>o6(),"no-useless-assignment":()=>l6(),"no-useless-backreference":()=>u6(),"no-useless-call":()=>c6(),"no-useless-catch":()=>f6(),"no-useless-computed-key":()=>p6(),"no-useless-concat":()=>h6(),"no-useless-constructor":()=>d6(),"no-useless-escape":()=>m6(),"no-useless-rename":()=>g6(),"no-useless-return":()=>y6(),"no-var":()=>b6(),"no-void":()=>v6(),"no-warning-comments":()=>x6(),"no-whitespace-before-property":()=>O6(),"no-with":()=>S6(),"nonblock-statement-body-position":()=>E6(),"object-curly-newline":()=>C6(),"object-curly-spacing":()=>w6(),"object-property-newline":()=>k6(),"object-shorthand":()=>A6(),"one-var":()=>P6(),"one-var-declaration-per-line":()=>T6(),"operator-assignment":()=>D6(),"operator-linebreak":()=>I6(),"padded-blocks":()=>R6(),"padding-line-between-statements":()=>F6(),"prefer-arrow-callback":()=>_6(),"prefer-const":()=>B6(),"prefer-destructuring":()=>L6(),"prefer-exponentiation-operator":()=>N6(),"prefer-named-capture-group":()=>M6(),"prefer-numeric-literals":()=>$6(),"prefer-object-has-own":()=>j6(),"prefer-object-spread":()=>q6(),"prefer-promise-reject-errors":()=>Q6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>U6(),"prefer-rest-params":()=>W6(),"prefer-spread":()=>G6(),"prefer-template":()=>z6(),"quote-props":()=>Z6(),quotes:()=>X6(),radix:()=>Y6(),"require-atomic-updates":()=>H6(),"require-await":()=>K6(),"require-unicode-regexp":()=>J6(),"require-yield":()=>e8(),"rest-spread-spacing":()=>t8(),semi:()=>r8(),"semi-spacing":()=>n8(),"semi-style":()=>s8(),"sort-imports":()=>i8(),"sort-keys":()=>o8(),"sort-vars":()=>l8(),"space-before-blocks":()=>u8(),"space-before-function-paren":()=>c8(),"space-in-parens":()=>f8(),"space-infix-ops":()=>p8(),"space-unary-ops":()=>h8(),"spaced-comment":()=>d8(),strict:()=>m8(),"switch-colon-spacing":()=>g8(),"symbol-description":()=>y8(),"template-curly-spacing":()=>b8(),"template-tag-spacing":()=>v8(),"unicode-bom":()=>x8(),"use-isnan":()=>O8(),"valid-typeof":()=>S8(),"vars-on-top":()=>E8(),"wrap-iife":()=>C8(),"wrap-regex":()=>w8(),"yield-star-spacing":()=>k8(),yoda:()=>A8()})),Zy}var Xy,VT;function P8(){if(VT)return Xy;VT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,H$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Xy=s,Xy}var Yy,UT;function T8(){if(UT)return Yy;UT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Yy=a,Yy}var Hy,WT;function GT(){if(WT)return Hy;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Hy={startTime:c,endTime:s},Hy}var Ky,zT;function D8(){if(zT)return Ky;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Ky=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Ky}var I8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:I8},Jy,XT;function YT(){if(XT)return Jy;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return Jy={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},Jy}var eb={},tb={},rb,HT;function R8(){if(HT)return rb;HT=1,rb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return nb}var sb,JT;function _8(){if(JT)return sb;JT=1;var c=R8(),s=F8();sb=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],V;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,U=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}V.push(ue)}}else V=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var V="",Q=!!G.nocase,$=!1,W=[],K=[],te,U=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":V+=d,Q=!0;break;case"?":V+=a,Q=!0;break;default:V+="\\"+te;break}ne.debug("clearStateChar %j %j",te,V),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=V.slice(0,pt.reStart),qt=V.slice(pt.reStart,pt.reEnd-8),Vt=V.slice(pt.reEnd-8,pt.reEnd),tr=V.slice(pt.reEnd);Vt+=tr;var fe=kt.split("(").length-1,Ue=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var V=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=U===te,this.debug("string match",te,U,ne)):(ne=U.match(te),this.debug("pattern match",te,U,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ib}var So={},tD;function L8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=B8(),p=$i(),a=L8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function V(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function U(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,U(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await V(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(tb)),tb}var ab,sD;function iD(){if(sD)return ab;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ab={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ab}var ob,aD;function lb(){if(aD)return ob;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(V){return typeof V=="object"&&V!==null}function p(V){return u(V)&&!Array.isArray(V)}function a(V){return typeof V>"u"}function d(V,Q,$=new Map){let W=$.get(V);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(V,W);const K={...V,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(V,te))continue;const U=V[te],ae=Q[te];p(U)&&p(ae)?K[te]=d(U,ae,$):a(ae)&&(K[te]=U)}return K}function v(V){const Q=Array.isArray(V)?V.slice(0):[V];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(V){for(const Q of Object.keys(V))if(typeof V[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(V,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(V,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(V,Q){if(typeof s.get(Q)>"u")throw new O(V,Q)}function g(V){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(V))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${V}".`)}function f(V){if(!u(V))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(V,Q){const $=Q===void 0?V:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(V){if(!(k.has(V)||typeof V=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(V={},Q={}){return d(V,Q)},validate:"object"},R={merge(V={},Q={}){const $=d(V,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??V[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(V={},Q={}){const $=new Set([...Object.keys(V),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in V&&K in Q&&V[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||V[K]}return W},validate(V){if(V===null||typeof V!="object")throw new TypeError("Expected an object.");if(Array.isArray(V))throw new S(V);for(const Q of Object.keys(V))if(Q!=="__proto__"&&(V[Q]===null||typeof V[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(V){if(typeof V=="string")g(V);else if(V&&typeof V=="object"){if(typeof V.preprocess!="function"||typeof V.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(V={},Q={}){const $={...V,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in V)||!(W in Q))continue;const K=v(V[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(V){f(V);for(const Q of Object.keys(V)){if(Q==="__proto__")continue;const $=V[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(V){return{merge:"replace",validate(){throw new b(V)}}}return ob={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(V=>[V,L(V)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},ob}var ub={},cb,oD;function N8(){if(oD)return cb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return cb={validateLanguageOptions:o},cb}var fb,lD;function uD(){if(lD)return fb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=Gl(),p=$c(),a=wl(),{validateLanguageOptions:d}=N8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return fb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},fb}var cD;function M8(){if(cD)return ub;cD=1;const c=QT();return ub.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Al(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],ub}var pb={},$8="http://json-schema.org/draft-04/schema#",j8="http://json-schema.org/draft-04/schema#",q8="Core schema meta-schema",Q8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",U8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},W8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},G8={id:$8,$schema:j8,description:q8,definitions:Q8,type:V8,properties:U8,dependencies:W8,default:{}},hb,fD;function z8(){if(fD)return hb;fD=1;const c=f1(),s=G8;return hb=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},hb}var pD;function hD(){if(pD)return pb;pD=1;const s=z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return pb.RuleValidator=o,pb}var db,dD;function Z8(){var x,g;if(dD)return db;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=lb(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,db={Config:O},db}var mD;function X8(){if(mD)return eb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=lb(),{defaultConfig:p}=M8(),{Config:a}=Z8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return eb.FlatConfigArray=O,eb}var mb,gD;function Y8(){return gD||(gD=1,mb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),mb}var gb,yD;function bD(){if(yD)return gb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return gb={VFile:u},gb}var yb,vD;function H8(){if(vD)return yb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return yb={ParserService:c},yb}var bb={},xD;function K8(){if(xD)return bb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return bb.FileContext=c,bb}var vb,OD;function J8(){if(OD)return vb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return vb={ProcessorService:u},vb}var xb,SD;function e9(){var Ve,Sx,Oe,Ex;if(SD)return xb;SD=1;const c=ao,s=$c(),u=wl(),p=Al(),a=vL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=ep(),{SourceCode:O}=BE(),x=U$(),{ConfigCommentParser:g}=RE(),f=z$(),b=Y$(),S=P8(),E=gE(),k=T8(),D=D8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=X8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=lb(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:V,inactiveFlags:Q}=Y8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,U=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=H8(),{FileContext:pe}=K8(),{ProcessorService:Be}=J8(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(U.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=U.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,U.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(U.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=U.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Vt(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},U.parseListConfig(U.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ue(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ue(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Vt(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Ut(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Ut(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function pr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ve);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!V.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ve,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ve,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Vt(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},xb={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},xb}function t9(){return e9().Linter}var r9=l.Linter=t9();t.Linter=r9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(dH,hc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=bl.define(t);return[r,E_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const gH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class UI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",e.class]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[xX,ml.of([Rz]),mY(),vX(),fX(vY(new hc.Linter,{languageOptions:{globals:{...hH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),gH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class yH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class bH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(yH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Su="workshop-data-light@0.1.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Su+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Su+e,t(l.current)),l.persist=h=>localStorage.setItem(Su+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Su+e),l}class vH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Eu,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??X9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??J9,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const xH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(vH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var fl,na,Ma;class OH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new gV);or(this,"__module",Ds);An(this,fl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=C9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"is-data-mode":this.state.dataMode,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:n4}),zt("span",null,document.title)),zt("a",{innerHTML:e4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(UI,{class:"editor__code",ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(UI,{class:"editor__data",ref:this.ref("data"),content:this.store.data}),zt(bH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Eu,null,zt(Hs,{icon:Pb(this.state.dataMode,t=>t?r4:t4),label:Pb(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Hs,{icon:Y9,title:"Commencer un nouveau programme","event-click":t=>xH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),zt(Eu,null,zt(Eu,{compact:!0},zt(Hs,{icon:Pb(this.state.running,t=>t?K9:H9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames}),zt("hr",null),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,fl)),Cr(this,fl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await OV({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}fl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(OH,null)); diff --git a/assets/index-abf8352b.css b/assets/index-abf8352b.css new file mode 100644 index 0000000..88d2849 --- /dev/null +++ b/assets/index-abf8352b.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--body-font-family, inherit);font-size:var(--body-font-size, inherit);font-weight:var(--body-font-weight, inherit);font-style:var(--body-font-style, normal);font-synthesis:var(--body-font-synthesis, none);font-feature-settings:var(--body-font-feature-settings, initial);font-variant:var(--body-font-variant, none);font-kerning:var(--body-font-kerning, auto);line-height:var(--body-line-height, inherit);text-transform:var(--body-text-transform, none);text-underline-offset:var(--body-text-underline-offset, inherit);text-decoration-thickness:var(--body-text-decoration-thickness, from-font);word-spacing:var(--body-word-spacing, normal);letter-spacing:var(--body-letter-spacing, normal);font-variation-settings:var(--body-font-variation-settings, initial);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}a{color:inherit}::selection{color:var(--color-background);background:var(--color-dash)}:root{--gutter: 2rem;--gap: 1rem;--color-text: #222;--color-background: #e0e0e0;--color-dash: #454759;--ui-font-size: 1.4rem;--ui-line-height: 1.2;--ui-color-text: var(--color-background);--ui-color-text-dim: var(--color-text);--ui-color-background: #2d2f3f;--ui-color-background-dim: var(--color-background);--ui-color-accent: #bc93f9;--ui-color-accent-contrast: var(--color-text);--body-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--body-font-size: 1.67rem;--body-line-height: 1.3;--small-font-size: 1.4rem}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}[class^=ui-modal__content-]{color:var(--color-text)}[class^=ui-toolbar-] hr{border-left-color:var(--color-dash)}.readonly{pointer-events:none}.app{display:grid;grid-template:"header header" "editor scene" "footer footer";grid-template-columns:1fr 20rem;grid-template-rows:var(--ui-height) 1fr var(--ui-height);gap:var(--gap);height:100%;padding:var(--gutter)}.app__header{grid-area:header;width:100%}.app__header,.app__header fieldset{display:flex;align-items:center;gap:var(--ui-gap)}.app__header .app__logo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1.5em;height:1.5em;fill:var(--ui-color-background);animation:rotate 3s infinite linear}.app:not(.is-running) .app__header .app__logo{animation-play-state:paused}.app__header .app__title{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;flex:1;display:flex;align-items:center;gap:var(--gap);font-size:inherit}.app .editor{grid-area:editor}.app .editor__data,.app.is-data-mode .editor__code{display:none}.app.is-data-mode .editor__data{display:flex}.app .scene{grid-area:scene}.app__footer{grid-area:footer;display:flex;justify-content:space-between}.app__export fieldset{--ui-color-background: var(--color-background);--ui-color-text: var(--color-text);--ui-border: 1px solid var(--color-dash);display:flex;flex-direction:column;gap:var(--ui-gap);min-width:35rem}.app__export fieldset>*{width:100%}.app__export fieldset>*:hover,.app__export fieldset>*:focus{border-color:var(--ui-color-accent)}.app__export fieldset label{color:var(--color-dash)}.app__export input[type=text]{text-align:right}.app__export textarea{padding:var(--ui-padding-container);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--color-text);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius)}.app__export textarea:hover,.app__export textarea:focus{background:var(--ui-color-accent);outline:0}.app__export footer{padding:0;margin-top:var(--gutter)}.app__export footer>*{width:100%;justify-content:center}.editor{display:flex;overflow:hidden}.editor__view{flex:1;overflow:hidden;border-radius:var(--ui-border-radius)}.editor__view .cm-selectionBackground{background:var(--color-dash)!important}.editor__view .cm-activeLine{background-color:inherit}.editor__view .cm-scroller{margin-block:.5em}.editor__view .cm-editor{height:100%;max-height:100%}.editor__view .cm-gutters{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#2d2f3f;border-right:1px solid var(--color-dash)}.editor__view .cm-lineNumbers .cm-gutterElement{font-family:var(--small-font-family, inherit);font-size:var(--small-font-size, inherit);font-weight:var(--small-font-weight, inherit);font-style:var(--small-font-style, normal);font-synthesis:var(--small-font-synthesis, none);font-feature-settings:var(--small-font-feature-settings, initial);font-variant:var(--small-font-variant, none);font-kerning:var(--small-font-kerning, auto);line-height:var(--small-line-height, inherit);text-transform:var(--small-text-transform, none);text-underline-offset:var(--small-text-underline-offset, inherit);text-decoration-thickness:var(--small-text-decoration-thickness, from-font);word-spacing:var(--small-word-spacing, normal);letter-spacing:var(--small-letter-spacing, normal);font-variation-settings:var(--small-font-variation-settings, initial);display:flex;padding-left:1em;justify-content:flex-end;align-items:center}.editor__view .cm-foldGutter .cm-gutterElement{font-size:smaller;padding-inline:.5em}.editor__view .cm-line{padding-inline:.5em 1em;padding-block:.05em}.scene{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:grid;place-items:center;padding:var(--gutter);cursor:zoom-in;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.scene canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1px;height:auto}.scene.is-zoomed{cursor:zoom-out;background:black}.scene.is-zoomed canvas{position:absolute;inset:var(--gap);width:calc(100% - var(--gap) * 2);height:calc(100% - var(--gap) * 2);border-radius:3px}.canvas{image-rendering:pixelated;-webkit-optimize-contrast:crisp-edges}*{text-decoration-thickness:inherit}.confirm-modal{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;--ui-modal-width: 41rem}.confirm-modal__content:not(:empty){margin-bottom:var(--gutter)}.confirm-modal__toolbar{width:100%}.confirm-modal__toolbar>*{flex:1;justify-content:center} diff --git a/assets/index-bbbcfeaf.js b/assets/index-bbbcfeaf.js new file mode 100644 index 0000000..0c91b7d --- /dev/null +++ b/assets/index-bbbcfeaf.js @@ -0,0 +1,43 @@ +var qp=Object.defineProperty;var Ep=(n,e,t)=>e in n?qp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var gi=(n,e,t)=>(Ep(n,typeof e!="symbol"?e+"":e,t),t),Dp=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var tn=(n,e,t)=>(Dp(n,e,"read from private field"),t?t.call(n):e.get(n)),Xr=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)};(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();function Dt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}Dt.f=n=>n.children;function Ca(n,e){for(const t in e)n[t]=e[t];return n}function Lr(){}function _p(n,e,t,i){if(i)return{log:Lr,warn:Lr,error:Lr};const s=[];n=n.toUpperCase(),s.push(`%c ${n} `);let r="font-weight:bold;";return e&&(r+=`color:${e};`),t&&(r+=`background-color:${t}`),s.push(r),{log:console.log.bind(console,...s),warn:console.warn.bind(console,...s),error:console.error.bind(console,...s)}}const Za=["nodes","components","refs","domEvents","storeEvents"];let Ni=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let Er;const ei=(n,e)=>n.substr(0,e.length)===e,Aa=n=>(e,t)=>t.classList.toggle(n,e||!1),Dr=(n="textContent",e)=>(t,i)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))i.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){i.removeAttribute(n);return}Er=t??"",e||(i[n]=Er),(e||Yp.has(n)||ei(n,"data-"))&&i.setAttribute(n,Er)}};function jp(n,e,t,i,s){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let r=0;r{r.startsWith("--")?n.style.setProperty(r,l):n.style[r]=l};qr((t??[])[r])?i.append({storeEvents:[{store:t[r],init:!0,fn:o,el:n}]}):o(t[r])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!s&&e in n)try{Dr(e,s)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Dr(e,s)(t,n)}}function zp(n){return Array.isArray(n)?n:[n]}function zn(n,e){if(Array.isArray(n))return Vp(n,e);if(n instanceof window.Element)return Np(n);if(n===null||typeof n!="object"||!n.vnode)return Bp(n);const t=Ca(Ca({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return Ip(n,t,e);if(n.isInstance)return Ma(n,t,e,!0);if(n.isStateless)return Wp(n,t,e);if(n.isComponent)return Ma(n,t,e)}function Vp(n,e){n=zp(n);const t=new Ni;for(let i=0;i1?l:l[0];for(const a in s.data)a!=="nodes"&&(r._collector[a]||(r._collector[a]=[]),r._collector[a]=r._collector[a].concat(s.data[a]));s.set({components:[r],refs:[],domEvents:[],storeEvents:[]});for(let a=0;ae.startsWith("data-")).reduce((e,[t,i])=>({...e,[t]:i}),{})}storeSubscribe(e,t,i,s=!0){e.subscribe(t,i),this._storeListeners.push([e,t,i]),s&&t.call(i,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(i){t.refs[e]=i}}refArray(e,t=!1){const i=this.refs[e]||(this.refs[e]=[]);let s=i.length,r,o;return t&&(r=this.refs.__pools||(this.refs.__pools={}),o=r[e]||(r[e]=[]),o.length&&(s=o.pop())),i[s]=null,function(l){i[s]=l,t&&o.push(s)}}refMap(e,t){const i=this.refs[t]||(this.refs[t]=new Map);return function(s){s?i.set(e,s):i.delete(e)}}render(e,t){return jc(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const i=this._collector.domEvents[e];i.el.removeEventListener(i.evt,i.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const i=this._collector.storeEvents[e];i.store.unsubscribe(i.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const i=this._storeListeners[e];i[0].unsubscribe(i[1],i[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const i=this._parent._collector.components.indexOf(this);~i&&this._parent._collector.components.splice(i,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(r=tO(r),r in Ra)return;Ra[r]=!0;const o=r.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let c=s.length-1;c>=0;c--){const f=s[c];if(f.href===r&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":eO,o||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),o)return new Promise((c,f)=>{h.addEventListener("load",c),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e())};function Ta(n,e,t,i){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!i}function _r(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let zc=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,i,s,r){let o=this._first;for(;o;)o.fn.call(o.ctx,e,t,i,s,r),o.once&&this.unsubscribe(o),o=o.next}subscribe(e,t,i){const s=new Ta(this,e,t,i);return this._first?(this._last.next=s,s.prev=this._last,this._last=s):(this._first=s,this._last=s),s}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof Ta)return _r(this,e);t||(t=null);let i=this._first;for(;i;)i.fn===e&&i.ctx===t&&_r(this,i),i=i.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)_r(this,e),e=e.next}},nO=class extends zc{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},sO=class extends nO{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let i=this._first;for(;i;)i.fn.call(i.ctx,this.current,this.previous),i.once&&this.unsubscribe(i),i=i.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const i=e(this.current);this.set(i!==void 0?i:this.current,t)}};function at(n){return new sO(n)}const rO=n=>(...e)=>{for(const t of e){if(t instanceof zc)return t;if(t!==void 0)return n(t)}return n(null)};function oO(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,i=0,s=0;return function(r){i-=r,s+=r,i<=0&&(e(s),s=0,i=t+i%t)}}var gr=typeof window>"u"?global:window,ni=[],Li=[],qi=[],_t=null,si=null,gn=!1,Al=!1,Ml,At;function qs(n){n===void 0&&(n=0),si===null&&(si=n),At=n-si,Ml+=At,si=n,_t=gn?null:gr.requestAnimationFrame(qs),gn&&(gn=!1);var e;if(Al){for(e=0;e0||qi.length>0}function Rl(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Tl(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function lO(n,e){Rl(qi,n,e)&&mr()}function aO(n,e){Rl(Li,n,e)&&mr()}function hO(n,e){Rl(ni,n,e)&&Vc()}function cO(n){Tl(qi,n)&&mr()}function fO(n,e){Tl(Li,n)&&mr()}function uO(n){Tl(ni,n)&&Xl()}function Vc(n){gn=!1,!_t&&(n=!!n,si=null,n?qs():_t=gr.requestAnimationFrame(qs))}function dO(){_t||(gn=!0,si=null,_t=gr.requestAnimationFrame(qs))}function Xl(){_t&&(gr.cancelAnimationFrame(_t),_t=null)}function pO(){Xl(),ni.length=0,Li.length=0,qi.length=0,Al=!1,si=null,Ml=0,At=0}const Yr={add:hO,addAfter:aO,addBefore:lO,remove:uO,removeAfter:fO,removeBefore:cO,start:Vc,stop:Xl,time:Ml,dt:At,requestOnce:dO,dispose:pO};function Bc(n,e,t){return Math.max(e,Math.min(n,t))}function Ic(n,e,t){return n>t?n%t:nkO(vO(e,n),t),Ll=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=li(n[e],0,255)):e===3&&(n[e]=li(n[e],0,1));return n},Gc={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Gc[`[object ${n}]`]=n.toLowerCase();function V(n){return Gc[Object.prototype.toString.call(n)]||"object"}const Y=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):V(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Wi=n=>{if(n.length<2)return null;const e=n.length-1;return V(n[e])=="string"?n[e].toLowerCase():null},{PI:br,min:Uc,max:Fc}=Math,We=n=>Math.round(n*100)/100,$o=n=>Math.round(n*100)/100,St=br*2,jr=br/3,PO=br/180,$O=180/br;function Hc(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const _={format:{},autodetect:[]};class ${constructor(...e){const t=this;if(V(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let i=Wi(e),s=!1;if(!i){s=!0,_.sorted||(_.autodetect=_.autodetect.sort((r,o)=>o.p-r.p),_.sorted=!0);for(let r of _.autodetect)if(i=r.test(...e),i)break}if(_.format[i]){const r=_.format[i].apply(null,s?e:e.slice(0,-1));t._rgb=Ll(r)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return V(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const CO="3.1.2",z=(...n)=>new $(...n);z.version=CO;const Ei={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ZO=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,AO=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Kc=n=>{if(n.match(ZO)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,i=e>>8&255,s=e&255;return[t,i,s,1]}if(n.match(AO)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,i=e>>16&255,s=e>>8&255,r=Math.round((e&255)/255*100)/100;return[t,i,s,r]}throw new Error(`unknown hex color: ${n}`)},{round:es}=Math,Jc=(...n)=>{let[e,t,i,s]=Y(n,"rgba"),r=Wi(n)||"auto";s===void 0&&(s=1),r==="auto"&&(r=s<1?"rgba":"rgb"),e=es(e),t=es(t),i=es(i);let l="000000"+(e<<16|t<<8|i).toString(16);l=l.substr(l.length-6);let a="0"+es(s*255).toString(16);switch(a=a.substr(a.length-2),r.toLowerCase()){case"rgba":return`#${l}${a}`;case"argb":return`#${a}${l}`;default:return`#${l}`}};$.prototype.name=function(){const n=Jc(this._rgb,"rgb");for(let e of Object.keys(Ei))if(Ei[e]===n)return e.toLowerCase();return n};_.format.named=n=>{if(n=n.toLowerCase(),Ei[n])return Kc(Ei[n]);throw new Error("unknown color name: "+n)};_.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&V(n)==="string"&&Ei[n.toLowerCase()])return"named"}});$.prototype.alpha=function(n,e=!1){return n!==void 0&&V(n)==="number"?e?(this._rgb[3]=n,this):new $([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};$.prototype.clipped=function(){return this._rgb._clipped||!1};const Ot={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},MO=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Qt(n){const e=MO.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ot.labWhitePoint=n,Ot.Xn=e[0],Ot.Zn=e[1]}function wn(){return Ot.labWhitePoint}const ql=(...n)=>{n=Y(n,"lab");const[e,t,i]=n,[s,r,o]=RO(e,t,i),[l,a,h]=ef(s,r,o);return[l,a,h,n.length>3?n[3]:1]},RO=(n,e,t)=>{const{kE:i,kK:s,kKE:r,Xn:o,Yn:l,Zn:a}=Ot,h=(n+16)/116,c=.002*e+h,f=h-.005*t,u=c*c*c,d=f*f*f,p=u>i?u:(116*c-16)/s,O=n>r?Math.pow((n+16)/116,3):n/s,g=d>i?d:(116*f-16)/s,m=p*o,x=O*l,k=g*a;return[m,x,k]},zr=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},ef=(n,e,t)=>{const{MtxAdaptMa:i,MtxAdaptMaI:s,MtxXYZ2RGB:r,RefWhiteRGB:o,Xn:l,Yn:a,Zn:h}=Ot,c=l*i.m00+a*i.m10+h*i.m20,f=l*i.m01+a*i.m11+h*i.m21,u=l*i.m02+a*i.m12+h*i.m22,d=o.X*i.m00+o.Y*i.m10+o.Z*i.m20,p=o.X*i.m01+o.Y*i.m11+o.Z*i.m21,O=o.X*i.m02+o.Y*i.m12+o.Z*i.m22,g=(n*i.m00+e*i.m10+t*i.m20)*(d/c),m=(n*i.m01+e*i.m11+t*i.m21)*(p/f),x=(n*i.m02+e*i.m12+t*i.m22)*(O/u),k=g*s.m00+m*s.m10+x*s.m20,v=g*s.m01+m*s.m11+x*s.m21,w=g*s.m02+m*s.m12+x*s.m22,S=zr(k*r.m00+v*r.m10+w*r.m20),b=zr(k*r.m01+v*r.m11+w*r.m21),P=zr(k*r.m02+v*r.m12+w*r.m22);return[S*255,b*255,P*255]},El=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=tf(e,t,i),[a,h,c]=TO(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function TO(n,e,t){const{Xn:i,Yn:s,Zn:r,kE:o,kK:l}=Ot,a=n/i,h=e/s,c=t/r,f=a>o?Math.pow(a,1/3):(l*a+16)/116,u=h>o?Math.pow(h,1/3):(l*h+16)/116,d=c>o?Math.pow(c,1/3):(l*c+16)/116;return[116*u-16,500*(f-u),200*(u-d)]}function Vr(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const tf=(n,e,t)=>{n=Vr(n/255),e=Vr(e/255),t=Vr(t/255);const{MtxRGB2XYZ:i,MtxAdaptMa:s,MtxAdaptMaI:r,Xn:o,Yn:l,Zn:a,As:h,Bs:c,Cs:f}=Ot;let u=n*i.m00+e*i.m10+t*i.m20,d=n*i.m01+e*i.m11+t*i.m21,p=n*i.m02+e*i.m12+t*i.m22;const O=o*s.m00+l*s.m10+a*s.m20,g=o*s.m01+l*s.m11+a*s.m21,m=o*s.m02+l*s.m12+a*s.m22;let x=u*s.m00+d*s.m10+p*s.m20,k=u*s.m01+d*s.m11+p*s.m21,v=u*s.m02+d*s.m12+p*s.m22;return x*=O/h,k*=g/c,v*=m/f,u=x*r.m00+k*r.m10+v*r.m20,d=x*r.m01+k*r.m11+v*r.m21,p=x*r.m02+k*r.m12+v*r.m22,[u,d,p]};$.prototype.lab=function(){return El(this._rgb)};const XO=(...n)=>new $(...n,"lab");Object.assign(z,{lab:XO,getLabWhitePoint:wn,setLabWhitePoint:Qt});_.format.lab=ql;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"lab"),V(n)==="array"&&n.length===3)return"lab"}});$.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ot.Kn*n,new $(t,"lab").alpha(e.alpha(),!0)};$.prototype.brighten=function(n=1){return this.darken(-n)};$.prototype.darker=$.prototype.darken;$.prototype.brighter=$.prototype.brighten;$.prototype.get=function(n){const[e,t]=n.split("."),i=this[e]();if(t){const s=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(s>-1)return i[s];throw new Error(`unknown channel ${t} in mode ${e}`)}else return i};const{pow:LO}=Math,qO=1e-7,EO=20;$.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&V(n)==="number"){if(n===0)return new $([0,0,0,this._rgb[3]],"rgb");if(n===1)return new $([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),i=EO;const s=(o,l)=>{const a=o.interpolate(l,.5,e),h=a.luminance();return Math.abs(n-h)n?s(o,a):s(a,l)},r=(t>n?s(new $([0,0,0]),this):s(this,new $([255,255,255]))).rgb();return new $([...r,this._rgb[3]])}return DO(...this._rgb.slice(0,3))};const DO=(n,e,t)=>(n=Br(n),e=Br(e),t=Br(t),.2126*n+.7152*e+.0722*t),Br=n=>(n/=255,n<=.03928?n/12.92:LO((n+.055)/1.055,2.4)),Qe={},Di=(n,e,t=.5,...i)=>{let s=i[0]||"lrgb";if(!Qe[s]&&!i.length&&(s=Object.keys(Qe)[0]),!Qe[s])throw new Error(`interpolation mode ${s} is not defined`);return V(n)!=="object"&&(n=new $(n)),V(e)!=="object"&&(e=new $(e)),Qe[s](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};$.prototype.mix=$.prototype.interpolate=function(n,e=.5,...t){return Di(this,n,e,...t)};$.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new $([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:_O,cos:YO}=Math,nf=(...n)=>{let[e,t,i]=Y(n,"lch");return isNaN(i)&&(i=0),i=i*PO,[e,YO(i)*t,_O(i)*t]},Dl=(...n)=>{n=Y(n,"lch");const[e,t,i]=n,[s,r,o]=nf(e,t,i),[l,a,h]=ql(s,r,o);return[l,a,h,n.length>3?n[3]:1]},jO=(...n)=>{const e=Hc(Y(n,"hcl"));return Dl(...e)},{sqrt:zO,atan2:VO,round:BO}=Math,sf=(...n)=>{const[e,t,i]=Y(n,"lab"),s=zO(t*t+i*i);let r=(VO(i,t)*$O+360)%360;return BO(s*1e4)===0&&(r=Number.NaN),[e,s,r]},_l=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=El(e,t,i),[a,h,c]=sf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};$.prototype.lch=function(){return _l(this._rgb)};$.prototype.hcl=function(){return Hc(_l(this._rgb))};const IO=(...n)=>new $(...n,"lch"),NO=(...n)=>new $(...n,"hcl");Object.assign(z,{lch:IO,hcl:NO});_.format.lch=Dl;_.format.hcl=jO;["lch","hcl"].forEach(n=>_.autodetect.push({p:2,test:(...e)=>{if(e=Y(e,n),V(e)==="array"&&e.length===3)return n}}));$.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ot.Kn*n,t[1]<0&&(t[1]=0),new $(t,"lch").alpha(e.alpha(),!0)};$.prototype.desaturate=function(n=1){return this.saturate(-n)};$.prototype.set=function(n,e,t=!1){const[i,s]=n.split("."),r=this[i]();if(s){const o=i.indexOf(s)-(i.substr(0,2)==="ok"?2:0);if(o>-1){if(V(e)=="string")switch(e.charAt(0)){case"+":r[o]+=+e;break;case"-":r[o]+=+e;break;case"*":r[o]*=+e.substr(1);break;case"/":r[o]/=+e.substr(1);break;default:r[o]=+e}else if(V(e)==="number")r[o]=e;else throw new Error("unsupported value for Color.set");const l=new $(r,i);return t?(this._rgb=l._rgb,this):l}throw new Error(`unknown channel ${s} in mode ${i}`)}else return r};$.prototype.tint=function(n=.5,...e){return Di(this,"white",n,...e)};$.prototype.shade=function(n=.5,...e){return Di(this,"black",n,...e)};const WO=(n,e,t)=>{const i=n._rgb,s=e._rgb;return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"rgb")};Qe.rgb=WO;const{sqrt:Ir,pow:mi}=Math,GO=(n,e,t)=>{const[i,s,r]=n._rgb,[o,l,a]=e._rgb;return new $(Ir(mi(i,2)*(1-t)+mi(o,2)*t),Ir(mi(s,2)*(1-t)+mi(l,2)*t),Ir(mi(r,2)*(1-t)+mi(a,2)*t),"rgb")};Qe.lrgb=GO;const UO=(n,e,t)=>{const i=n.lab(),s=e.lab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"lab")};Qe.lab=UO;const Gi=(n,e,t,i)=>{let s,r;i==="hsl"?(s=n.hsl(),r=e.hsl()):i==="hsv"?(s=n.hsv(),r=e.hsv()):i==="hcg"?(s=n.hcg(),r=e.hcg()):i==="hsi"?(s=n.hsi(),r=e.hsi()):i==="lch"||i==="hcl"?(i="hcl",s=n.hcl(),r=e.hcl()):i==="oklch"&&(s=n.oklch().reverse(),r=e.oklch().reverse());let o,l,a,h,c,f;(i.substr(0,1)==="h"||i==="oklch")&&([o,a,c]=s,[l,h,f]=r);let u,d,p,O;return!isNaN(o)&&!isNaN(l)?(l>o&&l-o>180?O=l-(o+360):l180?O=l+360-o:O=l-o,d=o+t*O):isNaN(o)?isNaN(l)?d=Number.NaN:(d=l,(c==1||c==0)&&i!="hsv"&&(u=h)):(d=o,(f==1||f==0)&&i!="hsv"&&(u=a)),u===void 0&&(u=a+t*(h-a)),p=c+t*(f-c),i==="oklch"?new $([p,u,d],i):new $([d,u,p],i)},rf=(n,e,t)=>Gi(n,e,t,"lch");Qe.lch=rf;Qe.hcl=rf;const FO=n=>{if(V(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,i=n&255;return[e,t,i,1]}throw new Error("unknown num color: "+n)},HO=(...n)=>{const[e,t,i]=Y(n,"rgb");return(e<<16)+(t<<8)+i};$.prototype.num=function(){return HO(this._rgb)};const KO=(...n)=>new $(...n,"num");Object.assign(z,{num:KO});_.format.num=FO;_.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&V(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const JO=(n,e,t)=>{const i=n.num(),s=e.num();return new $(i+t*(s-i),"num")};Qe.num=JO;const{floor:eg}=Math,tg=(...n)=>{n=Y(n,"hcg");let[e,t,i]=n,s,r,o;i=i*255;const l=t*255;if(t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const a=eg(e),h=e-a,c=i*(1-t),f=c+l*(1-h),u=c+l*h,d=c+l;switch(a){case 0:[s,r,o]=[d,u,c];break;case 1:[s,r,o]=[f,d,c];break;case 2:[s,r,o]=[c,d,u];break;case 3:[s,r,o]=[c,f,d];break;case 4:[s,r,o]=[u,c,d];break;case 5:[s,r,o]=[d,c,f];break}}return[s,r,o,n.length>3?n[3]:1]},ig=(...n)=>{const[e,t,i]=Y(n,"rgb"),s=Uc(e,t,i),r=Fc(e,t,i),o=r-s,l=o*100/255,a=s/(255-o)*100;let h;return o===0?h=Number.NaN:(e===r&&(h=(t-i)/o),t===r&&(h=2+(i-e)/o),i===r&&(h=4+(e-t)/o),h*=60,h<0&&(h+=360)),[h,l,a]};$.prototype.hcg=function(){return ig(this._rgb)};const ng=(...n)=>new $(...n,"hcg");z.hcg=ng;_.format.hcg=tg;_.autodetect.push({p:1,test:(...n)=>{if(n=Y(n,"hcg"),V(n)==="array"&&n.length===3)return"hcg"}});const sg=(n,e,t)=>Gi(n,e,t,"hcg");Qe.hcg=sg;const{cos:bi}=Math,rg=(...n)=>{n=Y(n,"hsi");let[e,t,i]=n,s,r,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,s=(1+t*bi(St*e)/bi(jr-St*e))/3,r=1-(o+s)):e<2/3?(e-=1/3,s=(1-t)/3,r=(1+t*bi(St*e)/bi(jr-St*e))/3,o=1-(s+r)):(e-=2/3,r=(1-t)/3,o=(1+t*bi(St*e)/bi(jr-St*e))/3,s=1-(r+o)),s=li(i*s*3),r=li(i*r*3),o=li(i*o*3),[s*255,r*255,o*255,n.length>3?n[3]:1]},{min:og,sqrt:lg,acos:ag}=Math,hg=(...n)=>{let[e,t,i]=Y(n,"rgb");e/=255,t/=255,i/=255;let s;const r=og(e,t,i),o=(e+t+i)/3,l=o>0?1-r/o:0;return l===0?s=NaN:(s=(e-t+(e-i))/2,s/=lg((e-t)*(e-t)+(e-i)*(t-i)),s=ag(s),i>t&&(s=St-s),s/=St),[s*360,l,o]};$.prototype.hsi=function(){return hg(this._rgb)};const cg=(...n)=>new $(...n,"hsi");z.hsi=cg;_.format.hsi=rg;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsi"),V(n)==="array"&&n.length===3)return"hsi"}});const fg=(n,e,t)=>Gi(n,e,t,"hsi");Qe.hsi=fg;const Co=(...n)=>{n=Y(n,"hsl");const[e,t,i]=n;let s,r,o;if(t===0)s=r=o=i*255;else{const l=[0,0,0],a=[0,0,0],h=i<.5?i*(1+t):i+t-i*t,c=2*i-h,f=e/360;l[0]=f+1/3,l[1]=f,l[2]=f-1/3;for(let u=0;u<3;u++)l[u]<0&&(l[u]+=1),l[u]>1&&(l[u]-=1),6*l[u]<1?a[u]=c+(h-c)*6*l[u]:2*l[u]<1?a[u]=h:3*l[u]<2?a[u]=c+(h-c)*(2/3-l[u])*6:a[u]=c;[s,r,o]=[a[0]*255,a[1]*255,a[2]*255]}return n.length>3?[s,r,o,n[3]]:[s,r,o,1]},of=(...n)=>{n=Y(n,"rgba");let[e,t,i]=n;e/=255,t/=255,i/=255;const s=Uc(e,t,i),r=Fc(e,t,i),o=(r+s)/2;let l,a;return r===s?(l=0,a=Number.NaN):l=o<.5?(r-s)/(r+s):(r-s)/(2-r-s),e==r?a=(t-i)/(r-s):t==r?a=2+(i-e)/(r-s):i==r&&(a=4+(e-t)/(r-s)),a*=60,a<0&&(a+=360),n.length>3&&n[3]!==void 0?[a,l,o,n[3]]:[a,l,o]};$.prototype.hsl=function(){return of(this._rgb)};const ug=(...n)=>new $(...n,"hsl");z.hsl=ug;_.format.hsl=Co;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsl"),V(n)==="array"&&n.length===3)return"hsl"}});const dg=(n,e,t)=>Gi(n,e,t,"hsl");Qe.hsl=dg;const{floor:pg}=Math,Og=(...n)=>{n=Y(n,"hsv");let[e,t,i]=n,s,r,o;if(i*=255,t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=pg(e),a=e-l,h=i*(1-t),c=i*(1-t*a),f=i*(1-t*(1-a));switch(l){case 0:[s,r,o]=[i,f,h];break;case 1:[s,r,o]=[c,i,h];break;case 2:[s,r,o]=[h,i,f];break;case 3:[s,r,o]=[h,c,i];break;case 4:[s,r,o]=[f,h,i];break;case 5:[s,r,o]=[i,h,c];break}}return[s,r,o,n.length>3?n[3]:1]},{min:gg,max:mg}=Math,bg=(...n)=>{n=Y(n,"rgb");let[e,t,i]=n;const s=gg(e,t,i),r=mg(e,t,i),o=r-s;let l,a,h;return h=r/255,r===0?(l=Number.NaN,a=0):(a=o/r,e===r&&(l=(t-i)/o),t===r&&(l=2+(i-e)/o),i===r&&(l=4+(e-t)/o),l*=60,l<0&&(l+=360)),[l,a,h]};$.prototype.hsv=function(){return bg(this._rgb)};const yg=(...n)=>new $(...n,"hsv");z.hsv=yg;_.format.hsv=Og;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsv"),V(n)==="array"&&n.length===3)return"hsv"}});const xg=(n,e,t)=>Gi(n,e,t,"hsv");Qe.hsv=xg;function Es(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(o=>[o]));let i=e[0].length,s=e[0].map((o,l)=>e.map(a=>a[l])),r=n.map(o=>s.map(l=>Array.isArray(o)?o.reduce((a,h,c)=>a+h*(l[c]||0),0):l.reduce((a,h)=>a+h*o,0)));return t===1&&(r=r[0]),i===1?r.map(o=>o[0]):r}const Yl=(...n)=>{n=Y(n,"lab");const[e,t,i,...s]=n,[r,o,l]=Sg([e,t,i]),[a,h,c]=ef(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function Sg(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],i=Es(t,n);return Es(e,i.map(s=>s**3))}const jl=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),r=tf(e,t,i);return[...wg(r),...s.length>0&&s[0]<1?[s[0]]:[]]};function wg(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],i=Es(e,n);return Es(t,i.map(s=>Math.cbrt(s)))}$.prototype.oklab=function(){return jl(this._rgb)};const Qg=(...n)=>new $(...n,"oklab");Object.assign(z,{oklab:Qg});_.format.oklab=Yl;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklab"),V(n)==="array"&&n.length===3)return"oklab"}});const kg=(n,e,t)=>{const i=n.oklab(),s=e.oklab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"oklab")};Qe.oklab=kg;const vg=(n,e,t)=>Gi(n,e,t,"oklch");Qe.oklch=vg;const{pow:Nr,sqrt:Wr,PI:Gr,cos:Xa,sin:La,atan2:Pg}=Math,$g=(n,e="lrgb",t=null)=>{const i=n.length;t||(t=Array.from(new Array(i)).map(()=>1));const s=i/t.reduce(function(f,u){return f+u});if(t.forEach((f,u)=>{t[u]*=s}),n=n.map(f=>new $(f)),e==="lrgb")return Cg(n,t);const r=n.shift(),o=r.get(e),l=[];let a=0,h=0;for(let f=0;f{const d=f.get(e);c+=f.alpha()*t[u+1];for(let p=0;p=360;)u-=360;o[f]=u}else o[f]=o[f]/l[f];return c/=i,new $(o,e).alpha(c>.99999?1:c,!0)},Cg=(n,e)=>{const t=n.length,i=[0,0,0,0];for(let s=0;s.9999999&&(i[3]=1),new $(Ll(i))},{pow:Zg}=Math;function Ds(n){let e="rgb",t=z("#ccc"),i=0,s=[0,1],r=[],o=[0,0],l=!1,a=[],h=!1,c=0,f=1,u=!1,d={},p=!0,O=1;const g=function(b){if(b=b||["#fff","#000"],b&&V(b)==="string"&&z.brewer&&z.brewer[b.toLowerCase()]&&(b=z.brewer[b.toLowerCase()]),V(b)==="array"){b.length===1&&(b=[b[0],b[0]]),b=b.slice(0);for(let P=0;P=l[Z];)Z++;return Z-1}return 0};let x=b=>b,k=b=>b;const v=function(b,P){let Z,M;if(P==null&&(P=!1),isNaN(b)||b===null)return t;P?M=b:l&&l.length>2?M=m(b)/(l.length-2):f!==c?M=(b-c)/(f-c):M=1,M=k(M),P||(M=x(M)),O!==1&&(M=Zg(M,O)),M=o[0]+M*(1-o[0]-o[1]),M=li(M,0,1);const R=Math.floor(M*1e4);if(p&&d[R])Z=d[R];else{if(V(a)==="array")for(let C=0;C=E&&C===r.length-1){Z=a[C];break}if(M>E&&Md={};g(n);const S=function(b){const P=z(v(b));return h&&P[h]?P[h]():P};return S.classes=function(b){if(b!=null){if(V(b)==="array")l=b,s=[b[0],b[b.length-1]];else{const P=z.analyze(s);b===0?l=[P.min,P.max]:l=z.limits(P,"e",b)}return S}return l},S.domain=function(b){if(!arguments.length)return s;c=b[0],f=b[b.length-1],r=[];const P=a.length;if(b.length===P&&c!==f)for(let Z of Array.from(b))r.push((Z-c)/(f-c));else{for(let Z=0;Z2){const Z=b.map((R,C)=>C/(b.length-1)),M=b.map(R=>(R-c)/(f-c));M.every((R,C)=>Z[C]===R)||(k=R=>{if(R<=0||R>=1)return R;let C=0;for(;R>=M[C+1];)C++;const E=(R-M[C])/(M[C+1]-M[C]);return Z[C]+E*(Z[C+1]-Z[C])})}}return s=[c,f],S},S.mode=function(b){return arguments.length?(e=b,w(),S):e},S.range=function(b,P){return g(b),S},S.out=function(b){return h=b,S},S.spread=function(b){return arguments.length?(i=b,S):i},S.correctLightness=function(b){return b==null&&(b=!0),u=b,w(),u?x=function(P){const Z=v(0,!0).lab()[0],M=v(1,!0).lab()[0],R=Z>M;let C=v(P,!0).lab()[0];const E=Z+(M-Z)*P;let j=C-E,W=0,ie=1,de=20;for(;Math.abs(j)>.01&&de-- >0;)(function(){return R&&(j*=-1),j<0?(W=P,P+=(ie-P)*.5):(ie=P,P+=(W-P)*.5),C=v(P,!0).lab()[0],j=C-E})();return P}:x=P=>P,S},S.padding=function(b){return b!=null?(V(b)==="number"&&(b=[b,b]),o=b,S):o},S.colors=function(b,P){arguments.length<2&&(P="hex");let Z=[];if(arguments.length===0)Z=a.slice(0);else if(b===1)Z=[S(.5)];else if(b>1){const M=s[0],R=s[1]-M;Z=Ag(0,b,!1).map(C=>S(M+C/(b-1)*R))}else{n=[];let M=[];if(l&&l.length>2)for(let R=1,C=l.length,E=1<=C;E?RC;E?R++:R--)M.push((l[R-1]+l[R])*.5);else M=s;Z=M.map(R=>S(R))}return z[P]&&(Z=Z.map(M=>M[P]())),Z},S.cache=function(b){return b!=null?(p=b,S):p},S.gamma=function(b){return b!=null?(O=b,S):O},S.nodata=function(b){return b!=null?(t=z(b),S):t},S}function Ag(n,e,t){let i=[],s=nr;s?o++:o--)i.push(o);return i}const Mg=function(n){let e=[1,1];for(let t=1;tnew $(r)),n.length===2)[t,i]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>t[l]+r*(i[l]-t[l]));return new $(o,"lab")};else if(n.length===3)[t,i,s]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>(1-r)*(1-r)*t[l]+2*(1-r)*r*i[l]+r*r*s[l]);return new $(o,"lab")};else if(n.length===4){let r;[t,i,s,r]=n.map(o=>o.lab()),e=function(o){const l=[0,1,2].map(a=>(1-o)*(1-o)*(1-o)*t[a]+3*(1-o)*(1-o)*o*i[a]+3*(1-o)*o*o*s[a]+o*o*o*r[a]);return new $(l,"lab")}}else if(n.length>=5){let r,o,l;r=n.map(a=>a.lab()),l=n.length-1,o=Mg(l),e=function(a){const h=1-a,c=[0,1,2].map(f=>r.reduce((u,d,p)=>u+o[p]*h**(l-p)*a**p*d[f],0));return new $(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},Tg=n=>{const e=Rg(n);return e.scale=()=>Ds(e),e},{round:lf}=Math;$.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(lf)};$.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:lf(e):e)};const Xg=(...n)=>new $(...n,"rgb");Object.assign(z,{rgb:Xg});_.format.rgb=(...n)=>{const e=Y(n,"rgba");return e[3]===void 0&&(e[3]=1),e};_.autodetect.push({p:3,test:(...n)=>{if(n=Y(n,"rgba"),V(n)==="array"&&(n.length===3||n.length===4&&V(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const tt=(n,e,t)=>{if(!tt[t])throw new Error("unknown blend mode "+t);return tt[t](n,e)},Gt=n=>(e,t)=>{const i=z(t).rgb(),s=z(e).rgb();return z.rgb(n(i,s))},Ut=n=>(e,t)=>{const i=[];return i[0]=n(e[0],t[0]),i[1]=n(e[1],t[1]),i[2]=n(e[2],t[2]),i},Lg=n=>n,qg=(n,e)=>n*e/255,Eg=(n,e)=>n>e?e:n,Dg=(n,e)=>n>e?n:e,_g=(n,e)=>255*(1-(1-n/255)*(1-e/255)),Yg=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),jg=(n,e)=>255*(1-(1-e/255)/(n/255)),zg=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);tt.normal=Gt(Ut(Lg));tt.multiply=Gt(Ut(qg));tt.screen=Gt(Ut(_g));tt.overlay=Gt(Ut(Yg));tt.darken=Gt(Ut(Eg));tt.lighten=Gt(Ut(Dg));tt.dodge=Gt(Ut(zg));tt.burn=Gt(Ut(jg));const{pow:Vg,sin:Bg,cos:Ig}=Math;function Ng(n=300,e=-1.5,t=1,i=1,s=[0,1]){let r=0,o;V(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);const l=function(a){const h=St*((n+120)/360+e*a),c=Vg(s[0]+o*a,i),u=(r!==0?t[0]+a*r:t)*c*(1-c)/2,d=Ig(h),p=Bg(h),O=c+u*(-.14861*d+1.78277*p),g=c+u*(-.29227*d-.90649*p),m=c+u*(1.97294*d);return z(Ll([O*255,g*255,m*255,1]))};return l.start=function(a){return a==null?n:(n=a,l)},l.rotations=function(a){return a==null?e:(e=a,l)},l.gamma=function(a){return a==null?i:(i=a,l)},l.hue=function(a){return a==null?t:(t=a,V(t)==="array"?(r=t[1]-t[0],r===0&&(t=t[1])):r=0,l)},l.lightness=function(a){return a==null?s:(V(a)==="array"?(s=a,o=a[1]-a[0]):(s=[a,a],o=0),l)},l.scale=()=>z.scale(l),l.hue(t),l}const Wg="0123456789abcdef",{floor:Gg,random:Ug}=Math,Fg=()=>{let n="#";for(let e=0;e<6;e++)n+=Wg.charAt(Gg(Ug()*16));return new $(n,"hex")},{log:qa,pow:Hg,floor:Kg,abs:Jg}=Math;function af(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return V(n)==="object"&&(n=Object.values(n)),n.forEach(i=>{e&&V(i)==="object"&&(i=i[e]),i!=null&&!isNaN(i)&&(t.values.push(i),t.sum+=i,it.max&&(t.max=i),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(i,s)=>hf(t,i,s),t}function hf(n,e="equal",t=7){V(n)=="array"&&(n=af(n));const{min:i,max:s}=n,r=n.values.sort((l,a)=>l-a);if(t===1)return[i,s];const o=[];if(e.substr(0,1)==="c"&&(o.push(i),o.push(s)),e.substr(0,1)==="e"){o.push(i);for(let l=1;l 0");const l=Math.LOG10E*qa(i),a=Math.LOG10E*qa(s);o.push(i);for(let h=1;h200&&(f=!1)}const p={};for(let g=0;gg-m),o.push(O[0]);for(let g=1;g{n=new $(n),e=new $(e);const t=n.luminance(),i=e.luminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const Ea=.027,tm=5e-4,im=.1,Da=1.14,ts=.022,_a=1.414,nm=(n,e)=>{n=new $(n),e=new $(e),n.alpha()<1&&(n=Di(e,n,n.alpha(),"rgb"));const t=Ya(...n.rgb()),i=Ya(...e.rgb()),s=t>=ts?t:t+Math.pow(ts-t,_a),r=i>=ts?i:i+Math.pow(ts-i,_a),o=Math.pow(r,.56)-Math.pow(s,.57),l=Math.pow(r,.65)-Math.pow(s,.62),a=Math.abs(r-s)0?a-Ea:a+Ea)*100};function Ya(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:xt,pow:ne,min:sm,max:rm,atan2:ja,abs:za,cos:is,sin:Va,exp:om,PI:Ba}=Math;function lm(n,e,t=1,i=1,s=1){var r=function(Ze){return 360*Ze/(2*Ba)},o=function(Ze){return 2*Ba*Ze/360};n=new $(n),e=new $(e);const[l,a,h]=Array.from(n.lab()),[c,f,u]=Array.from(e.lab()),d=(l+c)/2,p=xt(ne(a,2)+ne(h,2)),O=xt(ne(f,2)+ne(u,2)),g=(p+O)/2,m=.5*(1-xt(ne(g,7)/(ne(g,7)+ne(25,7)))),x=a*(1+m),k=f*(1+m),v=xt(ne(x,2)+ne(h,2)),w=xt(ne(k,2)+ne(u,2)),S=(v+w)/2,b=r(ja(h,x)),P=r(ja(u,k)),Z=b>=0?b:b+360,M=P>=0?P:P+360,R=za(Z-M)>180?(Z+M+360)/2:(Z+M)/2,C=1-.17*is(o(R-30))+.24*is(o(2*R))+.32*is(o(3*R+6))-.2*is(o(4*R-63));let E=M-Z;E=za(E)<=180?E:M<=Z?E+360:E-360,E=2*xt(v*w)*Va(o(E)/2);const j=c-l,W=w-v,ie=1+.015*ne(d-50,2)/xt(20+ne(d-50,2)),de=1+.045*S,Ee=1+.015*S*C,he=30*om(-ne((R-275)/25,2)),Ke=-(2*xt(ne(S,7)/(ne(S,7)+ne(25,7))))*Va(2*o(he)),Ce=xt(ne(j/(t*ie),2)+ne(W/(i*de),2)+ne(E/(s*Ee),2)+Ke*(W/(i*de))*(E/(s*Ee)));return rm(0,sm(100,Ce))}function am(n,e,t="lab"){n=new $(n),e=new $(e);const i=n.get(t),s=e.get(t);let r=0;for(let o in i){const l=(i[o]||0)-(s[o]||0);r+=l*l}return Math.sqrt(r)}const hm=(...n)=>{try{return new $(...n),!0}catch{return!1}},cm={cool(){return Ds([z.hsl(180,1,.9),z.hsl(250,.7,.4)])},hot(){return Ds(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Zo={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},cf=Object.keys(Zo),Ia=new Map(cf.map(n=>[n.toLowerCase(),n])),fm=typeof Proxy=="function"?new Proxy(Zo,{get(n,e){const t=e.toLowerCase();if(Ia.has(t))return n[Ia.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(cf)}}):Zo,um=(...n)=>{n=Y(n,"cmyk");const[e,t,i,s]=n,r=n.length>4?n[4]:1;return s===1?[0,0,0,r]:[e>=1?0:255*(1-e)*(1-s),t>=1?0:255*(1-t)*(1-s),i>=1?0:255*(1-i)*(1-s),r]},{max:Na}=Math,dm=(...n)=>{let[e,t,i]=Y(n,"rgb");e=e/255,t=t/255,i=i/255;const s=1-Na(e,Na(t,i)),r=s<1?1/(1-s):0,o=(1-e-s)*r,l=(1-t-s)*r,a=(1-i-s)*r;return[o,l,a,s]};$.prototype.cmyk=function(){return dm(this._rgb)};const pm=(...n)=>new $(...n,"cmyk");Object.assign(z,{cmyk:pm});_.format.cmyk=um;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"cmyk"),V(n)==="array"&&n.length===4)return"cmyk"}});const Om=(...n)=>{const e=Y(n,"hsla");let t=Wi(n)||"lsa";return e[0]=We(e[0]||0)+"deg",e[1]=We(e[1]*100)+"%",e[2]=We(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},gm=(...n)=>{const e=Y(n,"lab");let t=Wi(n)||"lab";return e[0]=We(e[0])+"%",e[1]=We(e[1]),e[2]=We(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},mm=(...n)=>{const e=Y(n,"lch");let t=Wi(n)||"lab";return e[0]=We(e[0])+"%",e[1]=We(e[1]),e[2]=isNaN(e[2])?"none":We(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},bm=(...n)=>{const e=Y(n,"lab");return e[0]=We(e[0]*100)+"%",e[1]=$o(e[1]),e[2]=$o(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},ff=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=jl(e,t,i),[a,h,c]=sf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},ym=(...n)=>{const e=Y(n,"lch");return e[0]=We(e[0]*100)+"%",e[1]=$o(e[1]),e[2]=isNaN(e[2])?"none":We(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Ur}=Math,xm=(...n)=>{const e=Y(n,"rgba");let t=Wi(n)||"rgb";if(t.substr(0,3)==="hsl")return Om(of(e),t);if(t.substr(0,3)==="lab"){const i=wn();Qt("d50");const s=gm(El(e),t);return Qt(i),s}if(t.substr(0,3)==="lch"){const i=wn();Qt("d50");const s=mm(_l(e),t);return Qt(i),s}return t.substr(0,5)==="oklab"?bm(jl(e)):t.substr(0,5)==="oklch"?ym(ff(e)):(e[0]=Ur(e[0]),e[1]=Ur(e[1]),e[2]=Ur(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},uf=(...n)=>{n=Y(n,"lch");const[e,t,i,...s]=n,[r,o,l]=nf(e,t,i),[a,h,c]=Yl(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},kt=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,et=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,_s=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,Ue=/\s*/.source,Ui=/\s+/.source,zl=/\s*,\s*/.source,yr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,Fi=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,df=new RegExp("^rgba?\\("+Ue+[kt,kt,kt].join(Ui)+Fi+"\\)$"),pf=new RegExp("^rgb\\("+Ue+[kt,kt,kt].join(zl)+Ue+"\\)$"),Of=new RegExp("^rgba\\("+Ue+[kt,kt,kt,et].join(zl)+Ue+"\\)$"),gf=new RegExp("^hsla?\\("+Ue+[yr,_s,_s].join(Ui)+Fi+"\\)$"),mf=new RegExp("^hsl?\\("+Ue+[yr,_s,_s].join(zl)+Ue+"\\)$"),bf=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yf=new RegExp("^lab\\("+Ue+[et,et,et].join(Ui)+Fi+"\\)$"),xf=new RegExp("^lch\\("+Ue+[et,et,yr].join(Ui)+Fi+"\\)$"),Sf=new RegExp("^oklab\\("+Ue+[et,et,et].join(Ui)+Fi+"\\)$"),wf=new RegExp("^oklch\\("+Ue+[et,et,yr].join(Ui)+Fi+"\\)$"),{round:Qf}=Math,yi=n=>n.map((e,t)=>t<=2?li(Qf(e),0,255):e),se=(n,e=0,t=100,i=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,i?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),ve=(n,e)=>n==="none"?e:n,Vl=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(_.format.named)try{return _.format.named(n)}catch{}if((e=n.match(df))||(e=n.match(pf))){let t=e.slice(1,4);for(let s=0;s<3;s++)t[s]=+se(ve(t[s],0),0,255);t=yi(t);const i=e[4]!==void 0?+se(e[4],0,1):1;return t[3]=i,t}if(e=n.match(Of)){const t=e.slice(1,5);for(let i=0;i<4;i++)t[i]=+se(t[i],0,255);return t}if((e=n.match(gf))||(e=n.match(mf))){const t=e.slice(1,4);t[0]=+ve(t[0].replace("deg",""),0),t[1]=+se(ve(t[1],0),0,100)*.01,t[2]=+se(ve(t[2],0),0,100)*.01;const i=yi(Co(t)),s=e[4]!==void 0?+se(e[4],0,1):1;return i[3]=s,i}if(e=n.match(bf)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const i=Co(t);for(let s=0;s<3;s++)i[s]=Qf(i[s]);return i[3]=+e[4],i}if(e=n.match(yf)){const t=e.slice(1,4);t[0]=se(ve(t[0],0),0,100),t[1]=se(ve(t[1],0),-125,125,!0),t[2]=se(ve(t[2],0),-125,125,!0);const i=wn();Qt("d50");const s=yi(ql(t));Qt(i);const r=e[4]!==void 0?+se(e[4],0,1):1;return s[3]=r,s}if(e=n.match(xf)){const t=e.slice(1,4);t[0]=se(t[0],0,100),t[1]=se(ve(t[1],0),0,150,!1),t[2]=+ve(t[2].replace("deg",""),0);const i=wn();Qt("d50");const s=yi(Dl(t));Qt(i);const r=e[4]!==void 0?+se(e[4],0,1):1;return s[3]=r,s}if(e=n.match(Sf)){const t=e.slice(1,4);t[0]=se(ve(t[0],0),0,1),t[1]=se(ve(t[1],0),-.4,.4,!0),t[2]=se(ve(t[2],0),-.4,.4,!0);const i=yi(Yl(t)),s=e[4]!==void 0?+se(e[4],0,1):1;return i[3]=s,i}if(e=n.match(wf)){const t=e.slice(1,4);t[0]=se(ve(t[0],0),0,1),t[1]=se(ve(t[1],0),0,.4,!1),t[2]=+ve(t[2].replace("deg",""),0);const i=yi(uf(t)),s=e[4]!==void 0?+se(e[4],0,1):1;return i[3]=s,i}};Vl.test=n=>df.test(n)||gf.test(n)||yf.test(n)||xf.test(n)||Sf.test(n)||wf.test(n)||pf.test(n)||Of.test(n)||mf.test(n)||bf.test(n)||n==="transparent";$.prototype.css=function(n){return xm(this._rgb,n)};const Sm=(...n)=>new $(...n,"css");z.css=Sm;_.format.css=Vl;_.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&V(n)==="string"&&Vl.test(n))return"css"}});_.format.gl=(...n)=>{const e=Y(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const wm=(...n)=>new $(...n,"gl");z.gl=wm;$.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};$.prototype.hex=function(n){return Jc(this._rgb,n)};const Qm=(...n)=>new $(...n,"hex");z.hex=Qm;_.format.hex=Kc;_.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&V(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:ns}=Math,kf=n=>{const e=n/100;let t,i,s;return e<66?(t=255,i=e<6?0:-155.25485562709179-.44596950469579133*(i=e-2)+104.49216199393888*ns(i),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*ns(s)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*ns(t),i=325.4494125711974+.07943456536662342*(i=e-50)-28.0852963507957*ns(i),s=255),[t,i,s,1]},{round:km}=Math,vm=(...n)=>{const e=Y(n,"rgb"),t=e[0],i=e[2];let s=1e3,r=4e4;const o=.4;let l;for(;r-s>o;){l=(r+s)*.5;const a=kf(l);a[2]/a[0]>=i/t?r=l:s=l}return km(l)};$.prototype.temp=$.prototype.kelvin=$.prototype.temperature=function(){return vm(this._rgb)};const Fr=(...n)=>new $(...n,"temp");Object.assign(z,{temp:Fr,kelvin:Fr,temperature:Fr});_.format.temp=_.format.kelvin=_.format.temperature=kf;$.prototype.oklch=function(){return ff(this._rgb)};const Pm=(...n)=>new $(...n,"oklch");Object.assign(z,{oklch:Pm});_.format.oklch=uf;_.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklch"),V(n)==="array"&&n.length===3)return"oklch"}});Object.assign(z,{analyze:af,average:$g,bezier:Tg,blend:tt,brewer:fm,Color:$,colors:Ei,contrast:em,contrastAPCA:nm,cubehelix:Ng,deltaE:lm,distance:am,input:_,interpolate:Di,limits:hf,mix:Di,random:Fg,scale:Ds,scales:cm,valid:hm});class $m{constructor(){gi(this,"PROPERTIES",{...QO,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:z,rgb:(e=0,t=e,i=t=e)=>z.rgb(e,t,i),hsl:(e=360,t=1,i=1)=>z.hsl(e,t,i),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[e]=t._rgb},line:(e,t,i)=>{for(let s=0;s{this.line(0,this.ledCount,e)},gradient:(e,t,i,s)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))Cm(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}}function Cm(n,e,t){Object.defineProperty(t,n,{get(){return window[n]},set(i){window[n]=i}}),Object.defineProperty(window,n,{set(i){t["_"+n]=i},get(){return t["_"+n]}}),t[n]=e}class N{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=_i(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),ct.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=_i(this,e,t);let i=[];return this.decompose(e,t,i,0),ct.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new mn(this),r=new mn(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new mn(this,e)}iterRange(e,t=this.length){return new vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Pf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?N.empty:e.length<=32?new te(e):ct.from(te.split(e,[]))}}class te extends N{constructor(e,t=Zm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Am(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new te(Wa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Ps(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new te(l,o.length+r.length));else{let a=l.length>>1;i.push(new te(l.slice(0,a)),new te(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof te))return super.replace(e,t,i);[e,t]=_i(this,e,t);let s=Ps(this.text,Ps(i.text,Wa(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new te(s,r):ct.from(te.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){[e,t]=_i(this,e,t);let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new te(i,s)),i=[],s=-1);return s>-1&&t.push(new te(i,s)),t}}class ct extends N{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=_i(this,e,t),i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>5-1&&a.lines>h>>5+1){let c=this.children.slice();return c[s]=a,new ct(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){[e,t]=_i(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ct))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new te(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof ct)for(let O of d.children)f(O);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof te&&a&&(p=c[c.length-1])instanceof te&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new te(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:ct.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new ct(l,t)}}N.empty=new te([""],0);function Zm(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Ps(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof te?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof te?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof te){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof te?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class vf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new mn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Pf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(N.prototype[Symbol.iterator]=function(){return this.iter()},mn.prototype[Symbol.iterator]=vf.prototype[Symbol.iterator]=Pf.prototype[Symbol.iterator]=function(){return this});class Am{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function _i(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let $i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<$i.length;n++)$i[n]+=$i[n-1];function Mm(n){for(let e=1;e<$i.length;e+=2)if($i[e]>n)return $i[e-1]<=n;return!1}function Ga(n){return n>=127462&&n<=127487}const Ua=8205;function xe(n,e,t=!0,i=!0){return(t?$f:Rm)(n,e,i)}function $f(n,e,t){if(e==n.length)return e;e&&Cf(n.charCodeAt(e))&&Zf(n.charCodeAt(e-1))&&e--;let i=ge(n,e);for(e+=Ie(i);e=0&&Ga(ge(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Rm(n,e,t){for(;e>0;){let i=$f(n,e-2,t);if(i=56320&&n<57344}function Zf(n){return n>=55296&&n<56320}function ge(n,e){let t=n.charCodeAt(e);if(!Zf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Cf(i)?(t-55296<<10)+(i-56320)+65536:t}function Bl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ie(n){return n<65536?1:2}const Ao=/\r\n?|\n/;var be=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(be||(be={}));class gt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=be.Simple&&h>=e&&(i==be.TrackDel&&se||i==be.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new gt(e)}static create(e){return new gt(e)}}class ce extends gt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Mo(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Ro(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&Lt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?N.of(d.split(i||Ao)):d:N.empty,O=p.length;if(f==u&&O==0)return;fo&&Se(s,f-o,-1),Se(s,u-f,O),Lt(r,s,p),o=u}}return h(e),a(!l),l}static empty(e){return new ce(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Lt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function Ro(n,e,t,i=!1){let s=[],r=i?[]:null,o=new Qn(n),l=new Qn(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Se(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Qn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?N.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?N.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ri{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ri(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Q.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Q.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,t,i){return new ri(e,t,i)}}class Q{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Q.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(t=>ri.fromJSON(t)),e.main)}static single(e,t=e){return new Q([Q.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?Q.range(a,l):Q.range(l,a))}}return new Q(e,t)}}function Mf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Il=0;class X{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Il++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new X(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Nl),!!e.static,e.enables)}of(e){return new $s([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new $s(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new $s(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Nl(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class $s{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Il++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||To(f,c)){let d=i(f);if(l?!Fa(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let O=js(u,p);if(this.dependencies.every(g=>g instanceof X?u.facet(g)===f.facet(g):g instanceof pe?u.field(g,!1)==f.field(g,!1):!0)||(l?Fa(d=i(f),O,s):s(d=i(f),O)))return f.values[o]=O,0}else d=i(f);return f.values[o]=d,1}}}}function Fa(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ha).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Ha.of({field:this,create:e})]}get extension(){return this}}const ti={lowest:4,low:3,default:2,high:1,highest:0};function nn(n){return e=>new Rf(e,n)}const Ft={highest:nn(ti.highest),high:nn(ti.high),default:nn(ti.default),low:nn(ti.low),lowest:nn(ti.lowest)};class Rf{constructor(e,t){this.inner=e,this.prec=t}}class xr{of(e){return new Xo(this,e)}reconfigure(e){return xr.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Xo{constructor(e,t){this.compartment=e,this.inner=t}}class Ys{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Xm(e,t,o))u instanceof pe?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,O=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[p.id]=a.length<<1|1,Nl(O,d))a.push(i.facet(p));else{let g=p.combine(d.map(m=>m.value));a.push(i&&p.compare(g,i.facet(p))?i.facet(p):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(m=>g.dynamicSlot(m)));l[p.id]=h.length<<1,h.push(g=>Tm(g,p,d))}}let f=h.map(u=>u(l));return new Ys(e,o,f,l,a,r)}}function Xm(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Xo&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Xo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof Rf)r(o.inner,o.prec);else if(o instanceof pe)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof $s)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,ti.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,ti.default),i.reduce((o,l)=>o.concat(l))}function bn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function js(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Tf=X.define(),Lo=X.define({combine:n=>n.some(e=>e),static:!0}),Xf=X.define({combine:n=>n.length?n[0]:void 0,static:!0}),Lf=X.define(),qf=X.define(),Ef=X.define(),Df=X.define({combine:n=>n.length?n[0]:!1});class Ct{constructor(e,t){this.type=e,this.value=t}static define(){return new Lm}}class Lm{of(e){return new Ct(this,e)}}class qm{constructor(e){this.map=e}of(e){return new D(this,e)}}class D{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new D(this.type,t)}is(e){return this.type==e}static define(e={}){return new qm(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}D.reconfigure=D.define();D.appendConfig=D.define();class oe{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Mf(i,t.newLength),r.some(l=>l.type==oe.time)||(this.annotations=r.concat(oe.time.of(Date.now())))}static create(e,t,i,s,r,o){return new oe(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(oe.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}oe.time=Ct.define();oe.userEvent=Ct.define();oe.addToHistory=Ct.define();oe.remote=Ct.define();function Em(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof oe?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof oe?n=r[0]:n=Yf(e,Ci(r),!1)}return n}function _m(n){let e=n.startState,t=e.facet(Ef),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=_f(i,qo(e,r,n.changes.newLength),!0))}return i==n?n:oe.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Ym=[];function Ci(n){return n==null?Ym:Array.isArray(n)?n:[n]}var ee=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ee||(ee={}));const jm=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Eo;try{Eo=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function zm(n){if(Eo)return Eo.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||jm.test(t)))return!0}return!1}function Vm(n){return e=>{if(!/\S/.test(e))return ee.Space;if(zm(e))return ee.Word;for(let t=0;t-1)return ee.Word;return ee.Other}}class G{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(D.reconfigure)?(t=null,i=l.value):l.is(D.appendConfig)&&(t=null,i=Ci(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=Ys.resolve(i,s,this),r=new G(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Lo)?e.newSelection:e.newSelection.asSingle();new G(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Q.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Ci(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return G.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Ys.resolve(e.extensions||[],new Map),i=e.doc instanceof N?e.doc:N.of((e.doc||"").split(t.staticFacet(G.lineSeparator)||Ao)),s=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return Mf(s,i.length),t.staticFacet(Lo)||(s=s.asSingle()),new G(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(G.tabSize)}get lineBreak(){return this.facet(G.lineSeparator)||` +`}get readOnly(){return this.facet(Df)}phrase(e,...t){for(let i of this.facet(G.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(Tf))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Vm(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=xe(t,o,!1);if(r(t.slice(a,o))!=ee.Word)break;o=a}for(;ln.length?n[0]:4});G.lineSeparator=Xf;G.readOnly=Df;G.phrases=X.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});G.languageData=Tf;G.changeFilter=Lf;G.transactionFilter=qf;G.transactionExtender=Ef;xr.reconfigure=D.define();function bt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class ci{eq(e){return this==e}range(e,t=e){return Do.create(e,t,this)}}ci.prototype.startSide=ci.prototype.endSide=0;ci.prototype.point=!1;ci.prototype.mapMode=be.TrackDel;let Do=class jf{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new jf(e,t,i)}};function _o(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Wl{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Wl(s,r,i,l):null,pos:o}}}class I{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new I(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(_o)),this.isEmpty)return t.length?I.of(t):this;let l=new zf(this,null,-1).goto(0),a=0,h=[],c=new zt;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return kn.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return kn.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=Ka(o,l,i),h=new sn(o,a,r),c=new sn(l,a,r);i.iterGaps((f,u,d)=>Ja(h,f,c,u,d,s)),i.empty&&i.length==0&&Ja(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Ka(r,o),a=new sn(r,l,0).goto(i),h=new sn(o,l,0).goto(i);for(;;){if(a.to!=h.to||!Yo(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new sn(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new zt;for(let s of e instanceof Do?[e]:t?Bm(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return I.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=I.empty;s=s.nextLayer)t=new I(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}I.empty=new I([],[],null,-1);function Bm(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(_o);e=i}return n}I.empty.nextLayer=I.empty;class zt{finishChunk(e){this.chunks.push(new Wl(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new zt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(I.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=I.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Ka(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new zf(o,t,i,r));return s.length==1?s[0]:new kn(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Hr(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Hr(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Hr(this.heap,0)}}}function Hr(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class sn{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=kn.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){ss(this.active,e),ss(this.activeTo,e),ss(this.activeRank,e),this.minActive=eh(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;rs(this.active,t,i),rs(this.activeTo,t,s),rs(this.activeRank,t,r),e&&rs(e,t,this.cursor.from),this.minActive=eh(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&ss(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Ja(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Yo(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!Yo(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function Yo(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function eh(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=xe(n,s)}return i===!0?-1:n.length}const zo="ͼ",th=typeof Symbol>"u"?"__"+zo:Symbol.for(zo),Vo=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ih=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Vt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(O=>o.map(g=>O.replace(/&/,g))).reduce((O,g)=>O.concat(g)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),p,c,u)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,O=>"-"+O.toLowerCase())+": "+p+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=ih[th]||1;return ih[th]=e+1,zo+e.toString(36)}static mount(e,t,i){let s=e[Vo],r=i&&i.nonce;s?r&&s.setNonce(r):s=new Im(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let nh=new Map;class Im{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=nh.get(i);if(r)return e[Vo]=r;this.sheet=new s.CSSStyleSheet,nh.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Vo]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Nm=typeof navigator<"u"&&/Mac/.test(navigator.platform),Wm=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var me=0;me<10;me++)Bt[48+me]=Bt[96+me]=String(me);for(var me=1;me<=24;me++)Bt[me+111]="F"+me;for(var me=65;me<=90;me++)Bt[me]=String.fromCharCode(me+32),vn[me]=String.fromCharCode(me);for(var Kr in Bt)vn.hasOwnProperty(Kr)||(vn[Kr]=Bt[Kr]);function Gm(n){var e=Nm&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Wm&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?vn:Bt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Pn(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bo(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Cs(n,e){if(!e.anchorNode)return!1;try{return Bo(n,e.anchorNode)}catch{return!1}}function $n(n){return n.nodeType==3?ui(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function yn(n,e,t,i){return t?sh(n,e,t,i,-1)||sh(n,e,t,i,1):!1}function fi(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function zs(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function sh(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:mt(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=fi(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?mt(n):0}else return!1}}function mt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Sr(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function Um(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function Vf(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function Fm(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,d=c==a.body,p=1,O=1;if(d)u=Um(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let x=c.getBoundingClientRect();({scaleX:p,scaleY:O}=Vf(c,x)),u={left:x.left,right:x.left+c.clientWidth*p,top:x.top,bottom:x.top+c.clientHeight*O}}let g=0,m=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+m&&(m=e.bottom-u.bottom+m+o)):e.bottom>u.bottom&&(m=e.bottom-u.bottom+o,t<0&&e.top-m0&&e.right>u.right+g&&(g=e.right-u.right+g+r)):e.right>u.right&&(g=e.right-u.right+r,t<0&&e.lefts.clientHeight&&(i=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:i}}class Km{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?mt(t):0),i,Math.min(e.focusOffset,i?mt(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let xi=null;function Bf(n){if(n.setActive)return n.setActive();if(xi)return n.focus(xi);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(xi==null?{get preventScroll(){return xi={preventScroll:!0},!0}}:void 0),!xi){xi=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function Wf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=mt(t)}else if(t.parentNode&&!zs(t))i=fi(t),t=t.parentNode;else return null}}function Gf(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Gl){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ff(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var L={mac:hh||/Mac/.test(Me.platform),windows:/Win/.test(Me.platform),linux:/Linux|X11/.test(Me.platform),ie:wr,ie_version:Kf?Io.documentMode||6:Wo?+Wo[1]:No?+No[1]:0,gecko:lh,gecko_version:lh?+(/Firefox\/(\d+)/.exec(Me.userAgent)||[0,0])[1]:0,chrome:!!Jr,chrome_version:Jr?+Jr[1]:0,ios:hh,android:/Android\b/.test(Me.userAgent),webkit:ah,safari:Jf,webkit_version:ah?+(/\bAppleWebKit\/(\d+)/.exec(Me.userAgent)||[0,0])[1]:0,tabSize:Io.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const t0=256;class it extends F{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof it)||this.length-(t-e)+i.length>t0||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new it(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new we(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return i0(this.dom,e,t)}}class Pt extends F{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(If(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Pt&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Pt(this.mark,t,o)}domAtPos(e){return eu(this,e)}coordsAt(e,t){return iu(this,e,t)}}function i0(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?L.chrome||L.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return L.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Sr(a,o<0):a||null}class qt extends F{static create(e,t,i){return new qt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=qt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof qt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?we.before(this.dom):we.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?we.before(this.dom):we.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return N.empty}get isHidden(){return!0}}it.prototype.children=qt.prototype.children=Yi.prototype.children=Gl;function eu(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Pt&&s.length&&(i=s[s.length-1])instanceof Pt&&i.mark.eq(e.mark)?tu(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function iu(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(p>c||u==p&&d.getSide()>0)?(r=d,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function Uo(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function s0(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new It(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=nu(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new It(e,i,s,t,e.widget||null,!0)}static line(e){return new Bn(e)}static set(e,t=!1){return I.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}q.none=I.empty;class Vn extends q{constructor(e){let{start:t,end:i}=nu(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Vn&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Vs(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Vn.prototype.point=!1;class Bn extends q{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bn&&this.spec.class==e.spec.class&&Vs(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Bn.prototype.mapMode=be.TrackBefore;Bn.prototype.point=!0;class It extends q{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?be.TrackBefore:be.TrackAfter:be.TrackDel}get type(){return this.startSide!=this.endSide?Pe.WidgetRange:this.startSide<=0?Pe.WidgetBefore:Pe.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof It&&r0(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}It.prototype.point=!0;function nu(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function r0(n,e){return n==e||!!(n&&e&&n.compare(e))}function Fo(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class re extends F{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof re))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Hf(this,e,t,i?i.children.slice():[],r,o),!0}split(e){let t=new re;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Vs(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){tu(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Go(t,this.attrs||{})),i&&(this.attrs=Go({class:i},this.attrs||{}))}domAtPos(e){return eu(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(If(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Uo(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&F.get(s)instanceof Pt;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=F.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!L.ios||!this.children.some(r=>r instanceof it))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof it)||/[^ -~]/.test(i.text))return null;let s=$n(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=iu(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof re)return r;if(o>t)break}s=o+r.breakAfter}return null}}class vt extends F{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof vt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class Ho extends Zt{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class xn{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof vt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new re),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(os(new Yi(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof vt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(os(new it(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof It){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof It)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new vt(i.widget||ji.block,l,i));else{let a=qt.create(i.widget||ji.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(os(new Yi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(os(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new xn(e,t,i,r);return o.openEnd=I.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function os(n,e){for(let t of e)n=new Pt(t,[n],n.length);return n}class ji extends Zt{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ji.inline=new ji("span");ji.block=new ji("div");var J=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(J||(J={}));const di=J.LTR,Ul=J.RTL;function su(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function ou(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;O-=3)if(rt[O+1]==-d){let g=rt[O+2],m=g&2?s:g&4?g&1?r:s:0;m&&(U[f]=U[rt[O]]=m),l=O;break}}else{if(rt.length==189)break;rt[l++]=f,rt[l++]=u,rt[l++]=a}else if((p=U[f])==2||p==1){let O=p==s;a=O?0:1;for(let g=l-3;g>=0;g-=3){let m=rt[g+2];if(m&2)break;if(O)rt[g+2]|=2;else{if(m&4)break;rt[g+2]|=4}}}}}function f0(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)p==g&&(p=t[--O].from,g=O?t[O-1].to:n),U[--p]=d;a=c}else r=h,a++}}}function Jo(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new Et(a,O.from,d));let g=O.direction==di!=!(d%2);el(n,g?i+1:i,s,O.inner,O.from,O.to,o),a=O.to}p=O.to}else{if(p==t||(c?U[p]!=l:U[p]==l))break;p++}u?Jo(n,a,p,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let O=U[a-1];O!=l&&(c=!1,f=O==16)}let u=!c&&l==1?[]:null,d=c?i:i+1,p=a;e:for(;;)if(h&&p==r[h-1].to){if(f)break e;let O=r[--h];if(!c)for(let g=O.from,m=h;;){if(g==e)break e;if(m&&r[m-1].to==g)g=r[--m].from;else{if(U[g-1]==l)break e;break}}if(u)u.push(O);else{O.toU.length;)U[U.length]=256;let i=[],s=e==di?0:1;return el(n,s,s,t,0,n.length,i),i}function lu(n){return[new Et(0,n,0)]}let au="";function d0(n,e,t,i,s){var r;let o=i.head-n.from,l=Et.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=xe(n.text,o,a.forward(s,t));(ca.to)&&(c=h),au=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),gu=X.define({combine:n=>n.some(e=>e)}),mu=X.define();class Ai{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new Ai(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ai(Q.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ls=D.define({map:(n,e)=>n.map(e)}),bu=D.define();function Te(n,e,t){let i=n.facet(uu);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Tt=X.define({combine:n=>n.length?n[0]:!0});let O0=0;const cn=X.define();class ae{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new ae(O0++,e,i,s,l=>{let a=[cn.of(l)];return o&&a.push(Cn.of(h=>{let c=h.plugin(l);return c?o(c):q.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return ae.define(i=>new e(i),t)}}class eo{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Te(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Te(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Te(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const yu=X.define(),Kl=X.define(),Cn=X.define(),xu=X.define(),Jl=X.define(),Su=X.define();function fh(n,e){let t=n.state.facet(Su);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return I.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let d=l[u].spec.bidiIsolate,p;if(d==null&&(d=p0(e.text,h,c)),a>0&&f.length&&(p=f[f.length-1]).to==h&&p.direction==d)p.to=c,f=p.inner;else{let O={from:h,to:c,direction:d,inner:[]};f.push(O),f=O.inner}}}}),s}const wu=X.define();function Qu(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(wu)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const fn=X.define();class Ge{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Ge(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new Ge(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class Bs{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ce.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Ge(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new Bs(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class uh extends F{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=q.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new re],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ge(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!w0(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?m0(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new Ge(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(L.ie||L.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=x0(o,l,e.changes);return i=Ge.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=L.chrome||L.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,d,p,O;if(i&&i.range.fromBc){let v=xn.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),w=xn.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);d=v.breakAtStart,p=v.openStart,O=w.openEnd;let S=this.compositionView(i);w.breakAtStart?S.breakAfter=1:w.content.length&&S.merge(S.length,S.length,w.content[0],!1,w.openStart,0)&&(S.breakAfter=w.content[0].breakAfter,w.content.shift()),v.content.length&&S.merge(0,0,v.content[v.content.length-1],!0,0,v.openEnd)&&v.content.pop(),u=v.content.concat(S).concat(w.content)}else({content:u,breakAtStart:d,openStart:p,openEnd:O}=xn.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:m}=r.findPos(h,1),{i:x,off:k}=r.findPos(a,-1);Ff(this,x,k,g,m,u,d,p,O)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(bu)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new it(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Pt(s,[t],t.length);let i=new re;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=F.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Cs(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(L.gecko&&l.empty&&!this.hasComposition&&g0(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new we(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!yn(a.node,a.offset,c.anchorNode,c.anchorOffset)||!yn(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{L.android&&L.chrome&&this.dom.contains(c.focusNode)&&S0(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Pn(this.view.root);if(f)if(l.empty){if(L.gecko){let u=b0(a.node,a.offset);if(u&&u!=3){let d=(u==1?Wf:Gf)(a.node,a.offset);d&&(a=new we(d.node,d.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new we(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new we(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&yn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Pn(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=re.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=F.get(t.childNodes[s]);r instanceof re&&(i=r.domAtPos(r.length))}return i?new we(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=F.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof re&&!(i instanceof re&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof vt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof re))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof it))return null;let r=xe(s.text,i);if(r==i)return null;let o=ui(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==J.LTR;for(let h=0,c=0;cs)break;if(h>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,O=p?$n(p):[];if(O.length){let g=O[O.length-1],m=a?g.right-d.left:d.right-g.left;m>l&&(l=m,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?J.RTL:J.LTR}measureTextSize(){for(let r of this.children)if(r instanceof re){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=$n(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Uf(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(q.replace({widget:new Ho(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return q.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Cn).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(xu).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(I.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=Qu(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;Fm(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function Q0(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return Q.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=xe(s.text,r,!1):l=xe(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=xe(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function v0(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function to(n,e){return n.tope.top+1}function dh(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function il(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let p=n.firstChild;p;p=p.nextSibling){let O=$n(p);for(let g=0;gk||o==k&&r>x){i=p,s=m,r=x,o=k;let v=k?t0?g0)}x==0?t>m.bottom&&(!c||c.bottomm.top)&&(h=p,f=m):c&&to(c,m)?c=ph(c,m.bottom):f&&to(f,m)&&(f=dh(f,m.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Oh(i,u,t);if(l&&i.contentEditable!="false")return il(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Oh(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((L.chrome||L.gecko)&&ui(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function vu(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let v=n.viewState.heightOracle.textHeight/2,w=!1;a=n.elementAtHeight(u),a.type!=Pe.Text;)for(;u=i>0?a.bottom+v:a.top-v,!(u>=0&&u<=h);){if(w)return t?null:0;w=!0,i=-i}f=l+u;let d=a.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:gh(n,o,a,c,f);let p=n.dom.ownerDocument,O=n.root.elementFromPoint?n.root:p,g=O.elementFromPoint(c,f);g&&!n.contentDOM.contains(g)&&(g=null),g||(c=Math.max(o.left+1,Math.min(o.right-1,c)),g=O.elementFromPoint(c,f),g&&!n.contentDOM.contains(g)&&(g=null));let m,x=-1;if(g&&((s=n.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(p.caretPositionFromPoint){let v=p.caretPositionFromPoint(c,f);v&&({offsetNode:m,offset:x}=v)}else if(p.caretRangeFromPoint){let v=p.caretRangeFromPoint(c,f);v&&({startContainer:m,startOffset:x}=v,(!n.contentDOM.contains(m)||L.safari&&P0(m,x,c)||L.chrome&&$0(m,x,c))&&(m=void 0))}m&&(x=Math.min(mt(m),x))}if(!m||!n.docView.dom.contains(m)){let v=re.find(n.docView,d);if(!v)return u>a.top+a.height/2?a.to:a.from;({node:m,offset:x}=il(v.dom,c,f))}let k=n.docView.nearest(m);if(!k)return null;if(k.isWidget&&((r=k.dom)===null||r===void 0?void 0:r.nodeType)==1){let v=k.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+jo(o,r,n.state.tabSize)}function P0(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return ui(n,i-1,i).getBoundingClientRect().left>t}function $0(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():ui(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function nl(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Pe.Text))return i}return t}function C0(n,e,t,i){let s=nl(n,e.head),r=!i||s.type!=Pe.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==J.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return Q.cursor(a,t?-1:1)}return Q.cursor(t?s.to:s.from,t?-1:1)}function mh(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=d0(s,r,o,l,t),c=au;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function Z0(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ee.Space&&(s=o),s==o}}function A0(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return Q.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,O=vu(n,{x:f,y:p},!1,r);if(pa.bottom||(r<0?Os)){let g=n.docView.coordsForChar(O),m=!g||p{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:Q.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=F.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(R0(e,i.node,i.offset)?t:0))}}function R0(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:q0(e),a=new M0(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=E0(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Bo(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Bo(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((L.ios||L.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||L.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(L.mac||L.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=Q.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:N.of([" "])}):L.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=Q.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:N.of([" "])}),t)return ea(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function ea(n,e,t,i=-1){if(L.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(L.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Zi(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&Zi(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Zi(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=X0(n,e,t));return n.state.facet(du).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function X0(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&ku(n,t.main.head);if(f){let p=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-p}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,d=r.to-r.from;i=s.changeByRange(p=>{if(p.from==r.from&&p.to==r.to)return{changes:l,range:a||p.map(l)};let O=p.to-u,g=O-h.length;if(p.to-p.from!=d||n.state.sliceDoc(g,O)!=h||p.to>=c.from&&p.from<=c.to)return{range:p};let m=s.changes({from:g,to:O,insert:e.insert}),x=p.to-r.to;return{changes:m,range:a?Q.range(Math.max(0,a.anchor+x),Math.max(0,a.head+x)):p.map(m)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function L0(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function q0(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new bh(t,i)),(s!=t||r!=i)&&e.push(new bh(s,r))),e}function E0(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?Q.single(t+e,i+e):null}class D0{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,L.safari&&e.contentDOM.addEventListener("input",()=>null),L.gecko&&e1(e.contentDOM.ownerDocument)}handleEvent(e){!N0(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_0(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Cu.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),L.android&&L.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return L.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=$u.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||Y0.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:L.safari&&!L.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function yh(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){Te(t.state,s)}}}function _0(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(yh(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(yh(i.value,o))}}for(let i in nt)t(i).handlers.push(nt[i]);for(let i in Fe)t(i).observers.push(Fe[i]);return e}const $u=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Y0="dthko",Cu=[16,17,18,20,91,92,224,225],as=6;function hs(n){return Math.max(0,n)*.7+8}function j0(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class z0{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Hm(e.contentDOM),this.atoms=e.state.facet(Jl).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(G.allowMultipleSelections)&&V0(e,t),this.dragging=I0(e,t)&&Mu(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&j0(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,s=0,r=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=Qu(this.view);e.clientX-a.left<=s+as?t=-hs(s-e.clientX):e.clientX+a.right>=o-as&&(t=hs(e.clientX-o)),e.clientY-a.top<=r+as?i=-hs(r-e.clientY):e.clientY+a.bottom>=l-as&&(i=hs(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function V0(n,e){let t=n.state.facet(hu);return t.length?t[0](e):L.mac?e.metaKey:e.ctrlKey}function B0(n,e){let t=n.state.facet(cu);return t.length?t[0](e):L.mac?!e.altKey:!e.ctrlKey}function I0(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Pn(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function N0(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=F.get(t))&&i.ignoreEvent(e))return!1;return!0}const nt=Object.create(null),Fe=Object.create(null),Zu=L.ie&&L.ie_version<15||L.ios&&L.webkit_version<604;function W0(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Au(n,t.value)},50)}function Qr(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function Au(n,e){e=Qr(n.state,Fl,e);let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(sl!=null&&t.selection.ranges.every(a=>a.empty)&&sl==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:Q.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:Q.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Fe.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};nt.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Fe.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};Fe.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};nt.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(fu))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=F0(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new z0(n,e,t,i)),i&&n.observer.ignore(()=>{Bf(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function xh(n,e,t,i){if(i==1)return Q.cursor(e,t);if(i==2)return Q0(n.state,e,t);{let s=re.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return le>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function G0(n,e,t,i){let s=re.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Sh(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Sh(t,i,l)?1:o&&o.bottom>=i?-1:1}function wh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:G0(n,t,e.clientX,e.clientY)}}const U0=L.ie&&L.ie_version<=11;let Qh=null,kh=0,vh=0;function Mu(n){if(!U0)return n.detail;let e=Qh,t=vh;return Qh=n,vh=Date.now(),kh=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(kh+1)%3:1}function F0(n,e){let t=wh(n,e),i=Mu(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=wh(n,r),h,c=xh(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=xh(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(h=H0(s,a.pos))?h:l?s.addRange(c):Q.create([c])}}}function H0(n,e){for(let t=0;t=e)return Q.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}nt.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=Q.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Qr(n.state,Hl,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};nt.dragend=n=>(n.inputState.draggedContent=null,!1);function Ph(n,e,t,i){if(t=Qr(n.state,Fl,t),!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&B0(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}nt.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&Ph(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Ph(n,e,i,!0),!0}return!1};nt.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Zu?null:e.clipboardData;return t?(Au(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(W0(n),!1)};function K0(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function J0(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:Qr(n,Hl,e.join(n.lineBreak)),ranges:t,linewise:i}}let sl=null;nt.copy=nt.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=J0(n.state);if(!t&&!s)return!1;sl=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=Zu?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(K0(n,t),!1)};const Ru=Ct.define();function Tu(n,e){let t=[];for(let i of n.facet(pu)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:Ru.of(!0)}):null}function Xu(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=Tu(n.state,e);t?n.dispatch(t):n.update([])}},10)}Fe.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Xu(n)};Fe.blur=n=>{n.observer.clearSelectionRange(),Xu(n)};Fe.compositionstart=Fe.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Fe.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,L.chrome&&L.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Fe.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};nt.beforeinput=(n,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let l=o[0],a=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return ea(n,{from:a,to:h,insert:n.state.toText(r)},null),!0}}let s;if(L.chrome&&L.android&&(s=$u.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return L.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),L.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Fe.compositionend(n,e),20),!1};const $h=new Set;function e1(n){$h.has(n)||($h.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ch=["pre-wrap","normal","pre-line","break-spaces"];let zi=!1;function Zh(){zi=!1}class t1{constructor(e){this.lineWrapping=e,this.doc=N.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Ch.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>As&&(zi=!0),this.height=e)}replace(e,t,i){return $e.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,K.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=h?u:r.lineAt(h,K.ByPosNoHeight,i,0,0);for(f+=d.to-h,h=d.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class je extends Lu{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new ft(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof je||s instanceof Oe&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof Oe?s=new je(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):$e.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Oe extends $e{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof Oe?i[i.length-1]=new Oe(r.length+s):i.push(null,new Oe(s-1))}if(e>0){let r=i[0];r instanceof Oe?i[0]=new Oe(e+r.length):i.unshift(new Oe(e-1),null)}return $e.of(i)}decomposeLeft(e,t){t.push(new Oe(e-1),null)}decomposeRight(e,t){t.push(null,new Oe(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new Oe(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=As&&(a=-2);let u=new je(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new Oe(r-l).updateHeight(e,l));let h=$e.of(o);return(a<0||Math.abs(h.height-this.height)>=As||Math.abs(a-this.heightMetrics(e,t).perLine)>=As)&&(zi=!0),Is(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class n1 extends $e{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==K.ByPosNoHeight?K.ByPosNoHeight:K.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,K.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Ah(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?$e.of(this.break?[e,null,t]:[e,t]):(this.left=Is(this.left,e),this.right=Is(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ah(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof Oe&&(i=n[e+1])instanceof Oe&&n.splice(e-1,3,new Oe(t.length+1+i.length))}const s1=5;class ta{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof je?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new je(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=s1)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new je(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new Oe(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof je)return e;let t=new je(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof je)&&!this.isCovered?this.nodes.push(new je(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=Math.min(h==n.parentNode?s.innerHeight:a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function a1(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class no{constructor(e,t,i,s){this.from=e,this.to=t,this.size=i,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new t1(t),this.stateDeco=e.facet(Cn).filter(i=>typeof i!="function"),this.heightMap=$e.empty().applyChanges(this.stateDeco,N.empty,this.heightOracle.setDoc(e.doc),[new Ge(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=q.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new cs(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Rh:new ia(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(dn(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Cn).filter(c=>typeof c!="function");let s=e.changedRanges,r=Ge.extendWithRanges(s,r1(i,this.stateDeco,e?e.changes:ce.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Zh(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||zi)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(gu)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?J.RTL:J.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:v,scaleY:w}=Vf(t,l);(v>.005&&Math.abs(this.scaleX-v)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=v,this.scaleY=w,h|=8,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=Nf(e.scrollDOM);let p=(this.printing?a1:l1)(t,this.paddingTop),O=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let x=l.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),a){let v=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(v)&&(o=!0),o||s.lineWrapping&&Math.abs(x-this.contentDOMWidth)>s.charWidth){let{lineHeight:w,charWidth:S,textHeight:b}=e.docView.measureTextSize();o=w>0&&s.refresh(r,w,S,b,x/S,v),o&&(e.docView.minWidth=0,h|=8)}O>0&&g>0?c=Math.max(O,g):O<0&&g<0&&(c=Math.min(O,g)),Zh();for(let w of this.viewports){let S=w.from==this.viewport.from?v:e.docView.measureVisibleLineHeights(w);this.heightMap=(o?$e.empty().applyChanges(this.stateDeco,N.empty,this.heightOracle,[new Ge(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new i1(w.from,S))}zi&&(h|=2)}let k=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return k&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||k)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new cs(s.lineAt(o-i*1e3,K.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,K.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,K.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=J.LTR&&!i)return[];let l=[],a=(c,f,u,d)=>{if(f-cc&&mm.from>=u.from&&m.to<=u.to&&Math.abs(m.from-c)m.fromx));if(!g){if(fk.from<=f&&k.to>=f)){let k=t.moveToLineBoundary(Q.cursor(f),!1,!0).head;k>c&&(f=k)}let m=this.gapSize(u,c,f,d),x=i||m<2e6?m:2e6;g=new no(c,f,m,x)}l.push(g)},h=c=>{if(c.length2e6)for(let S of e)S.from>=c.from&&S.fromc.from&&a(c.from,d,c,f),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];I.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||dn(this.heightMap.lineAt(e,K.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||dn(this.heightMap.lineAt(this.scaler.fromDOM(e),K.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return dn(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class cs{constructor(e,t){this.from=e,this.to=t}}function c1(n,e,t){let i=[],s=n,r=0;return I.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function us(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function f1(n,e){for(let t of n)if(e(t))return t}const Rh={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class ia{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,K.ByPos,e,0,0).top,c=t.lineAt(a,K.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function dn(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new ft(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>dn(s,e)):n._content)}const ds=X.define({combine:n=>n.join(" ")}),rl=X.define({combine:n=>n.indexOf(!0)>-1}),ol=Vt.newName(),qu=Vt.newName(),Eu=Vt.newName(),Du={"&light":"."+qu,"&dark":"."+Eu};function ll(n,e,t){return new Vt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const u1=ll("."+ol,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Du),d1={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},so=L.ie&&L.ie_version<=11;class p1{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Km,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(L.ie&&L.ie_version<=11||L.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(L.chrome&&L.chrome_version<126)&&(this.editContext=new g1(e),e.state.facet(Tt)&&(e.contentDOM.editContext=this.editContext.editContext)),so&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Tt)?i.root.activeElement!=this.dom:!Cs(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(L.ie&&L.ie_version<=11||L.android&&L.chrome)&&!i.state.selection.main.empty&&s.focusNode&&yn(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Pn(e.root);if(!t)return!1;let i=L.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&O1(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Cs(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Zi(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Cs(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new T0(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,s=Pu(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Th(t,e.previousSibling||e.target.previousSibling,-1),s=Th(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Tt)!=e.state.facet(Tt)&&(e.view.contentDOM.editContext=e.state.facet(Tt)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Th(n,e,t){for(;e;){let i=F.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Xh(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return yn(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function O1(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return Xh(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?Xh(n,t):null}class g1{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:s}=e.state.selection.main,r={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:N.of(i.text.split(` +`))};r.from==this.from&&sthis.to&&(r.to=s),!(r.from==r.to&&!r.insert.length)&&(this.pendingContextChange=r,e.state.readOnly||ea(e,r,Q.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(q.mark({attributes:{style:a}}).range(this.toEditorPos(r.rangeStart),this.toEditorPos(r.rangeEnd)))}}e.dispatch({effects:bu.of(q.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Pn(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class T{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Jm(e.parent)||document,this.viewState=new Mh(e.state||G.create(e)),e.scrollTo&&e.scrollTo.is(ls)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(cn).map(s=>new eo(s));for(let s of this.plugins)s.update(this);this.observer=new p1(this),this.inputState=new D0(this),this.inputState.ensureHandlers(this.plugins),this.docView=new uh(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof oe?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(Ru))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Tu(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(G.phrases)!=this.state.facet(G.phrases))return this.setState(r);s=Bs.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new Ai(d.empty?d:Q.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(ls)&&(f=d.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Ns.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(fn)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(ds)!=s.state.facet(ds)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(tl))try{u(s)}catch(d){Te(this.state,d,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Pu(this,c)&&h.force&&Zi(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Mh(e),this.plugins=e.facet(cn).map(i=>new eo(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new uh(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(cn),i=e.state.facet(cn);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new eo(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Nf(i))r=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(s);r=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(d=>{try{return d.read(this)}catch(p){return Te(this.state,p),Lh}}),f=Bs.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let d=0;d1||p<-1){s=s+p,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(tl))l(t)}get themeClasses(){return ol+" "+(this.state.facet(rl)?Eu:qu)+" "+this.state.facet(ds)}updateAttrs(){let e=qh(this,yu,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Tt)?"true":"false",class:"cm-content",style:`${L.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),qh(this,Kl,t);let i=this.observer.ignore(()=>{let s=Uo(this.contentDOM,this.contentAttrs,t),r=Uo(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(T.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(fn);let e=this.state.facet(T.cspNonce);Vt.mount(this.root,this.styleModules.concat(u1).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return io(this,e,mh(this,e,t,i))}moveByGroup(e,t){return io(this,e,mh(this,e,t,i=>Z0(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return Q.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return C0(this,e,t,i)}moveVertically(e,t,i){return io(this,e,A0(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),vu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[Et.find(r,e-s.from,-1,t)];return Sr(i,o.dir==J.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ou)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>m1)return lu(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||ou(r.isolates,i=fh(this,e))))return r.order;i||(i=fh(this,e));let s=u0(e.text,t,i);return this.bidiCache.push(new Ns(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||L.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Bf(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return ls.of(new Ai(typeof e=="number"?Q.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return ls.of(new Ai(Q.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ae.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ae.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Vt.newName(),s=[ds.of(i),fn.of(ll(`.${i}`,e))];return t&&t.dark&&s.push(rl.of(!0)),s}static baseTheme(e){return Ft.lowest(fn.of(ll("."+ol,e,Du)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&F.get(i)||F.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}T.styleModule=fn;T.inputHandler=du;T.clipboardInputFilter=Fl;T.clipboardOutputFilter=Hl;T.scrollHandler=mu;T.focusChangeEffect=pu;T.perLineTextDirection=Ou;T.exceptionSink=uu;T.updateListener=tl;T.editable=Tt;T.mouseSelectionStyle=fu;T.dragMovesSelection=cu;T.clickAddsSelectionRange=hu;T.decorations=Cn;T.outerDecorations=xu;T.atomicRanges=Jl;T.bidiIsolatedRanges=Su;T.scrollMargins=wu;T.darkTheme=rl;T.cspNonce=X.define({combine:n=>n.length?n[0]:""});T.contentAttributes=Kl;T.editorAttributes=yu;T.lineWrapping=T.contentAttributes.of({class:"cm-lineWrapping"});T.announce=D.define();const m1=4096,Lh={};class Ns{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:J.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&Go(o,t)}return t}const b1=L.mac?"mac":L.windows?"win":L.linux?"linux":"key";function y1(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function S1(n,e,t){return Yu(_u(n.state),e,n,t)}let Xt=null;const w1=4e3;function Q1(n,e=b1){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let d=t[o]||(t[o]=Object.create(null)),p=l.split(/ (?!$)/).map(m=>y1(m,e));for(let m=1;m{let v=Xt={view:k,prefix:x,scope:o};return setTimeout(()=>{Xt==v&&(Xt=null)},w1),!0}]})}let O=p.join(" ");s(O,!1);let g=d[O]||(d[O]={preventDefault:!1,stopPropagation:!1,run:((u=(f=d._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&g.run.push(a),h&&(g.preventDefault=!0),c&&(g.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(d=>f(d,al))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let al=null;function Yu(n,e,t,i){al=e;let s=Gm(e),r=ge(s,0),o=Ie(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;Xt&&Xt.view==t&&Xt.scope==i&&(l=Xt.prefix+" ",Cu.indexOf(e.keyCode)<0&&(h=!0,Xt=null));let f=new Set,u=g=>{if(g){for(let m of g.run)if(!f.has(m)&&(f.add(m),m(t)))return g.stopPropagation&&(c=!0),!0;g.preventDefault&&(g.stopPropagation&&(c=!0),h=!0)}return!1},d=n[i],p,O;return d&&(u(d[l+ps(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(L.windows&&e.ctrlKey&&e.altKey)&&(p=Bt[e.keyCode])&&p!=s?(u(d[l+ps(p,e,!0)])||e.shiftKey&&(O=vn[e.keyCode])!=s&&O!=p&&u(d[l+ps(O,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(d[l+ps(s,e,!0)])&&(a=!0),!a&&u(d._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),al=null,a}class Nn{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=ju(e);return[new Nn(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return k1(e,t,i)}}function ju(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==J.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function Dh(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function k1(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==J.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=ju(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=nl(n,i),p=nl(n,s),O=d.type==Pe.Text?d:null,g=p.type==Pe.Text?p:null;if(O&&(n.lineWrapping||d.widgetLineBreaks)&&(O=Dh(n,i,1,O)),g&&(n.lineWrapping||p.widgetLineBreaks)&&(g=Dh(n,s,-1,g)),O&&g&&O.from==g.from&&O.to==g.to)return x(k(t.from,t.to,O));{let w=O?k(t.from,null,O):v(d,!1),S=g?k(null,t.to,g):v(p,!0),b=[];return(O||d).to<(g||p).from-(O&&g?1:0)||d.widgetLineBreaks>1&&w.bottom+n.defaultLineHeight/2C&&j.from=ie)break;De>W&&R(Math.max(he,W),w==null&&he<=C,Math.min(De,ie),S==null&&De>=E,Ee.dir)}if(W=de.to+1,W>=ie)break}return M.length==0&&R(C,w==null,E,S==null,n.textDirection),{top:P,bottom:Z,horizontal:M}}function v(w,S){let b=l.top+(S?w.top:w.bottom);return{top:b,bottom:b,horizontal:[]}}}function v1(n,e){return n.constructor==e.constructor&&n.eq(e)}class P1{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Ms)!=e.state.facet(Ms)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Ms);for(;t!v1(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ms=X.define();function zu(n){return[ae.define(e=>new P1(e,n)),Ms.of(n)]}const Vu=!L.ios,Zn=X.define({combine(n){return bt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function $1(n={}){return[Zn.of(n),C1,Z1,A1,gu.of(!0)]}function Bu(n){return n.startState.facet(Zn)!=n.state.facet(Zn)}const C1=zu({above:!0,markers(n){let{state:e}=n,t=e.facet(Zn),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||Vu:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:Q.cursor(s.head,s.head>s.anchor?-1:1);for(let a of Nn.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Bu(n);return t&&_h(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){_h(e.state,n)},class:"cm-cursorLayer"});function _h(n,e){e.style.animationDuration=n.facet(Zn).cursorBlinkRate+"ms"}const Z1=zu({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:Nn.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||Bu(n)},class:"cm-selectionLayer"}),hl={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Vu&&(hl[".cm-line"].caretColor=hl[".cm-content"].caretColor="transparent !important");const A1=Ft.highest(T.theme(hl)),Iu=D.define({map(n,e){return n==null?null:e.mapPos(n)}}),pn=pe.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(Iu)?i.value:t,n)}}),M1=ae.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(pn);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(pn)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(pn),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(pn)!=n&&this.view.dispatch({effects:Iu.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function R1(){return[pn,M1]}function Yh(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function T1(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class X1{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new zt,i=t.add.bind(t);for(let{from:s,to:r}of T1(e,this.maxLength))Yh(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(m.range(O,g));if(a==h)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(g,e,O,p));t=t.update({filterFrom:c,filterTo:f,filter:(O,g)=>Of,add:u})}}return t}}const cl=/x/.unicode!=null?"gu":"g",L1=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,cl),q1={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ro=null;function E1(){var n;if(ro==null&&typeof document<"u"&&document.body){let e=document.body.style;ro=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return ro||!1}const Rs=X.define({combine(n){let e=bt(n,{render:null,specialChars:L1,addSpecialChars:null});return(e.replaceTabs=!E1())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,cl)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,cl)),e}});function D1(n={}){return[Rs.of(n),_1()]}let jh=null;function _1(){return jh||(jh=ae.fromClass(class{constructor(n){this.view=n,this.decorations=q.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Rs)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new X1({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ge(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=Hi(o.text,l,i-o.from);return q.replace({widget:new V1((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=q.replace({widget:new z1(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Rs);n.startState.facet(Rs)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Y1="•";function j1(n){return n>=32?Y1:n==10?"␤":String.fromCharCode(9216+n)}class z1 extends Zt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=j1(this.code),i=e.state.phrase("Control character")+" "+(q1[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class V1 extends Zt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function B1(){return N1}const I1=q.line({class:"cm-activeLine"}),N1=ae.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(I1.range(s.from)),e=s.from)}return q.set(t)}},{decorations:n=>n.decorations}),fl=2e3;function W1(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>fl||t.off>fl||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(Q.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=jo(h.text,o,n.tabSize,!0);if(c<0)r.push(Q.cursor(h.to));else{let f=jo(h.text,l,n.tabSize);r.push(Q.range(h.from+c,h.from+f))}}}return r}function G1(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function zh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>fl?-1:s==i.length?G1(n,e.clientX):Hi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function U1(n,e){let t=zh(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=zh(n,s);if(!l)return i;let a=W1(n.state,t,l);return a.length?o?Q.create(a.concat(i.ranges)):Q.create(a):i}}:null}function F1(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return T.mouseSelectionStyle.of((t,i)=>e(i)?U1(t,i):null)}const H1={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},K1={style:"cursor: crosshair"};function J1(n={}){let[e,t]=H1[n.key||"Alt"],i=ae.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,T.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?K1:null})]}const rn="-10000px";class Nu{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function eb(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const oo=X.define({combine:n=>{var e,t,i;return{position:L.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||eb}}}),Vh=new WeakMap,na=ae.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(oo);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Nu(n,sa,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(oo);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=rn,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(L.gecko)i=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==rn&&s.style.left=="0px"){let r=s.getBoundingClientRect();i=Math.abs(r.top+1e4)>1||Math.abs(r.left)>1}}if(i||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((s,r)=>{let o=this.manager.tooltipViews[r];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(oo).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1){c.style.top=rn;continue}let d=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,O=u.right-u.left,g=(e=Vh.get(h))!==null&&e!==void 0?e:u.bottom-u.top,m=h.offset||ib,x=this.view.textDirection==J.LTR,k=u.width>i.right-i.left?x?i.left:i.right-u.width:x?Math.max(i.left,Math.min(f.left-(d?14:0)+m.x,i.right-O)):Math.min(Math.max(i.left,f.left-O+(d?14:0)-m.x),i.right-O),v=this.above[l];!a.strictSide&&(v?f.top-(u.bottom-u.top)-m.yi.bottom)&&v==i.bottom-f.bottom>f.top-i.top&&(v=this.above[l]=!v);let w=(v?f.top-i.top:i.bottom-f.bottom)-p;if(wk&&P.topS&&(S=v?P.top-g-2-p:P.bottom+p+2);if(this.position=="absolute"?(c.style.top=(S-n.parent.top)/r+"px",c.style.left=(k-n.parent.left)/s+"px"):(c.style.top=S/r+"px",c.style.left=k/s+"px"),d){let P=f.left+(x?m.x:-m.x)-(k+14-7);d.style.left=P/s+"px"}h.overlap!==!0&&o.push({left:k,top:S,right:b,bottom:S+g}),c.classList.toggle("cm-tooltip-above",v),c.classList.toggle("cm-tooltip-below",!v),h.positioned&&h.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=rn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),tb=T.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ib={x:0,y:0},sa=X.define({enables:[na,tb]}),Ws=X.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class kr{static create(e){return new kr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Nu(e,Ws,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const nb=sa.compute([Ws],n=>{let e=n.facet(Ws);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:kr.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class sb{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==J.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>Te(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(na),t=e?e.manager.tooltips.findIndex(i=>i.create==kr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!rb(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!ob(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Os=4;function rb(n,e){let{left:t,right:i,top:s,bottom:r}=n.getBoundingClientRect(),o;if(o=n.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();s=Math.min(l.top,s),r=Math.max(l.bottom,r)}return e.clientX>=t-Os&&e.clientX<=i+Os&&e.clientY>=s-Os&&e.clientY<=r+Os}function ob(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function lb(n,e={}){let t=D.define(),i=pe.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,be.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(ab)&&(s=[]);return s},provide:s=>Ws.from(s)});return{active:i,extension:[i,ae.define(s=>new sb(s,n,i,t,e.hoverTime||300)),nb]}}function Wu(n,e){let t=n.plugin(na);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const ab=D.define(),Bh=X.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function An(n,e){let t=n.plugin(Gu),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Gu=ae.fromClass(class{constructor(n){this.input=n.state.facet(Mn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(Bh);this.top=new gs(n,!0,e.topContainer),this.bottom=new gs(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(Bh);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new gs(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new gs(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Mn);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>T.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class gs{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Ih(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Ih(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Ih(n){let e=n.nextSibling;return n.remove(),e}const Mn=X.define({enables:Gu});class $t extends ci{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}$t.prototype.elementClass="";$t.prototype.toDOM=void 0;$t.prototype.mapMode=be.TrackBefore;$t.prototype.startSide=$t.prototype.endSide=-1;$t.prototype.point=!0;const Ts=X.define(),hb=X.define(),cb={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>I.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Sn=X.define();function fb(n){return[Uu(),Sn.of(Object.assign(Object.assign({},cb),n))]}const ul=X.define({combine:n=>n.some(e=>e)});function Uu(n){let e=[ub];return n&&n.fixed===!1&&e.push(ul.of(!0)),e}const ub=ae.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Sn).map(e=>new Wh(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(ul),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(ul)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=I.iter(this.view.state.facet(Ts),this.view.viewport.from),i=[],s=this.gutters.map(r=>new db(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==Pe.Text&&o){dl(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==Pe.Text){dl(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Sn),t=n.state.facet(Sn),i=n.docChanged||n.heightChanged||n.viewportChanged||!I.eq(n.startState.facet(Ts),n.state.facet(Ts),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new Wh(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>T.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==J.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Nh(n){return Array.isArray(n)?n:[n]}function dl(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class db{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=I.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new Fu(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];dl(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),s=i?[i]:null;for(let r of e.state.facet(hb)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Wh{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=Nh(t.markers(e)),t.initialSpacer&&(this.spacer=new Fu(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Nh(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!I.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Fu{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),pb(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class lo extends $t{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ao(n,e){return n.state.facet(ki).formatNumber(e,n.state)}const mb=Sn.compute([ki],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Ob)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new lo(ao(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,i)=>{for(let s of e.state.facet(gb)){let r=s(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(ki)!=e.state.facet(ki),initialSpacer(e){return new lo(ao(e,Gh(e.state.doc.lines)))},updateSpacer(e,t){let i=ao(t.view,Gh(t.view.state.doc.lines));return i==e.number?e:new lo(i)},domEventHandlers:n.facet(ki).domEventHandlers}));function bb(n={}){return[ki.of(n),Uu(),mb]}function Gh(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(yb.range(s)))}return I.of(e)});function Sb(){return xb}const Hu=1024;let wb=0;class ho{constructor(e,t){this.from=e,this.to=t}}class B{constructor(e={}){this.id=wb++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=qe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}B.closedBy=new B({deserialize:n=>n.split(" ")});B.openedBy=new B({deserialize:n=>n.split(" ")});B.group=new B({deserialize:n=>n.split(" ")});B.isolate=new B({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});B.contextHash=new B({perNode:!0});B.lookAhead=new B({perNode:!0});B.mounted=new B({perNode:!0});class Gs{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[B.mounted.id]}}const Qb=Object.create(null);class qe{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):Qb,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new qe(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(B.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(B.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}qe.none=new qe("",Object.create(null),0,8);class ra{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|fe.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:aa(qe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new le(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new le(qe.none,t,i,s)))}static build(e){return $b(e)}}le.empty=new le(qe.none,[],[],0);class oa{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new oa(this.buffer,this.index)}}class Nt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return qe.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Rn(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(Ku(s,i,f,f+c.length)){if(c instanceof Nt){if(r&fe.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new ut(new kb(o,c,e,f),null,u)}else if(r&fe.IncludeAnonymous||!c.type.isAnonymous||la(c)){let u;if(!(r&fe.IgnoreMounts)&&(u=Gs.get(c))&&!u.overlay)return new Le(u.tree,f,e,o);let d=new Le(c,f,e,o);return r&fe.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&fe.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&fe.IgnoreOverlays)&&(s=Gs.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Le(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Fh(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function pl(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class kb{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class ut extends Ju{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new ut(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&fe.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new ut(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ut(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ut(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new le(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ed(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new Le(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(Rn(l,e,t,!1))}}return s?ed(s):i}class Ol{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Le)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Le?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&fe.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fe.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&fe.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&fe.IncludeAnonymous||l instanceof Nt||!l.type.isAnonymous||la(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return pl(this._tree,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function la(n){return n.children.some(e=>e instanceof Nt||!e.type.isAnonymous||la(e))}function $b(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=Hu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new oa(t,t.length):t,a=i.types,h=0,c=0;function f(w,S,b,P,Z,M){let{id:R,start:C,end:E,size:j}=l,W=c,ie=h;for(;j<0;)if(l.next(),j==-1){let Ke=r[R];b.push(Ke),P.push(C-w);return}else if(j==-3){h=R;return}else if(j==-4){c=R;return}else throw new RangeError(`Unrecognized record size: ${j}`);let de=a[R],Ee,he,De=C-w;if(E-C<=s&&(he=g(l.pos-S,Z))){let Ke=new Uint16Array(he.size-he.skip),Ce=l.pos-he.size,Ze=Ke.length;for(;l.pos>Ce;)Ze=m(he.start,Ke,Ze);Ee=new Nt(Ke,E-he.start,i),De=he.start-w}else{let Ke=l.pos-j;l.next();let Ce=[],Ze=[],Kt=R>=o?R:-1,Oi=0,Kn=E;for(;l.pos>Ke;)Kt>=0&&l.id==Kt&&l.size>=0?(l.end<=Kn-s&&(p(Ce,Ze,C,Oi,l.end,Kn,Kt,W,ie),Oi=Ce.length,Kn=l.end),l.next()):M>2500?u(C,Ke,Ce,Ze):f(C,Ke,Ce,Ze,Kt,M+1);if(Kt>=0&&Oi>0&&Oi-1&&Oi>0){let $a=d(de,ie);Ee=aa(de,Ce,Ze,0,Ce.length,0,E-C,$a,$a)}else Ee=O(de,Ce,Ze,E-C,W-E,ie)}b.push(Ee),P.push(De)}function u(w,S,b,P){let Z=[],M=0,R=-1;for(;l.pos>S;){let{id:C,start:E,end:j,size:W}=l;if(W>4)l.next();else{if(R>-1&&E=0;j-=3)C[W++]=Z[j],C[W++]=Z[j+1]-E,C[W++]=Z[j+2]-E,C[W++]=W;b.push(new Nt(C,Z[2]-E,i)),P.push(E-w)}}function d(w,S){return(b,P,Z)=>{let M=0,R=b.length-1,C,E;if(R>=0&&(C=b[R])instanceof le){if(!R&&C.type==w&&C.length==Z)return C;(E=C.prop(B.lookAhead))&&(M=P[R]+C.length+E)}return O(w,b,P,Z,M,S)}}function p(w,S,b,P,Z,M,R,C,E){let j=[],W=[];for(;w.length>P;)j.push(w.pop()),W.push(S.pop()+b-Z);w.push(O(i.types[R],j,W,M-Z,C-M,E)),S.push(Z-b)}function O(w,S,b,P,Z,M,R){if(M){let C=[B.contextHash,M];R=R?[C].concat(R):[C]}if(Z>25){let C=[B.lookAhead,Z];R=R?[C].concat(R):[C]}return new le(w,S,b,P,R)}function g(w,S){let b=l.fork(),P=0,Z=0,M=0,R=b.end-s,C={size:0,start:0,skip:0};e:for(let E=b.pos-w;b.pos>E;){let j=b.size;if(b.id==S&&j>=0){C.size=P,C.start=Z,C.skip=M,M+=4,P+=4,b.next();continue}let W=b.pos-j;if(j<0||W=o?4:0,de=b.start;for(b.next();b.pos>W;){if(b.size<0)if(b.size==-3)ie+=4;else break e;else b.id>=o&&(ie+=4);b.next()}Z=de,P+=j,M+=ie}return(S<0||P==w)&&(C.size=P,C.start=Z,C.skip=M),C.size>4?C:void 0}function m(w,S,b){let{id:P,start:Z,end:M,size:R}=l;if(l.next(),R>=0&&P4){let E=l.pos-(R-4);for(;l.pos>E;)b=m(w,S,b)}S[--b]=C,S[--b]=M-w,S[--b]=Z-w,S[--b]=P}else R==-3?h=P:R==-4&&(c=P);return b}let x=[],k=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,x,k,-1,0);let v=(e=n.length)!==null&&e!==void 0?e:x.length?k[0]+x[0].length:0;return new le(a[n.topID],x.reverse(),k.reverse(),v)}const Hh=new WeakMap;function Xs(n,e){if(!n.isAnonymous||e instanceof Nt||e.type!=n)return 1;let t=Hh.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof le)){t=1;break}t+=Xs(n,i)}Hh.set(e,t)}return t}function aa(n,e,t,i,s,r,o,l,a){let h=0;for(let p=i;p=c)break;S+=b}if(k==v+1){if(S>c){let b=p[v];d(b.children,b.positions,0,b.children.length,O[v]+x);continue}f.push(p[v])}else{let b=O[k-1]+p[k-1].length-w;f.push(aa(n,p,O,v,k,w,b,null,a))}u.push(w+x-r)}}return d(e,t,i,s,0),(l||a)(f,u,o)}class Cb{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ut?this.setBuffer(e.context.buffer,e.index,t):e instanceof Le&&this.map.set(e.tree,t)}get(e){return e instanceof ut?this.getBuffer(e.context.buffer,e.index):e instanceof Le?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ai{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new ai(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,p=Math.min(u.to,f)-h;u=d>=p?null:new ai(d,p,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew ho(s.from,s.to)):[new ho(0,0)]:[new ho(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class Zb{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new B({perNode:!0});let Ab=0;class Be{constructor(e,t,i,s){this.name=e,this.set=t,this.base=i,this.modified=s,this.id=Ab++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Be&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Be(i,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new Us(e);return i=>i.modified.indexOf(t)>-1?i:Us.get(i.base||i,i.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Mb=0;class Us{constructor(e){this.name=e,this.instances=[],this.id=Mb++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Rb(t,l.modified));if(i)return i;let s=[],r=new Be(e.name,s,e,t);for(let l of t)l.instances.push(r);let o=Tb(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(Us.get(l,a));return r}}function Rb(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function Tb(n){let e=[[]];for(let t=0;ti.length-t.length)}function id(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new Fs(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return nd.add(e)}const nd=new B;class Fs{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function Xb(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Lb(n,e,t,i=0,s=n.length){let r=new qb(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class qb{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let h=s,c=Eb(e)||Fs.empty,f=Xb(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(B.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),p=this.highlighters.filter(g=>!g.scope||g.scope(u.tree.type)),O=e.firstChild();for(let g=0,m=l;;g++){let x=g=k||!e.nextSibling())););if(!x||k>i)break;m=x.to+l,m>t&&(this.highlightRange(d.cursor(),Math.max(t,x.from+l),Math.min(i,m),"",p),this.startSpan(Math.min(i,m),h))}O&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function Eb(n){let e=n.type.prop(nd);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const A=Be.define,bs=A(),Mt=A(),Kh=A(Mt),Jh=A(Mt),Rt=A(),ys=A(Rt),co=A(Rt),ht=A(),Jt=A(ht),ot=A(),lt=A(),gl=A(),on=A(gl),xs=A(),y={comment:bs,lineComment:A(bs),blockComment:A(bs),docComment:A(bs),name:Mt,variableName:A(Mt),typeName:Kh,tagName:A(Kh),propertyName:Jh,attributeName:A(Jh),className:A(Mt),labelName:A(Mt),namespace:A(Mt),macroName:A(Mt),literal:Rt,string:ys,docString:A(ys),character:A(ys),attributeValue:A(ys),number:co,integer:A(co),float:A(co),bool:A(Rt),regexp:A(Rt),escape:A(Rt),color:A(Rt),url:A(Rt),keyword:ot,self:A(ot),null:A(ot),atom:A(ot),unit:A(ot),modifier:A(ot),operatorKeyword:A(ot),controlKeyword:A(ot),definitionKeyword:A(ot),moduleKeyword:A(ot),operator:lt,derefOperator:A(lt),arithmeticOperator:A(lt),logicOperator:A(lt),bitwiseOperator:A(lt),compareOperator:A(lt),updateOperator:A(lt),definitionOperator:A(lt),typeOperator:A(lt),controlOperator:A(lt),punctuation:gl,separator:A(gl),bracket:on,angleBracket:A(on),squareBracket:A(on),paren:A(on),brace:A(on),content:ht,heading:Jt,heading1:A(Jt),heading2:A(Jt),heading3:A(Jt),heading4:A(Jt),heading5:A(Jt),heading6:A(Jt),contentSeparator:A(ht),list:A(ht),quote:A(ht),emphasis:A(ht),strong:A(ht),link:A(ht),monospace:A(ht),strikethrough:A(ht),inserted:A(),deleted:A(),changed:A(),invalid:A(),meta:xs,documentMeta:A(xs),annotation:A(xs),processingInstruction:A(xs),definition:Be.defineModifier("definition"),constant:Be.defineModifier("constant"),function:Be.defineModifier("function"),standard:Be.defineModifier("standard"),local:Be.defineModifier("local"),special:Be.defineModifier("special")};for(let n in y){let e=y[n];e instanceof Be&&(e.name=n)}sd([{tag:y.link,class:"tok-link"},{tag:y.heading,class:"tok-heading"},{tag:y.emphasis,class:"tok-emphasis"},{tag:y.strong,class:"tok-strong"},{tag:y.keyword,class:"tok-keyword"},{tag:y.atom,class:"tok-atom"},{tag:y.bool,class:"tok-bool"},{tag:y.url,class:"tok-url"},{tag:y.labelName,class:"tok-labelName"},{tag:y.inserted,class:"tok-inserted"},{tag:y.deleted,class:"tok-deleted"},{tag:y.literal,class:"tok-literal"},{tag:y.string,class:"tok-string"},{tag:y.number,class:"tok-number"},{tag:[y.regexp,y.escape,y.special(y.string)],class:"tok-string2"},{tag:y.variableName,class:"tok-variableName"},{tag:y.local(y.variableName),class:"tok-variableName tok-local"},{tag:y.definition(y.variableName),class:"tok-variableName tok-definition"},{tag:y.special(y.variableName),class:"tok-variableName2"},{tag:y.definition(y.propertyName),class:"tok-propertyName tok-definition"},{tag:y.typeName,class:"tok-typeName"},{tag:y.namespace,class:"tok-namespace"},{tag:y.className,class:"tok-className"},{tag:y.macroName,class:"tok-macroName"},{tag:y.propertyName,class:"tok-propertyName"},{tag:y.operator,class:"tok-operator"},{tag:y.comment,class:"tok-comment"},{tag:y.meta,class:"tok-meta"},{tag:y.invalid,class:"tok-invalid"},{tag:y.punctuation,class:"tok-punctuation"}]);var fo;const vi=new B;function rd(n){return X.define({combine:n?e=>e.concat(n):void 0})}const ha=new B;class Je{constructor(e,t,i=[],s=""){this.data=e,this.name=s,G.prototype.hasOwnProperty("tree")||Object.defineProperty(G.prototype,"tree",{get(){return ue(this)}}),this.parser=t,this.extension=[Wt.of(this),G.languageData.of((r,o,l)=>{let a=ec(r,o,l),h=a.type.prop(vi);if(!h)return[];let c=r.facet(h),f=a.type.prop(ha);if(f){let u=a.resolve(o-a.from,l);for(let d of f)if(d.test(u,r)){let p=r.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return ec(e,t,i).type.prop(vi)==this.data}findRegions(e){let t=e.facet(Wt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(vi)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(B.mounted);if(l){if(l.tree.prop(vi)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hs(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ue(n){let e=n.field(Je.state,!1);return e?e.tree:le.empty}class Db{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let ln=null;class Ks{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new Ks(e,t,[],le.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Db(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=le.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ai.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ln;ln=this;try{return e()}finally{ln=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=tc(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=ai.applyChanges(i,a),s=le.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=tc(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends td{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=ln;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new le(qe.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ln}}function tc(n,e,t){return ai.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Vi{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Vi(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=Ks.create(e.facet(Wt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Vi(i)}}Je.state=pe.define({create:Vi.init,update(n,e){for(let t of e.effects)if(t.is(Je.setState))return t.value;return e.startState.facet(Wt)!=e.state.facet(Wt)?Vi.init(e.state):n.apply(e)}});let od=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(od=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const uo=typeof navigator<"u"&&(!((fo=navigator.scheduling)===null||fo===void 0)&&fo.isInputPending)?()=>navigator.scheduling.isInputPending():null,_b=ae.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Je.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Je.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=od(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>uo&&uo()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Je.setState.of(new Vi(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Te(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Wt=X.define({combine(n){return n.length?n[0]:null},enables:n=>[Je.state,_b,T.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Yb{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const jb=X.define(),vr=X.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Js(n){let e=n.facet(vr);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Tn(n,e){let t="",i=n.tabSize,s=n.facet(vr)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?zb(n,t,e):null}class Pr{constructor(e,t={}){this.state=e,this.options=t,this.unit=Js(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return Hi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ld=new B;function zb(n,e,t){let i=e.resolveStack(t),s=i.node.enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o!=i.node;o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return ad(i,n,t)}function ad(n,e,t){for(let i=n;i;i=i.next){let s=Bb(i.node);if(s)return s(fa.create(e,t,i))}return 0}function Vb(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Bb(n){let e=n.type.prop(ld);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(B.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>hd(o,!0,1,void 0,r&&!Vb(o)?s.from:void 0)}return n.parent==null?Ib:null}function Ib(){return 0}class fa extends Pr{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new fa(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Nb(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return ad(this.context.next,this.base,this.pos)}}function Nb(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function Wb(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}l=a.to}}function Gb({closing:n,align:e=!0,units:t=1}){return i=>hd(i,e,t,n)}function hd(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?Wb(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const Ub=n=>n.baseIndent;function po({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Fb=200;function Hb(){return G.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+Fb)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=ca(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],d=Tn(o,f);u!=d&&a.push({from:c.from,to:c.from+u.length,insert:d})}return a.length?[n,{changes:a,sequential:!0}]:n})}const Kb=X.define(),cd=new B;function Jb(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function ty(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function er(n,e,t){for(let i of n.facet(Kb)){let s=i(n,e,t);if(s)return s}return ey(n,e,t)}function fd(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const $r=D.define({map:fd}),Wn=D.define({map:fd});function ud(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const pi=pe.define({create(){return q.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is($r)&&!iy(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(ua),s=i?q.replace({widget:new hy(i(e.state,t.value))}):ic;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Wn)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>T.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function iy(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function dd(n,e){return n.field(pi,!1)?e:e.concat(D.appendConfig.of(Od()))}const ny=n=>{for(let e of ud(n)){let t=er(n.state,e.from,e.to);if(t)return n.dispatch({effects:dd(n.state,[$r.of(t),pd(n,t)])}),!0}return!1},sy=n=>{if(!n.state.field(pi,!1))return!1;let e=[];for(let t of ud(n)){let i=tr(n.state,t.from,t.to);i&&e.push(Wn.of(i),pd(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function pd(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return T.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const ry=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(pi,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(Wn.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},ly=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ny},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:sy},{key:"Ctrl-Alt-[",run:ry},{key:"Ctrl-Alt-]",run:oy}],ay={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},ua=X.define({combine(n){return bt(n,ay)}});function Od(n){let e=[pi,uy];return n&&e.push(ua.of(n)),e}function gd(n,e){let{state:t}=n,i=t.facet(ua),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=tr(n.state,l.from,l.to);a&&n.dispatch({effects:Wn.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const ic=q.replace({widget:new class extends Zt{toDOM(n){return gd(n,null)}}});class hy extends Zt{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return gd(e,this.value)}}const cy={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Oo extends $t{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function fy(n={}){let e=Object.assign(Object.assign({},cy),n),t=new Oo(e,!0),i=new Oo(e,!1),s=ae.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Wt)!=o.state.facet(Wt)||o.startState.field(pi,!1)!=o.state.field(pi,!1)||ue(o.startState)!=ue(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new zt;for(let a of o.viewportLineBlocks){let h=tr(o.state,a.from,a.to)?i:er(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,fb({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||I.empty},initialSpacer(){return new Oo(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=tr(o.state,l.from,l.to);if(h)return o.dispatch({effects:Wn.of(h)}),!0;let c=er(o.state,l.from,l.to);return c?(o.dispatch({effects:$r.of(c)}),!0):!1}})}),Od()]}const uy=T.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Cr{constructor(e,t){this.specs=e;let i;function s(l){let a=Vt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Je?l=>l.prop(vi)==o.data:o?l=>l==o:void 0,this.style=sd(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Vt(i):null,this.themeType=t.themeType}static define(e,t){return new Cr(e,t||{})}}const ml=X.define(),md=X.define({combine(n){return n.length?[n[0]]:null}});function go(n){let e=n.facet(ml);return e.length?e:n.facet(md)}function dy(n,e){let t=[Oy],i;return n instanceof Cr&&(n.module&&t.push(T.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(md.of(n)):i?t.push(ml.computeN([T.darkTheme],s=>s.facet(T.darkTheme)==(i=="dark")?[n]:[])):t.push(ml.of(n)),t}class py{constructor(e){this.markCache=Object.create(null),this.tree=ue(e.state),this.decorations=this.buildDeco(e,go(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ue(e.state),i=go(e.state),s=i!=go(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return q.none;let i=new zt;for(let{from:s,to:r}of e.visibleRanges)Lb(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=q.mark({class:a})))},s,r);return i.finish()}}const Oy=Ft.high(ae.fromClass(py,{decorations:n=>n.decorations})),gy=Cr.define([{tag:y.meta,color:"#404740"},{tag:y.link,textDecoration:"underline"},{tag:y.heading,textDecoration:"underline",fontWeight:"bold"},{tag:y.emphasis,fontStyle:"italic"},{tag:y.strong,fontWeight:"bold"},{tag:y.strikethrough,textDecoration:"line-through"},{tag:y.keyword,color:"#708"},{tag:[y.atom,y.bool,y.url,y.contentSeparator,y.labelName],color:"#219"},{tag:[y.literal,y.inserted],color:"#164"},{tag:[y.string,y.deleted],color:"#a11"},{tag:[y.regexp,y.escape,y.special(y.string)],color:"#e40"},{tag:y.definition(y.variableName),color:"#00f"},{tag:y.local(y.variableName),color:"#30a"},{tag:[y.typeName,y.namespace],color:"#085"},{tag:y.className,color:"#167"},{tag:[y.special(y.variableName),y.macroName],color:"#256"},{tag:y.definition(y.propertyName),color:"#00c"},{tag:y.comment,color:"#940"},{tag:y.invalid,color:"#f00"}]),my=T.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),bd=1e4,yd="()[]{}",xd=X.define({combine(n){return bt(n,{afterCursor:!0,brackets:yd,maxScanDistance:bd,renderMatch:xy})}}),by=q.mark({class:"cm-matchingBracket"}),yy=q.mark({class:"cm-nonmatchingBracket"});function xy(n){let e=[],t=n.matched?by:yy;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Sy=pe.define({create(){return q.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(xd);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=dt(e.state,s.head,-1,i)||s.head>0&&dt(e.state,s.head-1,1,i)||i.afterCursor&&(dt(e.state,s.head,1,i)||s.headT.decorations.from(n)}),wy=[Sy,my];function Qy(n={}){return[xd.of(n),wy]}const ky=new B;function bl(n,e,t){let i=n.prop(e<0?B.openedBy:B.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function yl(n){let e=n.type.prop(ky);return e?e(n.node):n}function dt(n,e,t,i={}){let s=i.maxScanDistance||bd,r=i.brackets||yd,o=ue(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=bl(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return vy(n,e,t,a,c,h,r)}}return Py(n,e,t,o,l.type,s,r)}function vy(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let p=e+u*t;for(let O=t>0?0:d.length-1,g=t>0?d.length:-1;O!=g;O+=t){let m=o.indexOf(d[O]);if(!(m<0||i.resolveInner(p+O,1).type!=s))if(m%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:p+O,to:p+O+1},matched:m>>1==a>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:h,matched:!1}:null}const $y=Object.create(null),nc=[qe.none],sc=[],rc=Object.create(null),Cy=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Cy[n]=Zy($y,e);function mo(n,e){sc.indexOf(n)>-1||(sc.push(n),console.warn(e))}function Zy(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||y[h];c?typeof c=="function"?a.length?a=a.map(c):mo(h,`Modifier ${h} used at start of tag`):a.length?mo(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:mo(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=rc[s];if(r)return r.id;let o=rc[s]=qe.define({id:nc.length,name:i,props:[id({[i]:t})]});return nc.push(o),o.id}J.RTL,J.LTR;const Ay=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=pa(n.state,t.from);return i.line?My(n):i.block?Ty(n):!1};function da(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const My=da(qy,0),Ry=da(Sd,0),Ty=da((n,e)=>Sd(n,e,Ly(e)),0);function pa(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const an=50;function Xy(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-an,i),o=n.sliceDoc(s,s+an),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*an?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+an),f=n.sliceDoc(s-an,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function Ly(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Sd(n,e,t=e.selection.ranges){let i=t.map(r=>pa(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>Xy(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,p=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const xl=Ct.define(),Ey=Ct.define(),Dy=X.define(),wd=X.define({combine(n){return bt(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),Qd=pe.define({create(){return pt.empty},update(n,e){let t=e.state.facet(wd),i=e.annotation(xl);if(i){let a=Xe.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=ir(c,c.length,t.minDepth,a):c=Pd(c,e.startState.selection),new pt(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(Ey);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(oe.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Xe.fromTransaction(e),o=e.annotation(oe.time),l=e.annotation(oe.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new pt(n.done.map(Xe.fromJSON),n.undone.map(Xe.fromJSON))}});function _y(n={}){return[Qd,wd.of(n),T.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?kd:e.inputType=="historyRedo"?Sl:null;return i?(e.preventDefault(),i(t)):!1}})]}function Zr(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Qd,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const kd=Zr(0,!1),Sl=Zr(1,!1),Yy=Zr(0,!0),jy=Zr(1,!0);class Xe{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Xe(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Xe(e.changes&&ce.fromJSON(e.changes),[],e.mapped&>.fromJSON(e.mapped),e.startSelection&&Q.fromJSON(e.startSelection),e.selectionsAfter.map(Q.fromJSON))}static fromTransaction(e,t){let i=Ne;for(let s of e.startState.facet(Dy)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Xe(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Ne)}static selection(e){return new Xe(void 0,Ne,void 0,void 0,e)}}function ir(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function zy(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function Vy(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function vd(n,e){return n.length?e.length?n.concat(e):n:e}const Ne=[],By=200;function Pd(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-By));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),ir(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Xe.selection([e])]}function Iy(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function bo(n,e){if(!n.length)return n;let t=n.length,i=Ne;for(;t;){let s=Ny(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Xe.selection(i)]:Ne}function Ny(n,e,t){let i=vd(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Ne,t);if(!n.changes)return Xe.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Xe(s,D.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const Wy=/^(input\.type|delete)($|\.)/;class pt{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new pt(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||Wy.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Ar(t,e))}function ke(n){return n.textDirectionAt(n.state.selection.main.head)==J.LTR}const Cd=n=>$d(n,!ke(n)),Zd=n=>$d(n,ke(n));function Ad(n,e){return st(n,t=>t.empty?n.moveByGroup(t,e):Ar(t,e))}const Uy=n=>Ad(n,!ke(n)),Fy=n=>Ad(n,ke(n));function Hy(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Mr(n,e,t){let i=ue(n).resolveInner(e.head),s=t?B.closedBy:B.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;Hy(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?dt(n,i.from,1):dt(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,Q.cursor(l,t?-1:1)}const Ky=n=>st(n,e=>Mr(n.state,e,!ke(n))),Jy=n=>st(n,e=>Mr(n.state,e,ke(n)));function Md(n,e){return st(n,t=>{if(!t.empty)return Ar(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Rd=n=>Md(n,!1),Td=n=>Md(n,!0);function Xd(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Ar(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomLd(n,!1),wl=n=>Ld(n,!0);function Ht(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=Q.cursor(i.from+r))}return s}const ex=n=>st(n,e=>Ht(n,e,!0)),tx=n=>st(n,e=>Ht(n,e,!1)),ix=n=>st(n,e=>Ht(n,e,!ke(n))),nx=n=>st(n,e=>Ht(n,e,ke(n))),sx=n=>st(n,e=>Q.cursor(n.lineBlockAt(e.head).from,1)),rx=n=>st(n,e=>Q.cursor(n.lineBlockAt(e.head).to,-1));function ox(n,e,t){let i=!1,s=Ki(n.selection,r=>{let o=dt(n,r.head,-1)||dt(n,r.head,1)||r.head>0&&dt(n,r.head-1,1)||r.headox(n,e,!1);function He(n,e){let t=Ki(n.state.selection,i=>{let s=e(i);return Q.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(yt(n.state,t)),!0)}function qd(n,e){return He(n,t=>n.moveByChar(t,e))}const Ed=n=>qd(n,!ke(n)),Dd=n=>qd(n,ke(n));function _d(n,e){return He(n,t=>n.moveByGroup(t,e))}const ax=n=>_d(n,!ke(n)),hx=n=>_d(n,ke(n)),cx=n=>He(n,e=>Mr(n.state,e,!ke(n))),fx=n=>He(n,e=>Mr(n.state,e,ke(n)));function Yd(n,e){return He(n,t=>n.moveVertically(t,e))}const jd=n=>Yd(n,!1),zd=n=>Yd(n,!0);function Vd(n,e){return He(n,t=>n.moveVertically(t,e,Xd(n).height))}const lc=n=>Vd(n,!1),ac=n=>Vd(n,!0),ux=n=>He(n,e=>Ht(n,e,!0)),dx=n=>He(n,e=>Ht(n,e,!1)),px=n=>He(n,e=>Ht(n,e,!ke(n))),Ox=n=>He(n,e=>Ht(n,e,ke(n))),gx=n=>He(n,e=>Q.cursor(n.lineBlockAt(e.head).from)),mx=n=>He(n,e=>Q.cursor(n.lineBlockAt(e.head).to)),hc=({state:n,dispatch:e})=>(e(yt(n,{anchor:0})),!0),cc=({state:n,dispatch:e})=>(e(yt(n,{anchor:n.doc.length})),!0),fc=({state:n,dispatch:e})=>(e(yt(n,{anchor:n.selection.main.anchor,head:0})),!0),uc=({state:n,dispatch:e})=>(e(yt(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),bx=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),yx=({state:n,dispatch:e})=>{let t=Rr(n).map(({from:i,to:s})=>Q.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:Q.create(t),userEvent:"select"})),!0},xx=({state:n,dispatch:e})=>{let t=Ki(n.selection,i=>{let s=ue(n),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return Q.range(l.to,l.from)}return i});return t.eq(n.selection)?!1:(e(yt(n,t)),!0)},Sx=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=Q.create([t.main]):t.main.empty||(i=Q.create([Q.cursor(t.main.head)])),i?(e(yt(n,i)),!0):!1};function Gn(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=Ss(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=Ss(n,o,!1),l=Ss(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:Q.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const Bd=(n,e,t)=>Gn(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&sBd(n,!1,!0),Id=n=>Bd(n,!0,!1),Nd=(n,e)=>Gn(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=xe(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),Wd=n=>Nd(n,!1),wx=n=>Nd(n,!0),Qx=n=>Gn(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headGn(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),vx=n=>Gn(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:N.of(["",""])},range:Q.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},$x=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:xe(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:xe(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:Q.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Rr(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function Gd(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of Rr(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(Q.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(Q.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:Q.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Cx=({state:n,dispatch:e})=>Gd(n,e,!1),Zx=({state:n,dispatch:e})=>Gd(n,e,!0);function Ud(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Rr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ax=({state:n,dispatch:e})=>Ud(n,e,!1),Mx=({state:n,dispatch:e})=>Ud(n,e,!0),Rx=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Rr(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Tx(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ue(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(B.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const dc=Fd(!1),Xx=Fd(!0);function Fd(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Tx(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Pr(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=ca(h,r);for(c==null&&(c=Hi(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:Q.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const Lx=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Pr(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Oa(n,(r,o,l)=>{let a=ca(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=Tn(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(Oa(n,(t,i)=>{i.push({from:t.from,insert:n.facet(vr)})}),{userEvent:"input.indent"})),!0),Kd=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Oa(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Hi(s,n.tabSize),o=0,l=Tn(n,Math.max(0,r-Js(n)));for(;o(n.setTabFocusMode(),!0),Ex=[{key:"Ctrl-b",run:Cd,shift:Ed,preventDefault:!0},{key:"Ctrl-f",run:Zd,shift:Dd},{key:"Ctrl-p",run:Rd,shift:jd},{key:"Ctrl-n",run:Td,shift:zd},{key:"Ctrl-a",run:sx,shift:gx},{key:"Ctrl-e",run:rx,shift:mx},{key:"Ctrl-d",run:Id},{key:"Ctrl-h",run:Ql},{key:"Ctrl-k",run:Qx},{key:"Ctrl-Alt-h",run:Wd},{key:"Ctrl-o",run:Px},{key:"Ctrl-t",run:$x},{key:"Ctrl-v",run:wl}],Dx=[{key:"ArrowLeft",run:Cd,shift:Ed,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Uy,shift:ax,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ix,shift:px,preventDefault:!0},{key:"ArrowRight",run:Zd,shift:Dd,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Fy,shift:hx,preventDefault:!0},{mac:"Cmd-ArrowRight",run:nx,shift:Ox,preventDefault:!0},{key:"ArrowUp",run:Rd,shift:jd,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hc,shift:fc},{mac:"Ctrl-ArrowUp",run:oc,shift:lc},{key:"ArrowDown",run:Td,shift:zd,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cc,shift:uc},{mac:"Ctrl-ArrowDown",run:wl,shift:ac},{key:"PageUp",run:oc,shift:lc},{key:"PageDown",run:wl,shift:ac},{key:"Home",run:tx,shift:dx,preventDefault:!0},{key:"Mod-Home",run:hc,shift:fc},{key:"End",run:ex,shift:ux,preventDefault:!0},{key:"Mod-End",run:cc,shift:uc},{key:"Enter",run:dc,shift:dc},{key:"Mod-a",run:bx},{key:"Backspace",run:Ql,shift:Ql},{key:"Delete",run:Id},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Wd},{key:"Mod-Delete",mac:"Alt-Delete",run:wx},{mac:"Mod-Backspace",run:kx},{mac:"Mod-Delete",run:vx}].concat(Ex.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),_x=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Ky,shift:cx},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Jy,shift:fx},{key:"Alt-ArrowUp",run:Cx},{key:"Shift-Alt-ArrowUp",run:Ax},{key:"Alt-ArrowDown",run:Zx},{key:"Shift-Alt-ArrowDown",run:Mx},{key:"Escape",run:Sx},{key:"Mod-Enter",run:Xx},{key:"Alt-l",mac:"Ctrl-l",run:yx},{key:"Mod-i",run:xx,preventDefault:!0},{key:"Mod-[",run:Kd},{key:"Mod-]",run:Hd},{key:"Mod-Alt-\\",run:Lx},{key:"Shift-Mod-k",run:Rx},{key:"Shift-Mod-\\",run:lx},{key:"Mod-/",run:Ay},{key:"Alt-A",run:Ry},{key:"Ctrl-m",mac:"Shift-Alt-m",run:qx}].concat(Dx),Yx={key:"Tab",run:Hd,shift:Kd};function H(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Bi{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(pc(l)):pc,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ge(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Bl(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ie(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=nr(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Mi(t,e.sliceString(t,i));return yo.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=nr(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Mi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(tp.prototype[Symbol.iterator]=ip.prototype[Symbol.iterator]=function(){return this});function jx(n){try{return new RegExp(n,ga),!0}catch{return!1}}function nr(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function kl(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=H("input",{class:"cm-textfield",name:"line",value:e}),i=H("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:sr.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},H("label",n.state.phrase("Go to line"),": ",t)," ",H("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,d=h?+h:l.number;if(h&&f){let g=d/100;a&&(g=g*(a=="-"?-1:1)+l.number/o.doc.lines),d=Math.round(o.doc.lines*g)}else h&&a&&(d=d*(a=="-"?-1:1)+l.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),O=Q.cursor(p.from+Math.max(0,Math.min(u,p.length)));n.dispatch({effects:[sr.of(!1),T.scrollIntoView(O.from,{y:"center"})],selection:O}),n.focus()}return{dom:i}}const sr=D.define(),Oc=pe.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sr)&&(n=t.value);return n},provide:n=>Mn.from(n,e=>e?kl:null)}),zx=n=>{let e=An(n,kl);if(!e){let t=[sr.of(!0)];n.state.field(Oc,!1)==null&&t.push(D.appendConfig.of([Oc,Vx])),n.dispatch({effects:t}),e=An(n,kl)}return e&&e.dom.querySelector("input").select(),!0},Vx=T.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Bx={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},np=X.define({combine(n){return bt(n,Bx,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Ix(n){let e=[Fx,Ux];return n&&e.push(np.of(n)),e}const Nx=q.mark({class:"cm-selectionMatch"}),Wx=q.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function gc(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=ee.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=ee.Word)}function Gx(n,e,t,i){return n(e.sliceDoc(t,t+1))==ee.Word&&n(e.sliceDoc(i-1,i))==ee.Word}const Ux=ae.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(np),{state:t}=n,i=t.selection;if(i.ranges.length>1)return q.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return q.none;let a=t.wordAt(s.head);if(!a)return q.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return q.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(gc(o,t,s.from,s.to)&&Gx(o,t,s.from,s.to)))return q.none}else if(r=t.sliceDoc(s.from,s.to),!r)return q.none}let l=[];for(let a of n.visibleRanges){let h=new Bi(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||gc(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(Wx.range(c,f)):(c>=s.to||f<=s.from)&&l.push(Nx.range(c,f)),l.length>e.maxMatches))return q.none}}return q.set(l)}},{decorations:n=>n.decorations}),Fx=T.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Hx=({state:n,dispatch:e})=>{let{selection:t}=n,i=Q.create(t.ranges.map(s=>n.wordAt(s.head)||Q.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function Kx(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Bi(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Bi(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const Jx=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return Hx({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=Kx(n,i);return s?(e(n.update({selection:n.selection.addRange(Q.range(s.from,s.to),!1),effects:T.scrollIntoView(s.to)})),!0):!1},Ji=X.define({combine(n){return bt(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new fS(e),scrollToMatch:e=>T.scrollIntoView(e)})}});class sp{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||jx(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new nS(this):new tS(this)}getCursor(e,t=0,i){let s=e.doc?e:G.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?wi(this,s,t,i):Si(this,s,t,i)}}class rp{constructor(e){this.spec=e}}function Si(n,e,t,i){return new Bi(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?eS(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function eS(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Si(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function wi(n,e,t,i){return new tp(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?iS(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function rr(n,e){return n.slice(xe(n,e,!1),e)}function or(n,e){return n.slice(e,xe(n,e))}function iS(n){return(e,t,i)=>!i[0].length||(n(rr(i.input,i.index))!=ee.Word||n(or(i.input,i.index))!=ee.Word)&&(n(or(i.input,i.index+i[0].length))!=ee.Word||n(rr(i.input,i.index+i[0].length))!=ee.Word)}class nS extends rp{nextMatch(e,t,i){let s=wi(this.spec,e,i,e.doc.length).next();return s.done&&(s=wi(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=wi(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=wi(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Xn=D.define(),ma=D.define(),Yt=pe.define({create(n){return new xo(vl(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Xn)?n=new xo(t.value.create(),n.panel):t.is(ma)&&(n=new xo(n.query,t.value?ba:null));return n},provide:n=>Mn.from(n,e=>e.panel)});class xo{constructor(e,t){this.query=e,this.panel=t}}const sS=q.mark({class:"cm-searchMatch"}),rS=q.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oS=ae.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Yt))}update(n){let e=n.state.field(Yt);(e!=n.startState.field(Yt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return q.none;let{view:t}=this,i=new zt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?rS:sS)})}return i.finish()}},{decorations:n=>n.decorations});function Un(n){return e=>{let t=e.state.field(Yt,!1);return t&&t.query.spec.valid?n(e,t):ap(e)}}const lr=Un((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=Q.single(i.from,i.to),r=n.state.facet(Ji);return n.dispatch({selection:s,effects:[ya(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),lp(n),!0}),ar=Un((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=Q.single(s.from,s.to),o=n.state.facet(Ji);return n.dispatch({selection:r,effects:[ya(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),lp(n),!0}),lS=Un((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:Q.create(t.map(i=>Q.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),aS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Bi(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(Q.range(l.value.from,l.value.to))}return e(n.update({selection:Q.create(r,o),userEvent:"select.search.matches"})),!0},mc=Un((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push(T.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l=Q.single(r.from-c,r.to-c),h.push(ya(n,r)),h.push(t.facet(Ji).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),hS=Un((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:T.announce.of(i),userEvent:"input.replace.all"}),!0});function ba(n){return n.state.facet(Ji).createPanel(n)}function vl(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(Ji);return new sp({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function op(n){let e=An(n,ba);return e&&e.dom.querySelector("[main-field]")}function lp(n){let e=op(n);e&&e==n.root.activeElement&&e.select()}const ap=n=>{let e=n.state.field(Yt,!1);if(e&&e.panel){let t=op(n);if(t&&t!=n.root.activeElement){let i=vl(n.state,e.query.spec);i.valid&&n.dispatch({effects:Xn.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[ma.of(!0),e?Xn.of(vl(n.state,e.query.spec)):D.appendConfig.of(dS)]});return!0},hp=n=>{let e=n.state.field(Yt,!1);if(!e||!e.panel)return!1;let t=An(n,ba);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:ma.of(!1)}),!0},cS=[{key:"Mod-f",run:ap,scope:"editor search-panel"},{key:"F3",run:lr,shift:ar,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:lr,shift:ar,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:hp,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aS},{key:"Mod-Alt-g",run:zx},{key:"Mod-d",run:Jx,preventDefault:!0}];class fS{constructor(e){this.view=e;let t=this.query=e.state.field(Yt).query.spec;this.commit=this.commit.bind(this),this.searchField=H("input",{value:t.search,placeholder:_e(e,"Find"),"aria-label":_e(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=H("input",{value:t.replace,placeholder:_e(e,"Replace"),"aria-label":_e(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=H("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=H("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=H("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return H("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=H("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>lr(e),[_e(e,"next")]),i("prev",()=>ar(e),[_e(e,"previous")]),i("select",()=>lS(e),[_e(e,"all")]),H("label",null,[this.caseField,_e(e,"match case")]),H("label",null,[this.reField,_e(e,"regexp")]),H("label",null,[this.wordField,_e(e,"by word")]),...e.state.readOnly?[]:[H("br"),this.replaceField,i("replace",()=>mc(e),[_e(e,"replace")]),i("replaceAll",()=>hS(e),[_e(e,"replace all")])],H("button",{name:"close",onclick:()=>hp(e),"aria-label":_e(e,"close"),type:"button"},["×"])])}commit(){let e=new sp({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Xn.of(e)}))}keydown(e){S1(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?ar:lr)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),mc(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(Xn)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ji).top}}function _e(n,e){return n.state.phrase(e)}const ws=30,Qs=/[\s\.,:;?!]/;function ya(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-ws),o=Math.min(s,t+ws),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-ws;a--)if(!Qs.test(l[a-1])&&Qs.test(l[a])){l=l.slice(0,a);break}}return T.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const uS=T.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),dS=[Yt,Ft.low(oS),uS];class cp{constructor(e,t,i,s){this.state=e,this.pos=t,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ue(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(up(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function bc(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function pS(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:pS(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function OS(n,e){return t=>{for(let i=ue(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class yc{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function jt(n){return n.selection.main.from}function up(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const xa=Ct.define();function gS(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>{if(l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i))return{range:l};let a=n.toText(e);return{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:a},range:Q.cursor(l.from+r+a.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const xc=new WeakMap;function mS(n){if(!Array.isArray(n))return n;let e=xc.get(n);return e||xc.set(n,e=fp(n)),e}const hr=D.define(),Ln=D.define();class bS{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(S=Bl(w))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!x||b==1&&g||v==0&&b!=0)&&(t[f]==w||i[f]==w&&(u=!0)?o[f++]=x:o.length&&(m=!1)),v=b,x+=Ie(w)}return f==a&&o[0]==0&&m?this.result(-100+(u?-200:0),o,e):d==a&&p==0?this.ret(-200-e.length+(O==e.length?0:-100),[0,O]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-200+-700-e.length,[p,O]):f==a?this.result(-100+(u?-200:0)+-700+(m?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?Ie(ge(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class yS{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:xS,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Sc(e(i),t(i)),optionClass:(e,t)=>i=>Sc(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Sc(n,e){return n?e?n+" "+e:n:e}function xS(n,e,t,i,s,r){let o=n.textDirection==J.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,d=s.right-e.right,p=i.right-i.left,O=i.bottom-i.top;if(l&&u=O||x>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,m=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${f/m}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function SS(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function So(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class wS{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(ye);this.optionContent=SS(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=So(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ye).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Ln.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=So(r.length,o,e.state.facet(ye).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=So(t.options.length,t.selected,this.view.state.facet(ye).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Te(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&kS(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,this.view,a);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew wS(t,n,e)}function kS(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function wc(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function vS(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(ye);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new yc(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,d=r.filterStrict?new yS(f):new bS(f);for(let p of h.result.options)if(u=d.match(p.label)){let O=p.displayLabel?c?c(p,u.matched):[]:u.matched;s(new yc(p,h.source,O,u.score+(p.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,d)=>{var p,O;return((p=u.rank)!==null&&p!==void 0?p:1e9)-((O=d.rank)!==null&&O!==void 0?O:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):wc(h.completion)>wc(l)&&(o[o.length-1]=h),l=h.completion}return o}class Pi{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Pi(this.options,Qc(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=vS(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new Pi(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(ye).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:MS,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Pi(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cr{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new cr(ZS,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ye),r=(i.override||t.languageDataAt("autocomplete",jt(t)).map(mS)).map(l=>(this.active.find(h=>h.source==l)||new ze(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!PS(r,this.active)?o=Pi.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new ze(l.source,0):l));for(let l of e.effects)l.is(Op)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new cr(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?$S:CS}}function PS(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const ZS=[];function dp(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(xa);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class ze{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=dp(e,t),s=this;(i&8||i&16&&this.touches(e))&&(s=new ze(s.source,0)),i&4&&s.state==0&&(s=new ze(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(hr))s=new ze(s.source,1,r.value?jt(e.state):-1);else if(r.is(Ln))s=new ze(s.source,0);else if(r.is(pp))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ze(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(jt(e.state))}}class Ri extends ze{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=jt(e.state);if((this.explicitPos<0?l<=r:lo||!s||t&2&&jt(e.startState)==this.from)return new ze(this.source,t&4?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return AS(s.validFor,e.state,r,o)?new Ri(this.source,a,s,r,o):s.update&&(s=s.update(s,r,o,new cp(e.state,l,a>=0)))?new Ri(this.source,a,s,s.from,(i=s.to)!==null&&i!==void 0?i:jt(e.state)):new ze(this.source,1,a)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ri(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ze(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function AS(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):up(n,!0).test(s)}const pp=D.define({map(n,e){return n.map(t=>t.map(e))}}),Op=D.define(),Re=pe.define({create(){return cr.start()},update(n,e){return n.update(e)},provide:n=>[sa.from(n,e=>e.tooltip),T.contentAttributes.from(n,e=>e.attrs)]});function Sa(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(Re).active.find(s=>s.source==e.source);return i instanceof Ri?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},gS(n.state,t,i.from,i.to)),{annotations:xa.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const MS=QS(Re,Sa);function ks(n,e="option"){return t=>{let i=t.state.field(Re,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Op.of(l)}),!0}}const RS=n=>{let e=n.state.field(Re,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Re,!1)?(n.dispatch({effects:hr.of(!0)}),!0):!1,TS=n=>{let e=n.state.field(Re,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Ln.of(null)}),!0)};class XS{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const LS=50,qS=1e3,ES=ae.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Re).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Re),t=n.state.facet(ye);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Re)==e)return;let i=n.transactions.some(r=>{let o=dp(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rLS&&Date.now()-o.time>qS){for(let l of o.context.abortListeners)try{l()}catch(a){Te(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(hr)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Re);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=jt(e),i=new cp(e,t,n.explicitPos==t,this.view),s=new XS(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Ln.of(null)}),Te(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ye).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ye);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new ze(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:pp.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Re,!1);if(e&&e.tooltip&&this.view.state.facet(ye).closeOnBlur){let t=e.open&&Wu(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Ln.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:hr.of(!1)}),20),this.composing=0}}}),DS=typeof navigator=="object"&&/Win/.test(navigator.platform),_S=Ft.highest(T.domEventHandlers({keydown(n,e){let t=e.state.field(Re,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(DS&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&Sa(e,i),!1}})),gp=T.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class YS{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class wa{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,be.TrackDel),i=e.mapPos(this.to,1,be.TrackDel);return t==null||i==null?null:new wa(this.field,t,i)}}class Qa{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew wa(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new YS(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new Qa(i,s)}}let jS=q.widget({widget:new class extends Zt{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),zS=q.mark({class:"cm-snippetField"});class en{constructor(e,t){this.ranges=e,this.active=t,this.deco=q.set(e.map(i=>(i.from==i.to?jS:zS).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new en(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const Fn=D.define({map(n,e){return n&&n.map(e)}}),VS=D.define(),qn=pe.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Fn))return t.value;if(t.is(VS)&&n)return new en(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>T.decorations.from(n,e=>e?e.deco:q.none)});function ka(n,e){return Q.create(n.filter(t=>t.field==e).map(t=>Q.range(t.from,t.to)))}function BS(n){let e=Qa.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:N.of(o)},scrollIntoView:!0,annotations:i?[xa.of(i),oe.userEvent.of("input.complete")]:void 0};if(l.length&&(a.selection=ka(l,0)),l.some(h=>h.field>0)){let h=new en(l,0),c=a.effects=[Fn.of(h)];t.state.field(qn,!1)===void 0&&c.push(D.appendConfig.of([qn,US,FS,gp]))}t.dispatch(t.state.update(a))}}function mp(n){return({state:e,dispatch:t})=>{let i=e.field(qn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:ka(i.ranges,s),effects:Fn.of(r?null:new en(i.ranges,s)),scrollIntoView:!0})),!0}}const IS=({state:n,dispatch:e})=>n.field(qn,!1)?(e(n.update({effects:Fn.of(null)})),!0):!1,NS=mp(1),WS=mp(-1),GS=[{key:"Tab",run:NS,shift:WS},{key:"Escape",run:IS}],vc=X.define({combine(n){return n.length?n[0]:GS}}),US=Ft.highest(In.compute([vc],n=>n.facet(vc)));function Ae(n,e){return Object.assign(Object.assign({},e),{apply:BS(n)})}const FS=T.domEventHandlers({mousedown(n,e){let t=e.state.field(qn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:ka(t.ranges,s.field),effects:Fn.of(t.ranges.some(r=>r.field>s.field)?new en(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),En={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},oi=D.define({map(n,e){let t=e.mapPos(n,-1,be.TrackAfter);return t??void 0}}),va=new class extends ci{};va.startSide=1;va.endSide=-1;const bp=pe.define({create(){return I.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(oi)&&(n=n.update({add:[va.range(t.value,t.value+1)]}));return n}});function HS(){return[JS,bp]}const wo="()[]{}<>";function yp(n){for(let e=0;e{if((KS?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Ie(ge(i,0))==1||e!=s.from||t!=s.to)return!1;let r=iw(n.state,i);return r?(n.dispatch(r),!0):!1}),ew=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=xp(n,n.selection.main.head).brackets||En.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=nw(n.doc,o.head);for(let a of i)if(a==l&&Tr(n.doc,o.head)==yp(ge(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:Q.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},tw=[{key:"Backspace",run:ew}];function iw(n,e){let t=xp(n,n.selection.main.head),i=t.brackets||En.brackets;for(let s of i){let r=yp(ge(s,0));if(e==s)return r==s?ow(n,s,i.indexOf(s+s+s)>-1,t):sw(n,s,r,t.before||En.before);if(e==r&&Sp(n,n.selection.main.from))return rw(n,s,r)}return null}function Sp(n,e){let t=!1;return n.field(bp).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Tr(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Ie(ge(t,0)))}function nw(n,e){let t=n.sliceString(e-2,e);return Ie(ge(t,0))==t.length?t:t.slice(1)}function sw(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:oi.of(o.to+e.length),range:Q.range(o.anchor+e.length,o.head+e.length)};let l=Tr(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:oi.of(o.head+e.length),range:Q.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function rw(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&Tr(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:Q.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ow(n,e,t,i){let s=i.stringPrefixes||En.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:oi.of(l.to+e.length),range:Q.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=Tr(n.doc,a),c;if(h==e){if(Pc(n,a))return{changes:{insert:e+e,from:a},effects:oi.of(a+e.length),range:Q.cursor(a+e.length)};if(Sp(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:Q.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=$c(n,a-2*e.length,s))>-1&&Pc(n,c))return{changes:{insert:e+e+e+e,from:a},effects:oi.of(a+e.length),range:Q.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=ee.Word&&$c(n,a,s)>-1&&!lw(n,a,e,s))return{changes:{insert:e+e,from:a},effects:oi.of(a+e.length),range:Q.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Pc(n,e){let t=ue(n).resolveInner(e+1);return t.parent&&t.from==e}function lw(n,e,t,i){let s=ue(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function $c(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=ee.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=ee.Word)return r}return-1}function aw(n={}){return[_S,Re,ye.of(n),ES,hw,gp]}const wp=[{key:"Ctrl-Space",run:kc},{mac:"Alt-`",run:kc},{key:"Escape",run:TS},{key:"ArrowDown",run:ks(!0)},{key:"ArrowUp",run:ks(!1)},{key:"PageDown",run:ks(!0,"page")},{key:"PageUp",run:ks(!1,"page")},{key:"Enter",run:RS}],hw=Ft.highest(In.computeN([ye],n=>n.facet(ye).defaultKeymap?[wp]:[]));class cw{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class ii{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(Dn).markerFilter;r&&(s=r(s,i));let o=q.set(s.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?q.widget({widget:new yw(l),diagnostic:l}).range(l.from):q.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new ii(o,t,Ii(o))}}function Ii(n,e=null,t=0){let i=null;return n.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new cw(s,r,o.diagnostic),!1}),i}function fw(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(Dn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(Qp))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function uw(n,e){return n.field(Ve,!1)?e:e.concat(D.appendConfig.of(ww))}const Qp=D.define(),Pa=D.define(),kp=D.define(),Ve=pe.define({create(){return new ii(q.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=Ii(t,n.selected.diagnostic,r)||Ii(t,null,r)}!t.size&&s&&e.state.facet(Dn).autoPanel&&(s=null),n=new ii(t,s,i)}for(let t of e.effects)if(t.is(Qp)){let i=e.state.facet(Dn).autoPanel?t.value.length?_n.open:null:n.panel;n=ii.init(t.value,i,e.state)}else t.is(Pa)?n=new ii(n.diagnostics,t.value?_n.open:null,n.selected):t.is(kp)&&(n=new ii(n.diagnostics,n.panel,t.value));return n},provide:n=>[Mn.from(n,e=>e.panel),T.decorations.from(n,e=>e.diagnostics)]}),dw=q.mark({class:"cm-lintRange cm-lintRange-active"});function pw(n,e,t){let{diagnostics:i}=n.state.field(Ve),s=[],r=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(ePp(n,t,!1)))}const gw=n=>{let e=n.state.field(Ve,!1);(!e||!e.panel)&&n.dispatch({effects:uw(n.state,[Pa.of(!0)])});let t=An(n,_n.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Cc=n=>{let e=n.state.field(Ve,!1);return!e||!e.panel?!1:(n.dispatch({effects:Pa.of(!1)}),!0)},mw=n=>{let e=n.state.field(Ve,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},bw=[{key:"Mod-Shift-m",run:gw,preventDefault:!0},{key:"F8",run:mw}],Dn=X.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function vp(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Pp(n,e,t){var i;let s=t?vp(e.actions):[];return H("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},H("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let d=Ii(n.state.field(Ve).diagnostics,e);d&&r.apply(n,d.from,d.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),H("u",h.slice(c,c+1)),h.slice(c+1)];return H("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&H("div",{class:"cm-diagnosticSource"},e.source))}class yw extends Zt{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return H("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Zc{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Pp(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class _n{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Cc(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=vp(r.actions);for(let l=0;l{for(let r=0;rCc(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ve).selected;if(!e)return-1;for(let t=0;t{let h=-1,c;for(let f=i;fi&&(this.items.splice(i,h-i),s=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.topl.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Ve),i=Ii(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:kp.of(i)})}static open(e){return new _n(e)}}function xw(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function vs(n){return xw(``,'width="6" height="3"')}const Sw=T.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:vs("#d11")},".cm-lintRange-warning":{backgroundImage:vs("orange")},".cm-lintRange-info":{backgroundImage:vs("#999")},".cm-lintRange-hint":{backgroundImage:vs("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),ww=[Ve,T.decorations.compute([Ve],n=>{let{selected:e,panel:t}=n.field(Ve);return!e||!t||e.from==e.to?q.none:q.set([dw.range(e.from,e.to)])}),lb(pw,{hideOn:fw}),Sw],Qw=(()=>[bb(),Sb(),D1(),_y(),fy(),$1(),R1(),G.allowMultipleSelections.of(!0),Hb(),dy(gy,{fallback:!0}),Qy(),HS(),aw(),F1(),J1(),B1(),Ix(),In.of([...tw,..._x,...cS,...Gy,...ly,...wp,...bw])])();class fr{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new fr(e,[],t,i,i,0,[],0,s?new Ac(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new fr(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new kw(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ac{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class kw{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class ur{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new ur(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ur(this.stack,this.pos,this.index)}}function On(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class Ls{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Mc=new Ls;class vw{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Mc,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Mc,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class Ti{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;$p(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Ti.prototype.contextual=Ti.prototype.fallback=Ti.prototype.extend=!1;class Pl{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?On(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if($p(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}Pl.prototype.contextual=Ti.prototype.fallback=Ti.prototype.extend=!1;class Hn{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function $p(n,e,t,i,s,r){let o=0,l=1<0){let p=n[d];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||Pw(p,e.token.value,s,r))){e.acceptToken(p);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,p=h+d+(d<<1),O=n[p],g=n[p+1]||65536;if(c=g)f=d+1;else{o=n[p+2],e.advance();continue e}}break}}function Rc(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function Pw(n,e,t,i){let s=Rc(t,i,e);return s<0||Rc(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class $w{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Tc(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Tc(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof le){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class Cw{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Ls)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Ls,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Ls,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new $w(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&Rw(s);if(o)return Ye&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ye&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Ye&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(B.contextHash)||0)==c))return e.useNode(f,u),Ye&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof le)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof le&&f.positions[0]==0)f=d;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ye&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(p):i.push(p)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Xc(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ye&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let d=0;f.forceReduce()&&d<10&&(Ye&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));d++)Ye&&(u=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))Ye&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Ye&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Xc(l,i)):(!s||s.scoren;class Mw{constructor(e){this.start=e.start,this.shift=e.shift||ko,this.reduce=e.reduce||ko,this.reuse=e.reuse||ko,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class dr extends td{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new ra(t.map((l,a)=>qe.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Hu;let o=On(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new Ti(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let s=new Zw(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=wt(this.data,r+2);else break;s=t(wt(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=wt(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(dr.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=Lc(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Tw=312,Xw=313,qc=1,Lw=2,qw=3,Ew=4,Dw=314,_w=316,Yw=317,jw=5,zw=6,Vw=0,$l=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Cp=125,Bw=59,Cl=47,Iw=42,Nw=43,Ww=45,Gw=60,Uw=44,Fw=63,Hw=46,Kw=91,Jw=new Mw({start:!1,shift(n,e){return e==jw||e==zw||e==_w?n:e==Yw},strict:!1}),eQ=new Hn((n,e)=>{let{next:t}=n;(t==Cp||t==-1||e.context)&&n.acceptToken(Dw)},{contextual:!0,fallback:!0}),tQ=new Hn((n,e)=>{let{next:t}=n,i;$l.indexOf(t)>-1||t==Cl&&((i=n.peek(1))==Cl||i==Iw)||t!=Cp&&t!=Bw&&t!=-1&&!e.context&&n.acceptToken(Tw)},{contextual:!0}),iQ=new Hn((n,e)=>{n.next==Kw&&!e.context&&n.acceptToken(Xw)},{contextual:!0}),nQ=new Hn((n,e)=>{let{next:t}=n;if(t==Nw||t==Ww){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(qc);n.acceptToken(i?qc:Lw)}}else t==Fw&&n.peek(1)==Hw&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(qw))},{contextual:!0});function vo(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const sQ=new Hn((n,e)=>{if(n.next!=Gw||!e.dialectEnabled(Vw)||(n.advance(),n.next==Cl))return;let t=0;for(;$l.indexOf(n.next)>-1;)n.advance(),t++;if(vo(n.next,!0)){for(n.advance(),t++;vo(n.next,!1);)n.advance(),t++;for(;$l.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==Uw)return;for(let i=0;;i++){if(i==7){if(!vo(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Ew,-t)}),rQ=id({"get set async static":y.modifier,"for while do if else switch try catch finally return throw break continue default case":y.controlKeyword,"in of await yield void typeof delete instanceof":y.operatorKeyword,"let var const using function class extends":y.definitionKeyword,"import export from":y.moduleKeyword,"with debugger as new":y.keyword,TemplateString:y.special(y.string),super:y.atom,BooleanLiteral:y.bool,this:y.self,null:y.null,Star:y.modifier,VariableName:y.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":y.function(y.variableName),VariableDefinition:y.definition(y.variableName),Label:y.labelName,PropertyName:y.propertyName,PrivatePropertyName:y.special(y.propertyName),"CallExpression/MemberExpression/PropertyName":y.function(y.propertyName),"FunctionDeclaration/VariableDefinition":y.function(y.definition(y.variableName)),"ClassDeclaration/VariableDefinition":y.definition(y.className),PropertyDefinition:y.definition(y.propertyName),PrivatePropertyDefinition:y.definition(y.special(y.propertyName)),UpdateOp:y.updateOperator,"LineComment Hashbang":y.lineComment,BlockComment:y.blockComment,Number:y.number,String:y.string,Escape:y.escape,ArithOp:y.arithmeticOperator,LogicOp:y.logicOperator,BitOp:y.bitwiseOperator,CompareOp:y.compareOperator,RegExp:y.regexp,Equals:y.definitionOperator,Arrow:y.function(y.punctuation),": Spread":y.punctuation,"( )":y.paren,"[ ]":y.squareBracket,"{ }":y.brace,"InterpolationStart InterpolationEnd":y.special(y.brace),".":y.derefOperator,", ;":y.separator,"@":y.meta,TypeName:y.typeName,TypeDefinition:y.definition(y.typeName),"type enum interface implements namespace module declare":y.definitionKeyword,"abstract global Privacy readonly override":y.modifier,"is keyof unique infer":y.operatorKeyword,JSXAttributeValue:y.attributeValue,JSXText:y.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":y.angleBracket,"JSXIdentifier JSXNameSpacedName":y.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":y.attributeName,"JSXBuiltin/JSXIdentifier":y.standard(y.tagName)}),oQ={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},lQ={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aQ={__proto__:null,"<":187},hQ=dr.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Jw,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[rQ],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[tQ,iQ,nQ,sQ,2,3,4,5,6,7,8,9,10,11,12,13,14,eQ,new Pl("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new Pl("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>oQ[n]||-1},{term:339,get:n=>lQ[n]||-1},{term:92,get:n=>aQ[n]||-1}],tokenPrec:15004}),Zp=[Ae("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ae("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ae("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ae("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ae("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ae(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ae("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ae(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Ae(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Ae('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ae('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],cQ=Zp.concat([Ae("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ae("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ae("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ec=new Cb,Ap=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function hn(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const fQ=["FunctionDeclaration"],uQ={FunctionDeclaration:hn("function"),ClassDeclaration:hn("class"),ClassExpression:()=>!0,EnumDeclaration:hn("constant"),TypeAliasDeclaration:hn("type"),NamespaceDeclaration:hn("namespace"),VariableDefinition(n,e){n.matchContext(fQ)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Mp(n,e){let t=Ec.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(fe.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=uQ[o.name];if(l&&l(o,r)||Ap.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of Mp(n,o.node))i.push(l);return!1}}),Ec.set(e,i),i}const Dc=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Rp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function dQ(n){let e=ue(n.state).resolveInner(n.pos,-1);if(Rp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Dc.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)Ap.has(s.name)&&(i=i.concat(Mp(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:Dc}}const hi=Hs.define({name:"javascript",parser:hQ.configure({props:[ld.add({IfStatement:po({except:/^\s*({|else\b)/}),TryStatement:po({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ub,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:Gb({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":po({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),cd.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Jb,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Tp={test:n=>/^JSX/.test(n.name),facet:rd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pQ=hi.configure({dialect:"ts"},"typescript"),OQ=hi.configure({dialect:"jsx",props:[ha.add(n=>n.isTop?[Tp]:void 0)]}),gQ=hi.configure({dialect:"jsx ts",props:[ha.add(n=>n.isTop?[Tp]:void 0)]},"typescript");let Xp=n=>({label:n,type:"keyword"});const Lp="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Xp),mQ=Lp.concat(["declare","implements","private","protected","public"].map(Xp));function bQ(n={}){let e=n.jsx?n.typescript?gQ:OQ:n.typescript?pQ:hi,t=n.typescript?cQ.concat(mQ):Zp.concat(Lp);return new Yb(e,[hi.data.of({autocomplete:OS(Rp,fp(t))}),hi.data.of({autocomplete:dQ}),n.jsx?SQ:[]])}function yQ(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function _c(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const xQ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),SQ=T.inputHandler.of((n,e,t,i,s)=>{if((xQ?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!hi.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=ue(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,p=d.parent;if(p&&d.from==c-2&&((u=_c(o.doc,p.firstChild,c))||((h=p.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let O=`${u}>`;return{range:Q.cursor(c+O.length,-1),changes:{from:c,insert:O}}}}else if(i==">"){let d=yQ(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=_c(o.doc,d,c)))return{range:a,changes:{from:c,insert:``}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class wQ extends Or{beforeRender(e){this.state={content:rO(at)(e.content,"")}}template(e){return Dt("section",{class:"editor"})}afterRender(e){this.refs.editor=new T({doc:this.state.content.get(),extensions:[Qw,In.of([Yx]),bQ(),T.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.base})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pr={},QQ={get exports(){return pr},set exports(n){pr=n}};(function(n,e){(function(t,i){i(e)})(Qi,function(t){function i(f){const u=new ArrayBuffer(4),d=new DataView(u);return d.setUint32(0,f),new Uint8Array(d.buffer)}function s(f,u=0,d=f.byteLength){let p="";const O=Math.min(d,f.byteLength-u);for(let g=0;gp+O.byteLength,0),d=new Uint8Array(u);for(let p=0,O=0;p79)throw new TypeError("Invalid length for key");const p=r("tEXt"),O=r(`${u}\0${d}`),g=i(function(k){if(h.length===0)for(let w=0;w<256;w++){let S=w;for(let b=0;b<8;b++)1&S?S=3988292384^S>>>1:S>>>=1;h[w]=S}const v=4294967295;return(((w,S,b)=>{let P=w;for(let Z=0;Z>>8;return P})(v,k,k.byteLength)^v)>>>0}(o([p,O]))),m=o([i(O.byteLength),p,O,g]),x=16+l(f).getUint32(8)+4;return o([f.subarray(0,x),m,f.subarray(x)])}t.addMetadata=c,t.addMetadataFromBase64DataURI=function(f,u,d){const p="data:image/png;base64,";if(typeof f!="string"||f.substring(0,p.length)!==p)throw new TypeError("Invalid PNG as Base64 Data URI");const O=atob(f.substring(p.length)),g=new Uint8Array(O.length);for(let x=0;x"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function i(h,c,f){var u=new XMLHttpRequest;u.open("GET",h),u.responseType="blob",u.onload=function(){a(u.response,c,f)},u.onerror=function(){console.error("could not download file")},u.send()}function s(h){var c=new XMLHttpRequest;c.open("HEAD",h,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function r(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Qi=="object"&&Qi.global===Qi?Qi:void 0,l=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(h,c,f){var u=o.URL||o.webkitURL,d=document.createElement("a");c=c||h.name||"download",d.download=c,d.rel="noopener",typeof h=="string"?(d.href=h,d.origin===location.origin?r(d):s(d.href)?i(h,c,f):r(d,d.target="_blank")):(d.href=u.createObjectURL(h),setTimeout(function(){u.revokeObjectURL(d.href)},4e4),setTimeout(function(){r(d)},0))}:"msSaveOrOpenBlob"in navigator?function(h,c,f){if(c=c||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(t(h,f),c);else if(s(h))i(h,c,f);else{var u=document.createElement("a");u.href=h,u.target="_blank",setTimeout(function(){r(u)})}}:function(h,c,f,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof h=="string")return i(h,c,f);var d=h.type==="application/octet-stream",p=/constructor/i.test(o.HTMLElement)||o.safari,O=/CriOS\/[\d]+/.test(navigator.userAgent);if((O||d&&p||l)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var k=g.result;k=O?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=k:location=k,u=null},g.readAsDataURL(h)}else{var m=o.URL||o.webkitURL,x=m.createObjectURL(h);u?u.location=x:location.href=x,u=null,setTimeout(function(){m.revokeObjectURL(x)},4e4)}});o.saveAs=a.saveAs=a,n.exports=a})})(kQ);const vQ=Zl;function PQ(n,{dataURL:e,blob:t,url:i,json:s}={}){if(s){const r=JSON.stringify(s,null,2);t=new Blob([r],{mimetype:"application/json"})}if(e){const r=e.split(","),o=r[0].match(/:(.*?);/)[1],l=atob(r[1]);let a=l.length;const h=new Uint8Array(a);for(;a--;)h[a]=l.charCodeAt(a);t=new Blob([h],{type:o})}return vQ.saveAs(t??i,n)}class $Q extends Or{template(e){return Dt("canvas",{class:"canvas",width:e.width,height:e.height})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d")}save(e=Date.now()+".png"){let t=this.base.toDataURL("image/png");return t=pr.addMetadataFromBase64DataURI(t,"Software","https://github.com/chevalvert/workshop-data-light"),PQ(e,{dataURL:t})}}class CQ extends Or{template(e){return Dt($Q,{width:e.frameCount,height:e.ledCount})}}function Yc(){}const ZQ=`export function setup () { + console.log('setup') +} + +export function draw () { + console.log(frameCount) +} +`;var Yn,jn;class AQ extends Or{constructor(){super(...arguments);gi(this,"state",{running:at(!1)});gi(this,"store",{code:at(ZQ.toString()),data:at("{}"),title:at(""),author:at(""),description:at(""),frames:at(300),frameRate:at(30),ledCount:at(+"300")});gi(this,"tick",Yc);gi(this,"context",new $m);Xr(this,Yn,async t=>{try{Yr.remove(this.tick);const i=await iO(()=>import("data:text/javascript,"+t),[]);(i.setup??Yc)(),this.tick=oO(this.context.frameRate,s=>{if(this.context.frameCount>=this.context.frames-1){this.stop();return}try{(i.draw??i.default)(s)}catch(r){tn(this,jn).call(this,r)}this.context.frameCount++}),this.context.reset(),Yr.add(this.tick),this.state.running.set(!0)}catch(i){tn(this,jn).call(this,i)}});Xr(this,jn,t=>{console.error(t),this.stop()})}template(){return Dt("main",{class:["app",{"is-running":this.state.running}]},Dt(wQ,{ref:this.ref("editor"),content:this.store.code}),Dt(CQ,{ref:this.ref("scene"),frameCount:this.store.frameCount}))}afterRender(){for(const t of["data","ledCount","frames","frameRate"]){const i=this.createContextPropHandler(t);this.store[t].subscribe(i),i(this.store[t].get())}this.store.code.subscribe(tn(this,Yn)),tn(this,Yn).call(this,this.store.code.get())}createContextPropHandler(t){return i=>{this.context[t]=i,this.context.reset()}}stop(){Yr.remove(this.tick),this.state.running.set(!1)}}Yn=new WeakMap,jn=new WeakMap;jc(Dt(AQ,null)); diff --git a/assets/index-be402730.js b/assets/index-be402730.js new file mode 100644 index 0000000..fec1de8 --- /dev/null +++ b/assets/index-be402730.js @@ -0,0 +1,230 @@ +var t9=Object.defineProperty;var r9=(n,e,t)=>e in n?t9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(r9(n,typeof e!="symbol"?e+"":e,t),t),Sb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var kr=(n,e,t)=>(Sb(n,e,"read from private field"),t?t.call(n):e.get(n)),Rn=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Sb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Sb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function ED(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function n9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const CD=["nodes","components","refs","domEvents","storeEvents"];let Ya=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let Cb;const Xi=(n,e)=>n.substr(0,e.length)===e,wD=n=>(e,t)=>t.classList.toggle(n,e||!1),wb=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}Cb=t??"",e||(r[n]=Cb),(e||s9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,Cb)}};function i9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};Eb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{wb(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&wb(e,i)(t,n)}}function a9(n){return Array.isArray(n)?n:[n]}function fl(n,e){if(Array.isArray(n))return o9(n,e);if(n instanceof window.Element)return c9(n);if(n===null||typeof n!="object"||!n.vnode)return l9(n);const t=ED(ED({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return u9(n,t,e);if(n.isInstance)return kD(n,t,e,!0);if(n.isStateless)return f9(n,t,e);if(n.isComponent)return kD(n,t,e)}function o9(n,e){n=a9(n);const t=new Ya;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Ex(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=v9(l),l in AD)return;AD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":b9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var dv={},S9={get exports(){return dv},set exports(n){dv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(S9);function E9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var hc=typeof window>"u"?global:window,Ki=[],$a=[],ja=[],xi=null,Ji=null,qo=!1,Cx=!1,wx,fi;function _u(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,wx+=fi,Ji=n,xi=qo?null:hc.requestAnimationFrame(_u),qo&&(qo=!1);var e;if(Cx){for(e=0;e0||ja.length>0}function kx(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Ax(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function C9(n,e){kx(ja,n,e)&&dc()}function w9(n,e){kx($a,n,e)&&dc()}function k9(n,e){kx(Ki,n,e)&&VI()}function A9(n){Ax(ja,n)&&dc()}function P9(n,e){Ax($a,n)&&dc()}function T9(n){Ax(Ki,n)&&Px()}function VI(n){qo=!1,!xi&&(n=!!n,Ji=null,n?_u():xi=hc.requestAnimationFrame(_u))}function D9(){xi||(qo=!0,Ji=null,xi=hc.requestAnimationFrame(_u))}function Px(){xi&&(hc.cancelAnimationFrame(xi),xi=null)}function I9(){Px(),Ki.length=0,$a.length=0,ja.length=0,Cx=!1,Ji=null,wx=0,fi=0}const PD={add:k9,addAfter:w9,addBefore:C9,remove:T9,removeAfter:P9,removeBefore:A9,start:VI,stop:Px,time:wx,dt:fi,requestOnce:D9,dispose:I9};function TD(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function kb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let UI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new TD(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof TD)return kb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&kb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)kb(this,e),e=e.next}},R9=class extends UI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},WI=class extends R9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function fr(n){return new WI(n)}function Ab(n,e){const t=new WI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof UI)return t;if(t!==void 0)return n(t)}return n(null)},F9="ui-backdrop-1l3kn107",_9={backdrop:F9,"loader-spin":"ui-loader-spin-1l3kn1"};class B9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(fr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[_9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const L9="ui-button-1urez107",N9="ui-button__label-1urez161",M9="ui-button__icon-1urez171",Pb={button:L9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:N9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:M9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(fr)(e["store-label"],e.label),title:vr(fr)(e["store-title"],e.title),icon:vr(fr)(e["store-icon"],e.icon),active:vr(fr)(e["store-active"],e.active),disabled:vr(fr)(e["store-disabled"],e.disabled),hidden:vr(fr)(e["store-hidden"],e.hidden),waiting:vr(fr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Pb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Pb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Pb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const $9="ui-input-ada4i107",j9="ui-input__icon-ada4i150",wo={input:$9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:j9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class ko extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(fr)(e["store-value"],e.value),files:vr(fr)(e["store-files"],e.files),placeholder:vr(fr)(e["store-placeholder"],e.placeholder),title:vr(fr)(e["store-title"],e.title),label:vr(fr)(e["store-label"],e.label),before:vr(fr)(e["store-before"],e.before),after:vr(fr)(e["store-after"],e.after),icon:vr(fr)(e["store-icon"],e.icon),accept:vr(fr)(e["store-accept"],e.accept??"*"),multiple:vr(fr)(e["store-multiple"],e.multiple??"*"),min:vr(fr)(e["store-min"],e.min),max:vr(fr)(e["store-max"],e.max),step:vr(fr)(e["store-step"],e.step),active:vr(fr)(e["store-active"],e.active),disabled:vr(fr)(e["store-disabled"],e.disabled),hidden:vr(fr)(e["store-hidden"],e.hidden),waiting:vr(fr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[wo.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:wo.input__icon,"store-innerHTML":t.icon}),zt("label",{class:wo.input__label,"store-innerHTML":t.label}),zt("label",{class:wo.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:wo.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const q9="ui-modal-1ng3s107",Q9="ui-modal__header-1ng3s119",V9="ui-modal__title-1ng3s125",U9="ui-modal__content-1ng3s129",Ao={modal:q9,modal__header:Q9,modal__title:V9,modal__content:U9,"loader-spin":"ui-loader-spin-1ng3s1"},W9=` + + +`;class GI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(fr)(e["store-title"],e.title),tabs:vr(fr)(e["store-tabs"],e.tabs),locked:vr(fr)(e["store-locked"],e.locked)}}template(e,t){return zt(B9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Ao.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Ao.modal__header},zt(Hs,{class:Ao.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Ao.modal__close,icon:W9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Ao.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const G9="ui-toolbar-1r0eh107",z9={toolbar:G9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Su extends qs{beforeRender(e){this.state={compact:vr(fr)(e["store-compact"],e.compact),disabled:vr(fr)(e["store-disabled"],e.disabled),hidden:vr(fr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[z9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function DD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}DD.debounce=DD;const Z9=` + + +`,X9=` + + + +`,Y9=` + + + +`,H9=` + + + +`,K9=` + + +`,J9=` + + + + + + +`,ID=` + + + + +`,e4=` + + + + +`,t4=` + + + + +`,RD=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,r4=` + + +`;function zI(n,e,t){return Math.max(e,Math.min(n,t))}function ZI(n,e,t){return n>t?n%t:np4(h4(e,n),t),Tx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},HI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])HI[`[object ${n}]`]=n.toLowerCase();function dr(n){return HI[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ha=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:mc,min:KI,max:JI}=Math,es=n=>Math.round(n*100)/100,gv=n=>Math.round(n*100)/100,Xs=mc*2,Tb=mc/3,d4=mc/180,m4=180/mc;function eR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ha(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Tx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const g4="3.1.2",hr=(...n)=>new Ct(...n);hr.version=g4;const qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},y4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,b4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,tR=n=>{if(n.match(y4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(b4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Xl}=Math,rR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ha(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Xl(e),t=Xl(t),r=Xl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Xl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=rR(this._rgb,"rgb");for(let e of Object.keys(qa))if(qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),qa[n])return tR(qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},v4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=v4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function zo(){return Ns.labWhitePoint}const Dx=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=x4(e,t,r),[C,A,_]=nR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},x4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Db=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},nR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Db(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Db(ct*l.m01+yt*l.m11+ft*l.m21),xt=Db(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Ix=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=sR(e,t,r),[A,_,B]=O4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function O4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Ib(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const sR=(n,e,t)=>{n=Ib(n/255),e=Ib(e/255),t=Ib(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Ix(this._rgb)};const S4=(...n)=>new Ct(...n,"lab");Object.assign(hr,{lab:S4,getLabWhitePoint:zo,setLabWhitePoint:Ks});lr.format.lab=Dx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:E4}=Math,C4=1e-7,w4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=w4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return k4(...this._rgb.slice(0,3))};const k4=(n,e,t)=>(n=Rb(n),e=Rb(e),t=Rb(t),.2126*n+.7152*e+.0722*t),Rb=n=>(n/=255,n<=.03928?n/12.92:E4((n+.055)/1.055,2.4)),bn={},Qa=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Qa(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:A4,cos:P4}=Math,iR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*d4,[e,P4(r)*t,A4(r)*t]},Rx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=iR(e,t,r),[C,A,_]=Dx(i,l,h);return[C,A,_,n.length>3?n[3]:1]},T4=(...n)=>{const e=eR(ur(n,"hcl"));return Rx(...e)},{sqrt:D4,atan2:I4,round:R4}=Math,aR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=D4(t*t+r*r);let l=(I4(r,t)*m4+360)%360;return R4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},Fx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Ix(e,t,r),[A,_,B]=aR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return Fx(this._rgb)};Ct.prototype.hcl=function(){return eR(Fx(this._rgb))};const F4=(...n)=>new Ct(...n,"lch"),_4=(...n)=>new Ct(...n,"hcl");Object.assign(hr,{lch:F4,hcl:_4});lr.format.lch=Rx;lr.format.hcl=T4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Qa(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Qa(this,"black",n,...e)};const B4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=B4;const{sqrt:Fb,pow:Oa}=Math,L4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(Fb(Oa(r,2)*(1-t)+Oa(h,2)*t),Fb(Oa(i,2)*(1-t)+Oa(C,2)*t),Fb(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=L4;const N4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=N4;const Ka=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},oR=(n,e,t)=>Ka(n,e,t,"lch");bn.lch=oR;bn.hcl=oR;const M4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},$4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return $4(this._rgb)};const j4=(...n)=>new Ct(...n,"num");Object.assign(hr,{num:j4});lr.format.num=M4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const q4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=q4;const{floor:Q4}=Math,V4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=Q4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},U4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=KI(e,t,r),l=JI(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return U4(this._rgb)};const W4=(...n)=>new Ct(...n,"hcg");hr.hcg=W4;lr.format.hcg=V4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const G4=(n,e,t)=>Ka(n,e,t,"hcg");bn.hcg=G4;const{cos:Sa}=Math,z4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Tb-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Tb-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Tb-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Z4,sqrt:X4,acos:Y4}=Math,H4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Z4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=X4((e-t)*(e-t)+(e-r)*(t-r)),i=Y4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return H4(this._rgb)};const K4=(...n)=>new Ct(...n,"hsi");hr.hsi=K4;lr.format.hsi=z4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const J4=(n,e,t)=>Ka(n,e,t,"hsi");bn.hsi=J4;const yv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},lR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=KI(e,t,r),l=JI(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return lR(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsl");hr.hsl=eQ;lr.format.hsl=yv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const tQ=(n,e,t)=>Ka(n,e,t,"hsl");bn.hsl=tQ;const{floor:rQ}=Math,nQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=rQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:sQ,max:iQ}=Math,aQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=sQ(e,t,r),l=iQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return aQ(this._rgb)};const oQ=(...n)=>new Ct(...n,"hsv");hr.hsv=oQ;lr.format.hsv=nQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const lQ=(n,e,t)=>Ka(n,e,t,"hsv");bn.hsv=lQ;function Bu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const _x=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=uQ([e,t,r]),[A,_,B]=nR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function uQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Bu(t,n);return Bu(e,r.map(i=>i**3))}const Bx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=sR(e,t,r);return[...cQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function cQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Bu(e,n);return Bu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Bx(this._rgb)};const fQ=(...n)=>new Ct(...n,"oklab");Object.assign(hr,{oklab:fQ});lr.format.oklab=_x;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const pQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=pQ;const hQ=(n,e,t)=>Ka(n,e,t,"oklch");bn.oklch=hQ;const{pow:_b,sqrt:Bb,PI:Lb,cos:FD,sin:_D,atan2:dQ}=Math,mQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return gQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},gQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Tx(r))},{pow:yQ}=Math;function Lu(n){let e="rgb",t=hr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&hr.brewer&&hr.brewer[Ye.toLowerCase()]&&(Ye=hr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=yQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=hr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=hr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=hr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Ur=20;for(;Math.abs(er)>.01&&Ur-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=bQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return hr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=hr(Ye),ot):t},ot}function bQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const vQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=vQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},OQ=n=>{const e=xQ(n);return e.scale=()=>Lu(e),e},{round:uR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(uR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:uR(e):e)};const SQ=(...n)=>new Ct(...n,"rgb");Object.assign(hr,{rgb:SQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=hr(t).rgb(),i=hr(e).rgb();return hr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},EQ=n=>n,CQ=(n,e)=>n*e/255,wQ=(n,e)=>n>e?e:n,kQ=(n,e)=>n>e?n:e,AQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),PQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),TQ=(n,e)=>255*(1-(1-e/255)/(n/255)),DQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(EQ));ms.multiply=Di(Ii(CQ));ms.screen=Di(Ii(AQ));ms.overlay=Di(Ii(PQ));ms.darken=Di(Ii(wQ));ms.lighten=Di(Ii(kQ));ms.dodge=Di(Ii(DQ));ms.burn=Di(Ii(TQ));const{pow:IQ,sin:RQ,cos:FQ}=Math;function _Q(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=IQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=FQ(_),me=RQ(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return hr(Tx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>hr.scale(C),C.hue(t),C}const BQ="0123456789abcdef",{floor:LQ,random:NQ}=Math,MQ=()=>{let n="#";for(let e=0;e<6;e++)n+=BQ.charAt(LQ(NQ()*16));return new Ct(n,"hex")},{log:BD,pow:$Q,floor:jQ,abs:qQ}=Math;function cR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>fR(t,r,i),t}function fR(n,e="equal",t=7){dr(n)=="array"&&(n=cR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*BD(r),A=Math.LOG10E*BD(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const QQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const LD=.027,VQ=5e-4,UQ=.1,ND=1.14,Yl=.022,MD=1.414,WQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Qa(e,n,n.alpha(),"rgb"));const t=$D(...n.rgb()),r=$D(...e.rgb()),i=t>=Yl?t:t+Math.pow(Yl-t,MD),l=r>=Yl?r:r+Math.pow(Yl-r,MD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-LD:A+LD)*100};function $D(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:GQ,max:zQ,atan2:jD,abs:qD,cos:Hl,sin:QD,exp:ZQ,PI:VD}=Math;function XQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*VD)},h=function(dn){return 2*VD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(jD(_,Je)),xt=l(jD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=qD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Hl(h(Nt-30))+.24*Hl(h(2*Nt))+.32*Hl(h(3*Nt+6))-.2*Hl(h(4*Nt-63));let Yt=_t-It;Yt=qD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*QD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Ur=1+.045*ot,On=1+.015*ot*At,qr=30*ZQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*QD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Ur),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Ur))*(Yt/(i*On)));return zQ(0,GQ(100,hn))}function YQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const HQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},KQ={cool(){return Lu([hr.hsl(180,1,.9),hr.hsl(250,.7,.4)])},hot(){return Lu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},bv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},pR=Object.keys(bv),UD=new Map(pR.map(n=>[n.toLowerCase(),n])),JQ=typeof Proxy=="function"?new Proxy(bv,{get(n,e){const t=e.toLowerCase();if(UD.has(t))return n[UD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(pR)}}):bv,eV=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:WD}=Math,tV=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-WD(e,WD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return tV(this._rgb)};const rV=(...n)=>new Ct(...n,"cmyk");Object.assign(hr,{cmyk:rV});lr.format.cmyk=eV;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const nV=(...n)=>{const e=ur(n,"hsla");let t=Ha(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},sV=(...n)=>{const e=ur(n,"lab");let t=Ha(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},iV=(...n)=>{const e=ur(n,"lch");let t=Ha(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},aV=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=gv(e[1]),e[2]=gv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},hR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Bx(e,t,r),[A,_,B]=aR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},oV=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=gv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Nb}=Math,lV=(...n)=>{const e=ur(n,"rgba");let t=Ha(n)||"rgb";if(t.substr(0,3)==="hsl")return nV(lR(e),t);if(t.substr(0,3)==="lab"){const r=zo();Ks("d50");const i=sV(Ix(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=zo();Ks("d50");const i=iV(Fx(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?aV(Bx(e)):t.substr(0,5)==="oklch"?oV(hR(e)):(e[0]=Nb(e[0]),e[1]=Nb(e[1]),e[2]=Nb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},dR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=iR(e,t,r),[A,_,B]=_x(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Nu=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,Ja=/\s+/.source,Lx=/\s*,\s*/.source,gc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,eo=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,mR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(Ja)+eo+"\\)$"),gR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Lx)+rs+"\\)$"),yR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Lx)+rs+"\\)$"),bR=new RegExp("^hsla?\\("+rs+[gc,Nu,Nu].join(Ja)+eo+"\\)$"),vR=new RegExp("^hsl?\\("+rs+[gc,Nu,Nu].join(Lx)+rs+"\\)$"),xR=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,OR=new RegExp("^lab\\("+rs+[ds,ds,ds].join(Ja)+eo+"\\)$"),SR=new RegExp("^lch\\("+rs+[ds,ds,gc].join(Ja)+eo+"\\)$"),ER=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(Ja)+eo+"\\)$"),CR=new RegExp("^oklch\\("+rs+[ds,ds,gc].join(Ja)+eo+"\\)$"),{round:wR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(wR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),An=(n,e)=>n==="none"?e:n,Nx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(mR))||(e=n.match(gR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(An(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(yR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(bR))||(e=n.match(vR))){const t=e.slice(1,4);t[0]=+An(t[0].replace("deg",""),0),t[1]=+zr(An(t[1],0),0,100)*.01,t[2]=+zr(An(t[2],0),0,100)*.01;const r=Ea(yv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(xR)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=yv(t);for(let i=0;i<3;i++)r[i]=wR(r[i]);return r[3]=+e[4],r}if(e=n.match(OR)){const t=e.slice(1,4);t[0]=zr(An(t[0],0),0,100),t[1]=zr(An(t[1],0),-125,125,!0),t[2]=zr(An(t[2],0),-125,125,!0);const r=zo();Ks("d50");const i=Ea(Dx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(SR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(An(t[1],0),0,150,!1),t[2]=+An(t[2].replace("deg",""),0);const r=zo();Ks("d50");const i=Ea(Rx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(ER)){const t=e.slice(1,4);t[0]=zr(An(t[0],0),0,1),t[1]=zr(An(t[1],0),-.4,.4,!0),t[2]=zr(An(t[2],0),-.4,.4,!0);const r=Ea(_x(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(An(t[0],0),0,1),t[1]=zr(An(t[1],0),0,.4,!1),t[2]=+An(t[2].replace("deg",""),0);const r=Ea(dR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Nx.test=n=>mR.test(n)||bR.test(n)||OR.test(n)||SR.test(n)||ER.test(n)||CR.test(n)||gR.test(n)||yR.test(n)||vR.test(n)||xR.test(n)||n==="transparent";Ct.prototype.css=function(n){return lV(this._rgb,n)};const uV=(...n)=>new Ct(...n,"css");hr.css=uV;lr.format.css=Nx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Nx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const cV=(...n)=>new Ct(...n,"gl");hr.gl=cV;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return rR(this._rgb,n)};const fV=(...n)=>new Ct(...n,"hex");hr.hex=fV;lr.format.hex=tR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:Kl}=Math,kR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*Kl(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*Kl(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*Kl(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*Kl(r),i=255),[t,r,i,1]},{round:pV}=Math,hV=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=kR(C);A[2]/A[0]>=r/t?l=C:i=C}return pV(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return hV(this._rgb)};const Mb=(...n)=>new Ct(...n,"temp");Object.assign(hr,{temp:Mb,kelvin:Mb,temperature:Mb});lr.format.temp=lr.format.kelvin=lr.format.temperature=kR;Ct.prototype.oklch=function(){return hR(this._rgb)};const dV=(...n)=>new Ct(...n,"oklch");Object.assign(hr,{oklch:dV});lr.format.oklch=dR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(hr,{analyze:cR,average:mQ,bezier:OQ,blend:ms,brewer:JQ,Color:Ct,colors:qa,contrast:QQ,contrastAPCA:WQ,cubehelix:_Q,deltaE:XQ,distance:YQ,input:lr,interpolate:Qa,limits:fR,mix:Qa,random:MQ,scale:Lu,scales:KQ,valid:HQ});class mV{constructor(){or(this,"PROPERTIES",{...f4,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:hr,rgb:(e=0,t=e,r=t=e)=>hr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>hr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{for(let i=Math.round(e);i{this.line(0,this.ledCount,e)},gradient:(e,t,r,i)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))gV(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let r=0;r"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(yV);const bV=vv;var ea={},vV={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Va(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Va(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Qo(this),l=new Qo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Qo(this,e)}iterRange(e,t=this.length){return new AR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new PR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=SV(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new EV(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(GD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=Eu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Va(this,e,t);let i=Eu(this.text,Eu(r.text,GD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Va(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function SV(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Eu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class AR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Qo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class PR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Qo.prototype[Symbol.iterator]=AR.prototype[Symbol.iterator]=PR.prototype[Symbol.iterator]=function(){return this});class EV{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Va(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function zD(n){return n>=127462&&n<=127487}const ZD=8205;function pn(n,e,t=!0,r=!0){return(t?TR:wV)(n,e,r)}function TR(n,e,t){if(e==n.length)return e;e&&DR(n.charCodeAt(e))&&IR(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&zD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function wV(n,e,t){for(;e>0;){let r=TR(n,e-2,t);if(r=56320&&n<57344}function IR(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!IR(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return DR(r)?(t-55296<<10)+(r-56320)+65536:t}function Mx(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const xv=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ov(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Sv(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||xv)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Sv(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Zo(n),C=new Zo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Zo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function FR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let $x=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=$x++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:jx),!!e.static,e.enables)}of(e){return new Cu([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Cu(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Cu(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function jx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class Cu{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=$x++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Ev(q,B)){let ie=r(q);if(C?!XD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=$u(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?XD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function XD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(YD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,YD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function Po(n){return e=>new _R(e,n)}const Ri={highest:Po(Yi.highest),high:Po(Yi.high),default:Po(Yi.default),low:Po(Yi.low),lowest:Po(Yi.lowest)};class _R{constructor(e,t){this.inner=e,this.prec=t}}class yc{of(e){return new Cv(this,e)}reconfigure(e){return yc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Cv{constructor(e,t){this.compartment=e,this.inner=t}}class Mu{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of AV(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,jx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>kV($e,me,ie))}}let q=_.map(Y=>Y(C));return new Mu(e,h,q,C,A,l)}}function AV(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof Cv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof Cv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof _R)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof Cu)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Vo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function $u(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const BR=$t.define(),wv=$t.define({combine:n=>n.some(e=>e),static:!0}),LR=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),NR=$t.define(),MR=$t.define(),$R=$t.define(),jR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new PV}}class PV{of(e){return new ri(this,e)}}class TV{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new TV(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&FR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function DV(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=QR(e,Ia(l),!1)}return n}function RV(n){let e=n.startState,t=e.facet($R),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=qR(r,kv(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const FV=[];function Ia(n){return n==null?FV:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const _V=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Av;try{Av=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function BV(n){if(Av)return Av.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||_V.test(t)))return!0}return!1}function LV(n){return e=>{if(!/\S/.test(e))return Br.Space;if(BV(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=Mu.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(wv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Mu.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||xv)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return FR(i,r.length),t.staticFacet(wv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(jR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(BR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return LV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=LR;Sr.readOnly=jR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=BR;Sr.changeFilter=NR;Sr.transactionFilter=MR;Sr.transactionExtender=$R;yc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Pv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Pv=class VR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new VR(e,t,r)}};function Tv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Tv)),this.isEmpty)return t.length?gr.of(t):this;let C=new UR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Xo.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Xo.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=HD(h,C,r),_=new To(h,A,l),B=new To(C,A,l);r.iterGaps((q,Y,ie)=>KD(_,q,B,Y,ie,i)),r.empty&&r.length==0&&KD(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=HD(l,h),A=new To(l,C,0).goto(r),_=new To(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Dv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new To(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Pv?[e]:t?NV(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function NV(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Tv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function HD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new UR(h,t,r,l));return i.length==1?i[0]:new Xo(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)$b(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)$b(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),$b(this.heap,0)}}}function $b(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class To{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Xo.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Jl(this.active,e),Jl(this.activeTo,e),Jl(this.activeRank,e),this.minActive=JD(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;eu(this.active,t,r),eu(this.activeTo,t,i),eu(this.activeRank,t,l),e&&eu(e,t,this.cursor.from),this.minActive=JD(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Jl(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function KD(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Dv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Dv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Dv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function JD(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Rv="ͼ",e2=typeof Symbol>"u"?"__"+Rv:Symbol.for(Rv),Fv=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),t2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=t2[e2]||1;return t2[e2]=e+1,Rv+e.toString(36)}static mount(e,t,r){let i=e[Fv],l=r&&r.nonce;i?l&&i.setNonce(l):i=new MV(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let r2=new Map;class MV{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=r2.get(r);if(l)return e[Fv]=l;this.sheet=new i.CSSStyleSheet,r2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Fv]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},$V=typeof navigator<"u"&&/Mac/.test(navigator.platform),jV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Yo[un]=String.fromCharCode(un);for(var jb in ki)Yo.hasOwnProperty(jb)||(Yo[jb]=ki[jb]);function qV(n){var e=$V&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||jV&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Yo:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ho(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function _v(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function wu(n,e){if(!e.anchorNode)return!1;try{return _v(n,e.anchorNode)}catch{return!1}}function Ko(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Uo(n,e,t,r){return t?n2(n,e,t,r,-1)||n2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function ju(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function n2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function bc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function QV(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function WR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function VV(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=QV(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=WR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class WV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function GR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function XR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!ju(t))r=oa(t),t=t.parentNode;else return null}}function YR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Qx){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function KR(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:l2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:vc,ie_version:eF?Bv.documentMode||6:Nv?+Nv[1]:Lv?+Lv[1]:0,gecko:a2,gecko_version:a2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!qb,chrome_version:qb?+qb[1]:0,ios:l2,android:/Android\b/.test(_n.userAgent),webkit:o2,safari:tF,webkit_version:o2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Bv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const ZV=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>ZV||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return XV(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(zR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return rF(this,e)}coordsAt(e,t){return sF(this,e,t)}}function XV(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?bc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Ua.prototype.children=Qx;function rF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?nF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function sF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function $v(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function HV(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=iF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new hl(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class pl extends Ht{constructor(e){let{start:t,end:r}=iF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof pl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&qu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}pl.prototype.point=!1;class hl extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof hl&&this.spec.class==e.spec.class&&qu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}hl.prototype.mapMode=cn.TrackBefore;hl.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Tn.WidgetRange:this.startSide<=0?Tn.WidgetBefore:Tn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&KV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function iF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function KV(n,e){return n==e||!!(n&&e&&n.compare(e))}function jv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),JR(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){nF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=Mv(t,this.attrs||{})),r&&(this.attrs=Mv({class:r},this.attrs||{}))}domAtPos(e){return rF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(zR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&($v(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=Ko(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=sF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Wo{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(tu(new Ua(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(tu(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Wa.block,C,r));else{let A=bi.create(r.widget||Wa.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(tu(new Ua(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(tu(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new Wo(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function tu(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Wa extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Wa.inline=new Wa("span");Wa.block=new Wa("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Vx=Rr.RTL;function aF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function lF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function sU(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Vv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Uv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Vv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Uv(n,i,i,t,0,n.length,r),r}function uF(n){return[new vi(0,n,0)]}let cF="";function aU(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),cF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),bF=$t.define({combine:n=>n.some(e=>e)}),vF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ru=sr.define({map:(n,e)=>n.map(e)}),xF=sr.define();function Pn(n,e,t){let r=n.facet(dF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let lU=0;const Bo=$t.define();class Vr{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Vr(lU++,e,r,i,C=>{let A=[Bo.of(C)];return h&&A.push(Jo.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Vr.define(r=>new e(r),t)}}class Qb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Pn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Pn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Pn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const OF=$t.define(),Gx=$t.define(),Jo=$t.define(),SF=$t.define(),zx=$t.define(),EF=$t.define();function c2(n,e){let t=n.state.facet(EF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=oU(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const CF=$t.define();function wF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(CF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Lo=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Qu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Qu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class f2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!mU(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?cU(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=hU(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=Wo.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=Wo.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=Wo.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);KR(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(xF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&wu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&uU(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Uo(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Uo(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&dU(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Ho(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=fU(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?XR:YR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Uo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ho(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?Ko(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=Ko(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new HR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Jo).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(SF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=wF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;VV(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function gU(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function bU(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vb(n,e){return n.tope.top+1}function p2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function Gv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=Ko(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Vb(i,Qe)&&(Qe=p2(h2(Qe,i.bottom),i.top));let Je=yU(e,Qe),ct=bU(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?d2(me,e,t):Gv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Vb(B,Qe)?B=h2(B,Qe.bottom):q&&Vb(q,Qe)&&(q=p2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return d2(r,Y,t);if(C&&r.contentEditable!="false")return Gv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function d2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function AF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Tn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:m2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&vU(Qe,Je,B)||Qt.chrome&&xU(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=Gv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Iv(h,l,n.state.tabSize)}function vU(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function xU(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Tn.Text))return r}return t}function OU(n,e,t,r){let i=zv(n,e.head),l=!r||i.type!=Tn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function g2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=aU(i,l,h,C,t),B=cF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function SU(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function EU(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=AF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function ku(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(wU(e,r.node,r.offset)?t:0))}}function wU(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class y2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class kU{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:TU(e),A=new CU(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=DU(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!_v(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!_v(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Zx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Zx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=AU(n,e,t));return n.state.facet(mF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function AU(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&kF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function PU(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function TU(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new y2(t,r)),(i!=t||l!=r)&&e.push(new y2(i,l))),e}function DU(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class IU{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&zU(e.contentDOM.ownerDocument)}handleEvent(e){!$U(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=RU(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&DF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=TF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||FU.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function b2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Pn(t.state,i)}}}function RU(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(b2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(b2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const TF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],FU="dthko",DF=[16,17,18,20,91,92,224,225],nu=6;function su(n){return Math.max(0,n)*.7+8}function _U(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class BU{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=UV(e.contentDOM),this.atoms=e.state.facet(zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&LU(e,t),this.dragging=MU(e,t)&&FF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&_U(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=wF(this.view);e.clientX-A.left<=i+nu?t=-su(i-e.clientX):e.clientX+A.right>=h-nu&&(t=su(e.clientX-h)),e.clientY-A.top<=l+nu?r=-su(l-e.clientY):e.clientY+A.bottom>=C-nu&&(r=su(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function LU(n,e){let t=n.state.facet(fF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function NU(n,e){let t=n.state.facet(pF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function MU(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Ho(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function $U(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),IF=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function jU(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),RF(n,t.value)},50)}function xc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function RF(n,e){e=xc(n.state,Ux,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Zv!=null&&t.selection.ranges.every(A=>A.empty)&&Zv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(hF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=VU(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new BU(n,e,t,r)),r&&n.observer.ignore(()=>{GR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function v2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return gU(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function qU(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&x2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&x2(t,r,C)?1:h&&h.bottom>=r?-1:1}function O2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:qU(n,t,e.clientX,e.clientY)}}const QU=Qt.ie&&Qt.ie_version<=11;let S2=null,E2=0,C2=0;function FF(n){if(!QU)return n.detail;let e=S2,t=C2;return S2=n,C2=Date.now(),E2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(E2+1)%3:1}function VU(n,e){let t=O2(n,e),r=FF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=O2(n,l),_,B=v2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=v2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=UU(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function UU(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",xc(n.state,Wx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function w2(n,e,t,r){if(t=xc(n.state,Ux,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&NU(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&w2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return w2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=IF?null:e.clipboardData;return t?(RF(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(jU(n),!1)};function WU(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function GU(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:xc(n,Wx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Zv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=GU(n.state);if(!t&&!i)return!1;Zv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=IF?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(WU(n,t),!1)};const _F=ri.define();function BF(n,e){let t=[];for(let r of n.facet(gF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:_F.of(!0)}):null}function LF(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=BF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),LF(n)};ns.blur=n=>{n.observer.clearSelectionRange(),LF(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Zx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=TF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const k2=new Set;function zU(n){k2.has(n)||(k2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const A2=["pre-wrap","normal","pre-line","break-spaces"];let Ga=!1;function P2(){Ga=!1}class ZU{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return A2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Au&&(Ga=!0),this.height=e)}replace(e,t,r){return Dn.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends NF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Un||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Un(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Dn.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends Dn{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return Dn.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Au&&(A=-2);let Y=new Un(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=Dn.of(h);return(A<0||Math.abs(_.height-this.height)>=Au||Math.abs(A-this.heightMetrics(e,t).perLine)>=Au)&&(Ga=!0),Vu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class YU extends Dn{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&T2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?Dn.of(this.break?[e,null,t]:[e,t]):(this.left=Vu(this.left,e),this.right=Vu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function T2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const HU=5;class Xx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Un?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Un(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=HU)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let t=new Un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function t7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Wb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new ZU(t),this.stateDeco=e.facet(Jo).filter(r=>typeof r!="function"),this.heightMap=Dn.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new iu(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?I2:new Yx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Mo(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Jo).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,KU(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);P2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||Ga)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(bF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=WR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=ZR(e.scrollDOM);let me=(this.printing?t7:e7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),P2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?Dn.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new XU(ft.from,ot))}Ga&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new iu(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Wb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Mo(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Mo(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Mo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class iu{constructor(e,t){this.from=e,this.to=t}}function n7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function ou(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function s7(n,e){for(let t of n)if(e(t))return t}const I2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Yx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function Mo(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>Mo(i,e)):n._content)}const lu=$t.define({combine:n=>n.join(" ")}),Xv=$t.define({combine:n=>n.indexOf(!0)>-1}),Yv=wi.newName(),MF=wi.newName(),$F=wi.newName(),jF={"&light":"."+MF,"&dark":"."+$F};function Hv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const i7=Hv("."+Yv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},jF),a7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Gb=Qt.ie&&Qt.ie_version<=11;class o7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new WV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new u7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),Gb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!wu(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Uo(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ho(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&l7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=wu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&wu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new kU(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=PF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=R2(t,e.previousSibling||e.target.previousSibling,-1),i=R2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function R2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function F2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Uo(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function l7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return F2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?F2(n,t):null}class u7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Zx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:xF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ho(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||GV(e.parent)||document,this.viewState=new D2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(ru)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Bo).map(i=>new Qb(i));for(let i of this.plugins)i.update(this);this.observer=new o7(this),this.inputState=new IU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new f2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(_F))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=BF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Qu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(ru)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Uu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Lo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(lu)!=i.state.facet(lu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Wv))try{Y(i)}catch(ie){Pn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!PF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new D2(e),this.plugins=e.facet(Bo).map(r=>new Qb(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new f2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Bo),r=e.state.facet(Bo);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Qb(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(ZR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Pn(this.state,me),_2}}),q=Qu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=_2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Pn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Wv))C(t)}get themeClasses(){return Yv+" "+(this.state.facet(Xv)?$F:MF)+" "+this.state.facet(lu)}updateAttrs(){let e=B2(this,OF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),B2(this,Gx,t);let r=this.observer.ignore(()=>{let i=$v(this.contentDOM,this.contentAttrs,t),l=$v(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Lo);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(i7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Ub(this,e,g2(this,e,t,r))}moveByGroup(e,t){return Ub(this,e,g2(this,e,t,r=>SU(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return OU(this,e,t,r)}moveVertically(e,t,r){return Ub(this,e,EU(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),AF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return bc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(yF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>c7)return uF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||lF(l.isolates,r=c2(this,e))))return l.order;r||(r=c2(this,e));let i=iU(e.text,t,r);return this.bidiCache.push(new Uu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{GR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return ru.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return ru.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Vr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[lu.of(r),Lo.of(Hv(`.${r}`,e))];return t&&t.dark&&i.push(Xv.of(!0)),i}static baseTheme(e){return Ri.lowest(Lo.of(Hv("."+Yv,e,jF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=Lo;Mt.inputHandler=mF;Mt.clipboardInputFilter=Ux;Mt.clipboardOutputFilter=Wx;Mt.scrollHandler=vF;Mt.focusChangeEffect=gF;Mt.perLineTextDirection=yF;Mt.exceptionSink=dF;Mt.updateListener=Wv;Mt.editable=mi;Mt.mouseSelectionStyle=hF;Mt.dragMovesSelection=pF;Mt.clickAddsSelectionRange=fF;Mt.decorations=Jo;Mt.outerDecorations=SF;Mt.atomicRanges=zx;Mt.bidiIsolatedRanges=EF;Mt.scrollMargins=CF;Mt.darkTheme=Xv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=Gx;Mt.editorAttributes=OF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const c7=4096,_2={};class Uu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&Mv(h,t)}return t}const f7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function p7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function d7(n,e,t){return QF(qF(n.state),e,n,t)}let gi=null;const m7=4e3;function g7(n,e=f7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>p7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},m7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Kv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Kv=null;function QF(n,e,t,r){Kv=e;let i=qV(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",DF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+uu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+uu(me,e,!0)])||e.shiftKey&&(_e=Yo[e.keyCode])!=i&&_e!=me&&Y(ie[C+uu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+uu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Kv=null,A}class ml{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=VF(e);return[new ml(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return y7(e,t,r)}}function VF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function N2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function y7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=VF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=zv(n,r),me=zv(n,i),_e=ie.type==Tn.Text?ie:null,$e=me.type==Tn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=N2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=N2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Ur.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function b7(n,e){return n.constructor==e.constructor&&n.eq(e)}class v7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Pu)!=e.state.facet(Pu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Pu);for(;t!b7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Pu=$t.define();function UF(n){return[Vr.define(e=>new v7(e,n)),Pu.of(n)]}const WF=!Qt.ios,el=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function x7(n={}){return[el.of(n),O7,S7,E7,bF.of(!0)]}function GF(n){return n.startState.facet(el)!=n.state.facet(el)}const O7=UF({above:!0,markers(n){let{state:e}=n,t=e.facet(el),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||WF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of ml.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=GF(n);return t&&M2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){M2(e.state,n)},class:"cm-cursorLayer"});function M2(n,e){e.style.animationDuration=n.facet(el).cursorBlinkRate+"ms"}const S7=UF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:ml.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||GF(n)},class:"cm-selectionLayer"}),Jv={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};WF&&(Jv[".cm-line"].caretColor=Jv[".cm-content"].caretColor="transparent !important");const E7=Ri.highest(Mt.theme(Jv)),zF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),$o=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(zF)?r.value:t,n)}}),C7=Vr.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field($o);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field($o)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field($o),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field($o)!=n&&this.view.dispatch({effects:zF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function w7(){return[$o,C7]}function $2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function k7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class A7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of k7(e,this.maxLength))$2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const ex=/x/.unicode!=null?"gu":"g",P7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,ex),T7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let zb=null;function D7(){var n;if(zb==null&&typeof document<"u"&&document.body){let e=document.body.style;zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return zb||!1}const Tu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:P7,addSpecialChars:null});return(e.replaceTabs=!D7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ex)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ex)),e}});function I7(n={}){return[Tu.of(n),R7()]}let j2=null;function R7(){return j2||(j2=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Tu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new A7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=to(h.text,C,r-h.from);return Ht.replace({widget:new L7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new B7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Tu);n.startState.facet(Tu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const F7="•";function _7(n){return n>=32?F7:n==10?"␤":String.fromCharCode(9216+n)}class B7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=_7(this.code),r=e.state.phrase("Control character")+" "+(T7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class L7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function N7(){return $7}const M7=Ht.line({class:"cm-activeLine"}),$7=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(M7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),tx=2e3;function j7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>tx||t.off>tx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Iv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Iv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function q7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function q2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>tx?-1:i==r.length?q7(n,e.clientX):to(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function Q7(n,e){let t=q2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=q2(n,i);if(!C)return r;let A=j7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function V7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?Q7(t,r):null)}const U7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},W7={style:"cursor: crosshair"};function G7(n={}){let[e,t]=U7[n.key||"Alt"],r=Vr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?W7:null})]}const Do="-10000px";class ZF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function z7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Zb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||z7}}}),Q2=new WeakMap,Hx=Vr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Zb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ZF(n,Oc,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Zb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Do,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Do&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Zb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Do;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=Q2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||X7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Do}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Z7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),X7={x:0,y:0},Oc=$t.define({enables:[Hx,Z7]}),Wu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Sc{static create(e){return new Sc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ZF(e,Wu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Y7=Oc.compute([Wu],n=>{let e=n.facet(Wu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Sc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class H7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Pn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Hx),t=e?e.manager.tooltips.findIndex(r=>r.create==Sc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!K7(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!J7(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const cu=4;function K7(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-cu&&e.clientX<=r+cu&&e.clientY>=i-cu&&e.clientY<=l+cu}function J7(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function eW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(tW)&&(i=[]);return i},provide:i=>Wu.from(i)});return{active:r,extension:[r,Vr.define(i=>new H7(i,n,r,t,e.hoverTime||300)),Y7]}}function XF(n,e){let t=n.plugin(Hx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const tW=sr.define(),V2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function tl(n,e){let t=n.plugin(YF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const YF=Vr.fromClass(class{constructor(n){this.input=n.state.facet(rl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(V2);this.top=new fu(n,!0,e.topContainer),this.bottom=new fu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(V2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new fu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new fu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(rl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class fu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=U2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=U2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function U2(n){let e=n.nextSibling;return n.remove(),e}const rl=$t.define({enables:YF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Du=$t.define(),rW=$t.define(),nW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Go=$t.define();function HF(n){return[KF(),Go.of(Object.assign(Object.assign({},nW),n))]}const rx=$t.define({combine:n=>n.some(e=>e)});function KF(n){let e=[sW];return n&&n.fixed===!1&&e.push(rx.of(!0)),e}const sW=Vr.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Go).map(e=>new G2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(rx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(rx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Du),this.view.viewport.from),r=[],i=this.gutters.map(l=>new iW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Tn.Text&&h){nx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Tn.Text){nx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Go),t=n.state.facet(Go),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Du),n.state.facet(Du),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new G2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function W2(n){return Array.isArray(n)?n:[n]}function nx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class iW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new JF(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];nx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(rW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class G2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=W2(t.markers(e)),t.initialSpacer&&(this.spacer=new JF(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=W2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class JF{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),aW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Xb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Yb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const uW=Go.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(oW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Xb(Yb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(lW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Xb(Yb(e,z2(e.state.doc.lines)))},updateSpacer(e,t){let r=Yb(t.view,z2(t.view.state.doc.lines));return r==e.number?e:new Xb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function cW(n={}){return[Aa.of(n),KF(),uW]}function z2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(fW.range(i)))}return gr.of(e)});function hW(){return pW}const e_=1024;let dW=0;class Hb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=dW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Gu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const mW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):mW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Kx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:tO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return vW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class Jx{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Jx(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function nl(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(t_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new gW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||eO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Gu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Gu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function X2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function sx(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class gW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends r_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function n_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(nl(C,e,t,!1))}}return i?n_(i):r}class ix{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||eO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return sx(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function eO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||eO(e))}function vW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=e_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new Jx(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Ur=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Vs=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Vs>=0&&C.id==Vs&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Vs,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Vs,_t+1);if(Vs>=0&&si>0&&si-1&&si>0){let Sl=ie(Ur,$r);On=tO(Ur,hn,dn,0,hn.length,0,Yt-At,Sl,Sl)}else On=_e(Ur,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Ur=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Ur,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const Y2=new WeakMap;function Iu(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=Y2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Iu(n,r)}Y2.set(e,t)}return t}function tO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(tO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class xW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Hb(i.from,i.to)):[new Hb(0,0)]:[new Hb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class OW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let SW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=SW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new zu(e);return r=>r.modified.indexOf(t)>-1?r:zu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let EW=0;class zu{constructor(e){this.name=e,this.instances=[],this.id=EW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&CW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=wW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(zu.get(C,A));return l}}function CW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function wW(n){let e=[[]];for(let t=0;tr.length-t.length)}function i_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Zu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return a_.add(e)}const a_=new mr;class Zu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function kW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function AW(n,e,t,r=0,i=n.length){let l=new PW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class PW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=TW(e)||Zu.empty,q=kW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function TW(n){let e=n.type.prop(a_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,hu=Ft(),pi=Ft(),H2=Ft(pi),K2=Ft(pi),hi=Ft(),du=Ft(hi),Kb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ax=Ft(),Io=Ft(ax),mu=Ft(),re={comment:hu,lineComment:Ft(hu),blockComment:Ft(hu),docComment:Ft(hu),name:pi,variableName:Ft(pi),typeName:H2,tagName:Ft(H2),propertyName:K2,attributeName:Ft(K2),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:du,docString:Ft(du),character:Ft(du),attributeValue:Ft(du),number:Kb,integer:Ft(Kb),float:Ft(Kb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ax,separator:Ft(ax),bracket:Io,angleBracket:Ft(Io),squareBracket:Ft(Io),paren:Ft(Io),brace:Ft(Io),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:mu,documentMeta:Ft(mu),annotation:Ft(mu),processingInstruction:Ft(mu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}o_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var Jb;const Pa=new mr;function l_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const rO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=J2(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(rO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return J2(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Xu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class DW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Ro=null;class Yu{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Yu(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new DW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Ro;Ro=this;try{return e()}finally{Ro=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=eI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=eI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends s_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Ro;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Ro}}function eI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Yu.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new za(r)}}hs.state=Hr.define({create:za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?za.init(e.state):n.apply(e)}});let u_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(u_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const ev=typeof navigator<"u"&&(!((Jb=navigator.scheduling)===null||Jb===void 0)&&Jb.isInputPending)?()=>navigator.scheduling.isInputPending():null,IW=Vr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=u_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>ev&&ev()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Pn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,IW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class RW{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const FW=$t.define(),Ec=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Hu(n){let e=n.facet(Ec);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function sl(n,e){let t="",r=n.tabSize,i=n.facet(Ec)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?_W(n,t,e):null}class Cc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Hu(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return to(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const c_=new mr;function _W(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return f_(r,n,t)}function f_(n,e,t){for(let r=n;r;r=r.next){let i=LW(r.node);if(i)return i(sO.create(e,t,r))}return 0}function BW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function LW(n){let e=n.type.prop(c_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>p_(h,!0,1,void 0,l&&!BW(h)?i.from:void 0)}return n.parent==null?NW:null}function NW(){return 0}class sO extends Cc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new sO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(MW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return f_(this.context.next,this.base,this.pos)}}function MW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function $W(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function jW({closing:n,align:e=!0,units:t=1}){return r=>p_(r,e,t,n)}function p_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?$W(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const qW=n=>n.baseIndent;function tv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const QW=200;function VW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+QW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=nO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=sl(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const UW=$t.define(),h_=new mr;function WW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function zW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Ku(n,e,t){for(let r of n.facet(UW)){let i=r(n,e,t);if(i)return i}return GW(n,e,t)}function d_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const wc=sr.define({map:d_}),gl=sr.define({map:d_});function m_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(wc)&&!ZW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(iO),i=r?Ht.replace({widget:new tG(r(e.state,t.value))}):tI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(gl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function ZW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function g_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(b_()))}const XW=n=>{for(let e of m_(n)){let t=Ku(n.state,e.from,e.to);if(t)return n.dispatch({effects:g_(n.state,[wc.of(t),y_(n,t)])}),!0}return!1},YW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of m_(n)){let r=Ju(n.state,t.from,t.to);r&&e.push(gl.of(r),y_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function y_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const HW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(gl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},JW=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:XW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:YW},{key:"Ctrl-Alt-[",run:HW},{key:"Ctrl-Alt-]",run:KW}],eG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},iO=$t.define({combine(n){return bs(n,eG)}});function b_(n){let e=[ca,sG];return n&&e.push(iO.of(n)),e}function v_(n,e){let{state:t}=n,r=t.facet(iO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=Ju(n.state,C.from,C.to);A&&n.dispatch({effects:gl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const tI=Ht.replace({widget:new class extends ni{toDOM(n){return v_(n,null)}}});class tG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return v_(e,this.value)}}const rG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class rv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function nG(n={}){let e=Object.assign(Object.assign({},rG),n),t=new rv(e,!0),r=new rv(e,!1),i=Vr.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=Ju(h.state,A.from,A.to)?r:Ku(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,HF({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new rv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=Ju(h.state,C.from,C.to);if(_)return h.dispatch({effects:gl.of(_)}),!0;let B=Ku(h.state,C.from,C.to);return B?(h.dispatch({effects:wc.of(B)}),!0):!1}})}),b_()]}const sG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class yl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=o_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new yl(e,t||{})}}const ox=$t.define(),x_=$t.define({combine(n){return n.length?[n[0]]:null}});function nv(n){let e=n.facet(ox);return e.length?e:n.facet(x_)}function O_(n,e){let t=[aG],r;return n instanceof yl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(x_.of(n)):r?t.push(ox.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(ox.of(n)),t}class iG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,nv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=nv(e.state),i=r!=nv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)AW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const aG=Ri.high(Vr.fromClass(iG,{decorations:n=>n.decorations})),oG=yl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),lG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),S_=1e4,E_="()[]{}",C_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:E_,maxScanDistance:S_,renderMatch:fG})}}),uG=Ht.mark({class:"cm-matchingBracket"}),cG=Ht.mark({class:"cm-nonmatchingBracket"});function fG(n){let e=[],t=n.matched?uG:cG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const pG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(C_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),hG=[pG,lG];function dG(n={}){return[C_.of(n),hG]}const mG=new mr;function lx(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function ux(n){let e=n.type.prop(mG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||S_,l=r.brackets||E_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=lx(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return gG(n,e,t,A,B,_,l)}}return yG(n,e,t,h,C.type,i,l)}function gG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const bG=Object.create(null),rI=[Mn.none],nI=[],sI=Object.create(null),vG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])vG[n]=xG(bG,e);function sv(n,e){nI.indexOf(n)>-1||(nI.push(n),console.warn(e))}function xG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):sv(_,`Modifier ${_} used at start of tag`):A.length?sv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:sv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=sI[i];if(l)return l.id;let h=sI[i]=Mn.define({id:rI.length,name:r,props:[i_({[r]:t})]});return rI.push(h),h.id}Rr.RTL,Rr.LTR;const OG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=oO(n.state,t.from);return r.line?SG(n):r.block?CG(n):!1};function aO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const SG=aO(AG,0),EG=aO(w_,0),CG=aO((n,e)=>w_(n,e,kG(e)),0);function oO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Fo=50;function wG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-Fo,r),h=n.sliceDoc(i,i+Fo),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*Fo?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+Fo),q=n.sliceDoc(i-Fo,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function kG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function w_(n,e,t=e.selection.ranges){let r=t.map(l=>oO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>wG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const cx=ri.define(),PG=ri.define(),TG=$t.define(),k_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),A_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(k_),r=e.annotation(cx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=ec(B,B.length,t.minDepth,A):B=D_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(PG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function DG(n={}){return[A_,k_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?P_:e.inputType=="historyRedo"?fx:null;return r?(e.preventDefault(),r(t)):!1}})]}function kc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(A_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const P_=kc(0,!1),fx=kc(1,!1),IG=kc(0,!0),RG=kc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(TG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function ec(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function FG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function _G(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function T_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],BG=200;function D_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-BG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),ec(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function LG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function iv(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=NG(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function NG(n,e,t){let r=T_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const MG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||MG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Ac(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const R_=n=>I_(n,!vn(n)),F_=n=>I_(n,vn(n));function __(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Ac(t,e))}const jG=n=>__(n,!vn(n)),qG=n=>__(n,vn(n));function QG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Pc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;QG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const VG=n=>vs(n,e=>Pc(n.state,e,!vn(n))),UG=n=>vs(n,e=>Pc(n.state,e,vn(n)));function B_(n,e){return vs(n,t=>{if(!t.empty)return Ac(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const L_=n=>B_(n,!1),N_=n=>B_(n,!0);function M_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Ac(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const iI=n=>$_(n,!1),px=n=>$_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const WG=n=>vs(n,e=>Fi(n,e,!0)),GG=n=>vs(n,e=>Fi(n,e,!1)),zG=n=>vs(n,e=>Fi(n,e,!vn(n))),ZG=n=>vs(n,e=>Fi(n,e,vn(n))),XG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),YG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function HG(n,e,t){let r=!1,i=ro(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headHG(n,e,!1);function ss(n,e){let t=ro(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function j_(n,e){return ss(n,t=>n.moveByChar(t,e))}const q_=n=>j_(n,!vn(n)),Q_=n=>j_(n,vn(n));function V_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const JG=n=>V_(n,!vn(n)),ez=n=>V_(n,vn(n)),tz=n=>ss(n,e=>Pc(n.state,e,!vn(n))),rz=n=>ss(n,e=>Pc(n.state,e,vn(n)));function U_(n,e){return ss(n,t=>n.moveVertically(t,e))}const W_=n=>U_(n,!1),G_=n=>U_(n,!0);function z_(n,e){return ss(n,t=>n.moveVertically(t,e,M_(n).height))}const aI=n=>z_(n,!1),oI=n=>z_(n,!0),nz=n=>ss(n,e=>Fi(n,e,!0)),sz=n=>ss(n,e=>Fi(n,e,!1)),iz=n=>ss(n,e=>Fi(n,e,!vn(n))),az=n=>ss(n,e=>Fi(n,e,vn(n))),oz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),lz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),lI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),uI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),uz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),cz=({state:n,dispatch:e})=>{let t=Tc(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},fz=({state:n,dispatch:e})=>{let t=ro(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},pz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function bl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=gu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=gu(n,h,!1),C=gu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const Z_=(n,e,t)=>bl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iZ_(n,!1,!0),X_=n=>Z_(n,!0,!1),Y_=(n,e)=>bl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),H_=n=>Y_(n,!1),hz=n=>Y_(n,!0),dz=n=>bl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headbl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),gz=n=>bl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},bz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Tc(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function K_(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Tc(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const vz=({state:n,dispatch:e})=>K_(n,e,!1),xz=({state:n,dispatch:e})=>K_(n,e,!0);function J_(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Tc(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Oz=({state:n,dispatch:e})=>J_(n,e,!1),Sz=({state:n,dispatch:e})=>J_(n,e,!0),Ez=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Tc(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Cz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const pI=eB(!1),wz=eB(!0);function eB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&Cz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new Cc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=nO(_,l);for(B==null&&(B=to(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const kz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Cc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=lO(n,(l,h,C)=>{let A=nO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=sl(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(lO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Ec)})}),{userEvent:"input.indent"})),!0),rB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(lO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=to(i,n.tabSize),h=0,C=sl(n,Math.max(0,l-Hu(n)));for(;h(n.setTabFocusMode(),!0),Pz=[{key:"Ctrl-b",run:R_,shift:q_,preventDefault:!0},{key:"Ctrl-f",run:F_,shift:Q_},{key:"Ctrl-p",run:L_,shift:W_},{key:"Ctrl-n",run:N_,shift:G_},{key:"Ctrl-a",run:XG,shift:oz},{key:"Ctrl-e",run:YG,shift:lz},{key:"Ctrl-d",run:X_},{key:"Ctrl-h",run:hx},{key:"Ctrl-k",run:dz},{key:"Ctrl-Alt-h",run:H_},{key:"Ctrl-o",run:yz},{key:"Ctrl-t",run:bz},{key:"Ctrl-v",run:px}],Tz=[{key:"ArrowLeft",run:R_,shift:q_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:jG,shift:JG,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:zG,shift:iz,preventDefault:!0},{key:"ArrowRight",run:F_,shift:Q_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:qG,shift:ez,preventDefault:!0},{mac:"Cmd-ArrowRight",run:ZG,shift:az,preventDefault:!0},{key:"ArrowUp",run:L_,shift:W_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:lI,shift:cI},{mac:"Ctrl-ArrowUp",run:iI,shift:aI},{key:"ArrowDown",run:N_,shift:G_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:uI,shift:fI},{mac:"Ctrl-ArrowDown",run:px,shift:oI},{key:"PageUp",run:iI,shift:aI},{key:"PageDown",run:px,shift:oI},{key:"Home",run:GG,shift:sz,preventDefault:!0},{key:"Mod-Home",run:lI,shift:cI},{key:"End",run:WG,shift:nz,preventDefault:!0},{key:"Mod-End",run:uI,shift:fI},{key:"Enter",run:pI,shift:pI},{key:"Mod-a",run:uz},{key:"Backspace",run:hx,shift:hx},{key:"Delete",run:X_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:H_},{key:"Mod-Delete",mac:"Alt-Delete",run:hz},{mac:"Mod-Backspace",run:mz},{mac:"Mod-Delete",run:gz}].concat(Pz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Dz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:VG,shift:tz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:UG,shift:rz},{key:"Alt-ArrowUp",run:vz},{key:"Shift-Alt-ArrowUp",run:Oz},{key:"Alt-ArrowDown",run:xz},{key:"Shift-Alt-ArrowDown",run:Sz},{key:"Escape",run:pz},{key:"Mod-Enter",run:wz},{key:"Alt-l",mac:"Ctrl-l",run:cz},{key:"Mod-i",run:fz,preventDefault:!0},{key:"Mod-[",run:rB},{key:"Mod-]",run:tB},{key:"Mod-Alt-\\",run:kz},{key:"Shift-Mod-k",run:Ez},{key:"Shift-Mod-\\",run:KG},{key:"Mod-/",run:OG},{key:"Alt-A",run:EG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Az}].concat(Tz),Iz={key:"Tab",run:tB,shift:rB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Za{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(hI(C)):hI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Mx(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=tc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return av.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=tc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(iB.prototype[Symbol.iterator]=aB.prototype[Symbol.iterator]=function(){return this});function Rz(n){try{return new RegExp(n,uO),!0}catch{return!1}}function tc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function dx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:rc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[rc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const rc=sr.define(),dI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(rc)&&(n=t.value);return n},provide:n=>rl.from(n,e=>e?dx:null)}),Fz=n=>{let e=tl(n,dx);if(!e){let t=[rc.of(!0)];n.state.field(dI,!1)==null&&t.push(sr.appendConfig.of([dI,_z])),n.dispatch({effects:t}),e=tl(n,dx)}return e&&e.dom.querySelector("input").select(),!0},_z=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Bz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},oB=$t.define({combine(n){return bs(n,Bz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Lz(n){let e=[qz,jz];return n&&e.push(oB.of(n)),e}const Nz=Ht.mark({class:"cm-selectionMatch"}),Mz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function mI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function $z(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const jz=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(oB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(mI(h,t,i.from,i.to)&&$z(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Za(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||mI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(Mz.range(B,q)):(B>=i.to||q<=i.from)&&C.push(Nz.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),qz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Qz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Vz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Za(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Za(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Uz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Qz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Vz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},no=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new rZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class lB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Rz(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Zz(this):new Gz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class uB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Za(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?Wz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Wz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new iB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?zz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function nc(n,e){return n.slice(pn(n,e,!1),e)}function sc(n,e){return n.slice(e,pn(n,e))}function zz(n){return(e,t,r)=>!r[0].length||(n(nc(r.input,r.index))!=Br.Word||n(sc(r.input,r.index))!=Br.Word)&&(n(sc(r.input,r.index+r[0].length))!=Br.Word||n(nc(r.input,r.index+r[0].length))!=Br.Word)}class Zz extends uB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const il=sr.define(),cO=sr.define(),Oi=Hr.define({create(n){return new ov(mx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(il)?n=new ov(t.value.create(),n.panel):t.is(cO)&&(n=new ov(n.query,t.value?fO:null));return n},provide:n=>rl.from(n,e=>e.panel)});class ov{constructor(e,t){this.query=e,this.panel=t}}const Xz=Ht.mark({class:"cm-searchMatch"}),Yz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Hz=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Yz:Xz)})}return r.finish()}},{decorations:n=>n.decorations});function vl(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):pB(e)}}const ic=vl((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(no);return n.dispatch({selection:i,effects:[pO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),fB(n),!0}),ac=vl((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(no);return n.dispatch({selection:l,effects:[pO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),fB(n),!0}),Kz=vl((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Jz=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Za(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},gI=vl((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(pO(n,l)),_.push(t.facet(no).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),eZ=vl((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function fO(n){return n.state.facet(no).createPanel(n)}function mx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(no);return new lB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function cB(n){let e=tl(n,fO);return e&&e.dom.querySelector("[main-field]")}function fB(n){let e=cB(n);e&&e==n.root.activeElement&&e.select()}const pB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=cB(n);if(t&&t!=n.root.activeElement){let r=mx(n.state,e.query.spec);r.valid&&n.dispatch({effects:il.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[cO.of(!0),e?il.of(mx(n.state,e.query.spec)):sr.appendConfig.of(sZ)]});return!0},hB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=tl(n,fO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:cO.of(!1)}),!0},tZ=[{key:"Mod-f",run:pB,scope:"editor search-panel"},{key:"F3",run:ic,shift:ac,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ic,shift:ac,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:hB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Jz},{key:"Mod-Alt-g",run:Fz},{key:"Mod-d",run:Uz,preventDefault:!0}];class rZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ic(e),[Qn(e,"next")]),r("prev",()=>ac(e),[Qn(e,"previous")]),r("select",()=>Kz(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>gI(e),[Qn(e,"replace")]),r("replaceAll",()=>eZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>hB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new lB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:il.of(e)}))}keydown(e){d7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?ac:ic)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),gI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(il)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(no).top}}function Qn(n,e){return n.state.phrase(e)}const yu=30,bu=/[\s\.,:;?!]/;function pO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-yu),h=Math.min(i,t+yu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-yu;A--)if(!bu.test(C[A-1])&&bu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const nZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),sZ=[Oi,Ri.low(Hz),nZ];class dB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(gB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function yI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function iZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:iZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function aZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class bI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function gB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const hO=ri.define();function oZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const vI=new WeakMap;function lZ(n){if(!Array.isArray(n))return n;let e=vI.get(n);return e||vI.set(n,e=mB(n)),e}const oc=sr.define(),al=sr.define();class uZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=Mx(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class cZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>xI(e(r),t(r)),optionClass:(e,t)=>r=>xI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function xI(n,e){return n?e?n+" "+e:n:e}function fZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function pZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function lv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class hZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=pZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=lv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:al.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=lv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=lv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Pn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&mZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew hZ(t,n,e)}function mZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function OI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function gZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new bI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new cZ(q):new uZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new bI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):OI(_.completion)>OI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,SI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=gZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:SZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class lc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new lc(xZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(lZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!yZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(vB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new lc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?bZ:vZ}}function yZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const xZ=[];function yB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(hO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=yB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(oc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(al))i=new Wn(i.source,0);else if(l.is(bB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return OZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new dB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function OZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):gB(n,!0).test(i)}const bB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),vB=sr.define(),Bn=Hr.define({create(){return lc.start()},update(n,e){return n.update(e)},provide:n=>[Oc.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function dO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},oZ(n.state,t,r.from,r.to)),{annotations:hO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const SZ=dZ(Bn,dO);function vu(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:vB.of(C)}),!0}}const EZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:oc.of(!0)}),!0):!1,CZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:al.of(null)}),!0)};class wZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const kZ=50,AZ=1e3,PZ=Vr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=yB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lkZ&&Date.now()-h.time>AZ){for(let C of h.context.abortListeners)try{C()}catch(A){Pn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(oc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new dB(e,t,n.explicitPos==t,this.view),i=new wZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:al.of(null)}),Pn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:bB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&XF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:al.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:oc.of(!1)}),20),this.composing=0}}}),TZ=typeof navigator=="object"&&/Win/.test(navigator.platform),DZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(TZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&dO(e,r),!1}})),xB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class IZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class mO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new mO(this.field,t,r)}}class gO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew mO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new IZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new gO(r,i)}}let RZ=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),FZ=Ht.mark({class:"cm-snippetField"});class so{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?RZ:FZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new so(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const xl=sr.define({map(n,e){return n&&n.map(e)}}),_Z=sr.define(),ol=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(xl))return t.value;if(t.is(_Z)&&n)return new so(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function yO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function BZ(n){let e=gO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[hO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=yO(C,0)),C.some(_=>_.field>0)){let _=new so(C,0),B=A.effects=[xl.of(_)];t.state.field(ol,!1)===void 0&&B.push(sr.appendConfig.of([ol,jZ,qZ,xB]))}t.dispatch(t.state.update(A))}}function OB(n){return({state:e,dispatch:t})=>{let r=e.field(ol,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:yO(r.ranges,i),effects:xl.of(l?null:new so(r.ranges,i)),scrollIntoView:!0})),!0}}const LZ=({state:n,dispatch:e})=>n.field(ol,!1)?(e(n.update({effects:xl.of(null)})),!0):!1,NZ=OB(1),MZ=OB(-1),$Z=[{key:"Tab",run:NZ,shift:MZ},{key:"Escape",run:LZ}],CI=$t.define({combine(n){return n.length?n[0]:$Z}}),jZ=Ri.highest(dl.compute([CI],n=>n.facet(CI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:BZ(n)})}const qZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ol,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:yO(t.ranges,i.field),effects:xl.of(t.ranges.some(l=>l.field>i.field)?new so(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ll={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),bO=new class extends aa{};bO.startSide=1;bO.endSide=-1;const SB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[bO.range(t.value,t.value+1)]}));return n}});function QZ(){return[UZ,SB]}const uv="()[]{}<>";function EB(n){for(let e=0;e{if((VZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=zZ(n.state,r);return l?(n.dispatch(l),!0):!1}),WZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=CB(n,n.selection.main.head).brackets||ll.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=ZZ(n.doc,h.head);for(let A of r)if(A==C&&Dc(n.doc,h.head)==EB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},GZ=[{key:"Backspace",run:WZ}];function zZ(n,e){let t=CB(n,n.selection.main.head),r=t.brackets||ll.brackets;for(let i of r){let l=EB(ln(i,0));if(e==i)return l==i?HZ(n,i,r.indexOf(i+i+i)>-1,t):XZ(n,i,l,t.before||ll.before);if(e==l&&wB(n,n.selection.main.from))return YZ(n,i,l)}return null}function wB(n,e){let t=!1;return n.field(SB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Dc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function ZZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function XZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Dc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function YZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Dc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function HZ(n,e,t,r){let i=r.stringPrefixes||ll.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Dc(n.doc,A),B;if(_==e){if(wI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(wB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=kI(n,A-2*e.length,i))>-1&&wI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&kI(n,A,i)>-1&&!KZ(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function wI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function KZ(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function kI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function JZ(n={}){return[DZ,Bn,fn.of(n),PZ,eX,xB]}const kB=[{key:"Ctrl-Space",run:EI},{mac:"Alt-`",run:EI},{key:"Escape",run:CZ},{key:"ArrowDown",run:vu(!0)},{key:"ArrowUp",run:vu(!1)},{key:"PageDown",run:vu(!0,"page")},{key:"PageUp",run:vu(!1,"page")},{key:"Enter",run:EZ}],eX=Ri.highest(dl.computeN([fn],n=>n.facet(fn).defaultKeymap?[kB]:[]));class tX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new fX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Xa(h))}}function Xa(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new tX(i,l,h.diagnostic),!1}),r}function AB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Ic))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function PB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(BB))}function rX(n,e){return{effects:PB(n,[Ic.of(e)])}}const Ic=sr.define(),vO=sr.define(),TB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Xa(t,n.selected.diagnostic,l)||Xa(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Ic)){let r=e.state.facet(Ls).autoPanel?t.value.length?ul.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(vO)?n=new Hi(n.diagnostics,t.value?ul.open:null,n.selected):t.is(TB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[rl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),nX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function sX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).toRB(n,t,!1)))}const iX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:PB(n.state,[vO.of(!0)])});let t=tl(n,ul.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},AI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:vO.of(!1)}),!0)},aX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},oX=[{key:"Mod-Shift-m",run:iX,preventDefault:!0},{key:"F8",run:aX}],lX=Vr.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(rX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Pn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function uX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function cX(n,e={}){return[Ls.of({source:n,config:e}),lX,BB]}function IB(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function RB(n,e,t){var r;let i=t?IB(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Xa(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class fX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class PI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=RB(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class ul{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)AI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=IB(l.actions);for(let C=0;C{for(let l=0;lAI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Xa(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:TB.of(r)})}static open(e){return new ul(e)}}function Ru(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function xu(n){return Ru(``,'width="6" height="3"')}const pX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:xu("#d11")},".cm-lintRange-warning":{backgroundImage:xu("orange")},".cm-lintRange-info":{backgroundImage:xu("#999")},".cm-lintRange-hint":{backgroundImage:xu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function TI(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class FB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>TI(t)dX(e,t,r)),t}}function hX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,hX(n,e)}let{hoverTime:i}=n.state.facet(Rc),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function mX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new FB(t[i]).range(+i));return gr.of(r,!0)}const gX=HF({class:"cm-gutter-lint",markers:n=>n.state.field(gx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(gx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new FB(r):null}}),gx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(Rc).markerFilter;for(let r of e.effects)if(r.is(Ic)){let i=r.value;t&&(i=t(i||[],e.state)),n=mX(e.state.doc,i.slice(0))}return n}}),xO=sr.define(),_B=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=AB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(xO)?r.value:t,n)},provide:n=>Oc.from(n)}),yX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Ru('')},".cm-lint-marker-warning":{content:Ru('')},".cm-lint-marker-error":{content:Ru('')}}),BB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([nX.range(e.from,e.to)])}),eW(sX,{hideOn:AB}),pX],Rc=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function bX(n={}){return[Rc.of(n),gx,gX,yX,_B]}const vX=(()=>[cW(),hW(),I7(),DG(),nG(),x7(),w7(),Sr.allowMultipleSelections.of(!0),VW(),O_(oG,{fallback:!0}),dG(),QZ(),JZ(),V7(),G7(),N7(),Lz(),dl.of([...GZ,...Dz,...tZ,...$G,...JW,...kB,...oX])])();class uc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new uc(e,[],t,r,r,0,[],0,i?new DI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new uc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new xX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class DI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class xX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class cc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new cc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new cc(this.stack,this.pos,this.index)}}function jo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Fu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const II=new Fu;class OX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=II,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=II,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;LB(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class yx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?jo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if(LB(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}yx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class Ol{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function LB(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||SX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function RI(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function SX(n,e,t,r){let i=RI(t,r,e);return i<0||RI(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class EX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?FI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?FI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class CX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Fu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Fu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Fu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new EX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&PX(i);if(h)return Vn&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Vn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Vn&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Vn&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Vn&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return _I(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Vn&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Vn&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Vn&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Vn&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Vn&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),_I(C,r)):(!i||i.scoren;class AX{constructor(e){this.start=e.start,this.shift=e.shift||fv,this.reduce=e.reduce||fv,this.reuse=e.reuse||fv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fc extends s_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Kx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=e_;let h=jo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new wX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(fc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=BI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const TX=312,DX=313,LI=1,IX=2,RX=3,FX=4,_X=314,BX=316,LX=317,NX=5,MX=6,$X=0,bx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],NB=125,jX=59,vx=47,qX=42,QX=43,VX=45,UX=60,WX=44,GX=63,zX=46,ZX=91,XX=new AX({start:!1,shift(n,e){return e==NX||e==MX||e==BX?n:e==LX},strict:!1}),YX=new Ol((n,e)=>{let{next:t}=n;(t==NB||t==-1||e.context)&&n.acceptToken(_X)},{contextual:!0,fallback:!0}),HX=new Ol((n,e)=>{let{next:t}=n,r;bx.indexOf(t)>-1||t==vx&&((r=n.peek(1))==vx||r==qX)||t!=NB&&t!=jX&&t!=-1&&!e.context&&n.acceptToken(TX)},{contextual:!0}),KX=new Ol((n,e)=>{n.next==ZX&&!e.context&&n.acceptToken(DX)},{contextual:!0}),JX=new Ol((n,e)=>{let{next:t}=n;if(t==QX||t==VX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(LI);n.acceptToken(r?LI:IX)}}else t==GX&&n.peek(1)==zX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(RX))},{contextual:!0});function pv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const eY=new Ol((n,e)=>{if(n.next!=UX||!e.dialectEnabled($X)||(n.advance(),n.next==vx))return;let t=0;for(;bx.indexOf(n.next)>-1;)n.advance(),t++;if(pv(n.next,!0)){for(n.advance(),t++;pv(n.next,!1);)n.advance(),t++;for(;bx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==WX)return;for(let r=0;;r++){if(r==7){if(!pv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(FX,-t)}),tY=i_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),rY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},nY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},sY={__proto__:null,"<":187},iY=fc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:XX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[tY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[HX,KX,JX,eY,2,3,4,5,6,7,8,9,10,11,12,13,14,YX,new yx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new yx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>rY[n]||-1},{term:339,get:n=>nY[n]||-1},{term:92,get:n=>sY[n]||-1}],tokenPrec:15004}),MB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],aY=MB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),NI=new xW,$B=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function _o(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const oY=["FunctionDeclaration"],lY={FunctionDeclaration:_o("function"),ClassDeclaration:_o("class"),ClassExpression:()=>!0,EnumDeclaration:_o("constant"),TypeAliasDeclaration:_o("type"),NamespaceDeclaration:_o("namespace"),VariableDefinition(n,e){n.matchContext(oY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function jB(n,e){let t=NI.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=lY[h.name];if(C&&C(h,l)||$B.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of jB(n,h.node))r.push(C);return!1}}),NI.set(e,r),r}const MI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,qB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function uY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(qB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&MI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)$B.has(i.name)&&(r=r.concat(jB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:MI}}const Ei=Xu.define({name:"javascript",parser:iY.configure({props:[c_.add({IfStatement:tv({except:/^\s*({|else\b)/}),TryStatement:tv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:qW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:jW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":tv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),h_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":WW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),QB={test:n=>/^JSX/.test(n.name),facet:l_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},cY=Ei.configure({dialect:"ts"},"typescript"),fY=Ei.configure({dialect:"jsx",props:[rO.add(n=>n.isTop?[QB]:void 0)]}),pY=Ei.configure({dialect:"jsx ts",props:[rO.add(n=>n.isTop?[QB]:void 0)]},"typescript");let VB=n=>({label:n,type:"keyword"});const UB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(VB),hY=UB.concat(["declare","implements","private","protected","public"].map(VB));function dY(n={}){let e=n.jsx?n.typescript?pY:fY:n.typescript?cY:Ei,t=n.typescript?aY.concat(hY):MB.concat(UB);return new RW(e,[Ei.data.of({autocomplete:aZ(qB,mB(t))}),Ei.data.of({autocomplete:uY}),n.jsx?yY:[]])}function mY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function $I(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const gY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),yY=Mt.inputHandler.of((n,e,t,r,i)=>{if((gY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=$I(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=mY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=$I(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function bY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(vY(_,r.doc,A))}return i}}function jI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function vY(n,e,t){let r=jI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?jI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var xx={},xY={get exports(){return xx},set exports(n){xx=n}};const OY={define:!1,require:!1},SY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},EY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},CY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},wY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},kY={assert:!0,expect:!0,should:!0},AY={exports:!0,global:!1,module:!1,require:!1},PY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},TY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},DY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},IY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},RY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},FY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},MY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},UY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},WY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},GY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},zY={$:!1,jQuery:!1},ZY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},XY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},YY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},HY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},KY={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},JY={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},eH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},tH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},rH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},nH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},sH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},iH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},aH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},oH={browser:!1,chrome:!1,opr:!1},lH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},uH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},cH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},fH={amd:OY,applescript:SY,atomtest:EY,browser:CY,builtin:wY,chai:kY,commonjs:AY,couch:PY,devtools:TY,embertest:DY,es2015:IY,es2016:RY,es2017:FY,es2018:_Y,es2019:BY,es2020:LY,es2021:NY,es2022:MY,es2023:$Y,es2024:jY,es2025:qY,es3:QY,es5:VY,greasemonkey:UY,jasmine:WY,jest:GY,jquery:zY,meteor:ZY,mocha:XY,mongo:YY,nashorn:HY,node:KY,nodeBuiltin:JY,phantomjs:eH,prototypejs:tH,protractor:rH,qunit:nH,rhino:sH,serviceworker:iH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:aH,webextensions:oH,worker:lH,wsh:uH,yui:cH};(function(n){n.exports=fH})(xY);const pH=O9(xx);var pc={},hH={get exports(){return pc},set exports(n){pc=n}},hv,qI;function dH(){return qI||(qI=1,hv={stdout:!1,stderr:!1}),hv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var XB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Fc=function(c){return XB.exec(c).slice(1)};function El(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=OO(Lc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function _c(c){var s=Bc(c),u=HB(c,-1)==="/";return c=OO(Lc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Bc(c){return c.charAt(0)==="/"}function SO(){var c=Array.prototype.slice.call(arguments,0);return _c(Lc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function EO(c,s){c=El(c).substr(1),s=El(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function V(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,V=G.type||j.wrap,te=this.__keys[V],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+V+".");for(W=te.length;(W-=1)>=0;)if($=te[W],U=G[$],!!U){if(Array.isArray(U)){for(K=U.length;(K-=1)>=0;)if(U[K]&&!E(L,U[K])){if(S(V,te[W]))j=new g(U[K],[$,K],"Property",null);else if(b(U[K]))j=new g(U[K],[$,K],null,null);else continue;I.push(j)}}else if(b(U)){if(E(L,U))continue;I.push(new g(U,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,V;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(V,1)):V+=1;if(V===I.length)return a.Break;if(I[V].extendedRange[0]>Q.range[1])return a.Skip}}),V=0,k(F,{leave:function(Q){for(var $;VQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}(Nc)),Nc}var ao={},JB="esrecurse",eL="ECMAScript AST recursive visitor",tL="https://github.com/estools/esrecurse",rL="esrecurse.js",nL="4.3.0",sL={node:">=4.0"},iL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],aL={type:"git",url:"https://github.com/estools/esrecurse.git"},oL={estraverse:"^5.2.0"},lL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},uL="BSD-2-Clause",cL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},fL={presets:["es2015"]},pL={name:JB,description:eL,homepage:tL,main:rL,version:nL,engines:sL,maintainers:iL,repository:aL,dependencies:oL,devDependencies:lL,license:uL,scripts:cL,babel:fL},IO;function hL(){return IO||(IO=1,function(){var c=DO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class V extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:U}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===U.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===U.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===U.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===U.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===U.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===U.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===U.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===U.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===U.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Vt=256,tr=Re|Se|Vt;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ue=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Ut=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ut.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Vt)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Vt))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vt)>0},Ut.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,V.lastIndex=w,w+=V.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var pr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var w=V.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){V.lastIndex=this.pos;var tt=V.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new pr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ve=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ve&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Vt|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Ut.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new pr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Ut.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function Cr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Vi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Vi(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Ui(J)||So(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Ui(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function So(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},cr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},cr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},cr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},cr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},cr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},cr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},cr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},cr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},cr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},cr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},cr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},cr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},cr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},cr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},cr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},cr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},cr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},cr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},cr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Eo(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}cr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},cr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Eo(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},cr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},cr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};cr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},cr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},cr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},cr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},cr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},cr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),qc}var LO;function mL(){return LO||(LO=1,function(c){const s=dL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d($c()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||$c(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(jc)),jc.exports}var lo={},NO;function gL(){if(NO)return lo;NO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return lo.KEYS=c,lo.getKeys=a,lo.unionWith=d,lo}var MO;function kl(){if(MO)return as;MO=1,Object.defineProperty(as,"__esModule",{value:!0});var c=$c(),s=mL(),u=gL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var U=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,U.get?U:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],U=W.at(-1),ae={type:o.Template,value:K.slice(te.start,U.end)};return te.loc&&(ae.loc={start:te.loc.start,end:U.loc.end}),te.range&&(ae.start=te.range[0],ae.end=U.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,U=this._acornTokTypes;if(te===U.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===U.privateId)W.type=o.PrivateIdentifier;else if(te===U.semi||te===U.comma||te===U.parenL||te===U.parenR||te===U.braceL||te===U.braceR||te===U.dot||te===U.bracketL||te===U.colon||te===U.question||te===U.bracketR||te===U.ellipsis||te===U.arrow||te===U.jsxTagStart||te===U.incDec||te===U.starstar||te===U.jsxTagEnd||te===U.prefix||te===U.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===U.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===U.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===U.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===U.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===U.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,U=K.tokens,ae=this._tokens,z=()=>{U.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),U.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),U=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:U,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,U,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=U,ce.range=[te,U]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(U,ae){(typeof U!="object"||U===null)&&(U={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=U.sourceType,ue=E(U),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const U=this[k],ae=U.tokens;return U.comments&&(ae.comments=U.comments),ae}finishNode(...U){const ae=super.finishNode(...U);return this[D](ae)}finishNodeAt(...U){const ae=super.finishNodeAt(...U);return this[D](ae)}parse(){const U=this[k],ae=super.parse();if(ae.sourceType=U.originalSourceType,U.comments&&(ae.comments=U.comments),U.tokens&&(ae.tokens=U.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return U.lastToken&&(ae.range&&(ae.range[1]=U.lastToken.range[1]),ae.loc&&(ae.loc.end=U.lastToken.loc.end),ae.end=U.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(U){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(U)}raise(U,ae){const z=W.acorn.getLineInfo(this.input,U),ue=new SyntaxError(ae);throw ue.index=U,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(U,ae){this.raise(U,ae)}unexpected(U){let ae="Unexpected token";if(U!=null){if(this.pos=U,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(U){const ae=super.jsx_readString(U);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](U){return U.type==="TemplateElement"&&this[k].templateElements.push(U),U.type.includes("Function")&&!U.generator&&(U.generator=!1),U}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),V=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=V,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var uo={exports:{}};uo.exports;var $O;function yL(){return $O||($O=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",U="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[V]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[U]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(wr=Fe.length>3&&typeof wr=="function"?(br--,wr):void 0,Fr&&oi(st[0],st[1],Fr)&&(wr=br<3?void 0:wr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ve||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Ut}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(uo,uo.exports)),uo.exports}var bL="eslint",vL="9.12.0",xL="Nicholas C. Zakas ",OL="An AST-based pattern checker for JavaScript.",SL={eslint:"./bin/eslint.js"},EL="./lib/api.js",CL="./lib/types/index.d.ts",wL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},kL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},AL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},PL={"pre-commit":"lint-staged"},TL=["LICENSE","README.md","bin","conf","lib","messages"],DL="eslint/eslint",IL="https://eslint.org/donate",RL="https://eslint.org",FL="https://github.com/eslint/eslint/issues/",_L={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},BL={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},LL={jiti:"*"},NL={jiti:{optional:!0}},ML=["ast","lint","javascript","ecmascript","espree"],$L="MIT",jL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},qL={name:bL,version:vL,author:xL,description:OL,bin:SL,main:EL,types:CL,exports:wL,typesVersions:kL,scripts:AL,gitHooks:PL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:TL,repository:DL,funding:IL,homepage:RL,bugs:FL,dependencies:_L,devDependencies:BL,peerDependencies:LL,peerDependenciesMeta:NL,keywords:ML,license:$L,engines:jL},Al={},xs=[],Zn=[],QL=typeof Uint8Array<"u"?Uint8Array:Array,Qc=!1;function jO(){Qc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new QL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function UL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function WL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Pl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function QO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var GL={}.toString,VO=Array.isArray||function(c){return GL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var zL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Tl();function Tl(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Us(c,s){if(Tl()=Tl())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Tl().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return tS(c).length;default:if(p)return Rl(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=GO;function KL(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return lN(this,s,u);case"utf8":case"utf-8":return YO(this,s,u);case"ascii":return aN(this,s,u);case"latin1":case"binary":return oN(this,s,u);case"base64":return sN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return uN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:ZO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):ZO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function ZO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return JL(this,s,u,p);case"utf8":case"utf-8":return eN(this,s,u,p);case"ascii":return XO(this,s,u,p);case"latin1":case"binary":return tN(this,s,u,p);case"base64":return rN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function sN(c,s,u){return s===0&&u===c.length?qO(c):qO(c.slice(s,u))}function YO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return iN(p)}var HO=4096;function iN(c){var s=c.length;if(s<=HO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Pl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Pl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Pl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Pl(this,s,!1,52,8)};function In(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;In(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Dl(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Dl(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Dl(this,s,u,!1),u+2};function Il(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Il(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Il(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);In(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);In(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Dl(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Dl(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Il(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||In(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Il(this,s,u,!1),u+4};function KO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function JO(c,s,u,p,a){return a||KO(c,s,u,4),QO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return JO(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return JO(this,s,u,!1,p)};function eS(c,s,u,p,a){return a||KO(c,s,u,8),QO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return eS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function dN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function tS(c){return VL(fN(c))}function Fl(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function gN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||rS(c)||yN(c))}function rS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function yN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&rS(c.slice(0,0))}var co;typeof Object.create=="function"?co=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:co=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var nS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),Nl(s)?u.showHidden=s:s&&ef(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=vN),Ll(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function vN(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function xN(c,s){return c}function ON(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Ll(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return po(p)||(p=Ll(c,p,u)),p}var a=SN(c,s);if(a)return a;var d=Object.keys(s),v=ON(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Zc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Zc(s)}var o="",y=!1,O=["{","}"];if(Yc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Zc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=EN(c,s,u,v,d):g=d.map(function(f){return Xc(c,s,u,v,f,y)}),c.seen.pop(),CN(g,o,O)}function SN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(po(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Hc(s))return c.stylize(""+s,"number");if(Nl(s))return c.stylize(""+s,"boolean");if(fo(s))return c.stylize("null","null")}function Zc(c){return"["+Error.prototype.toString.call(c)+"]"}function EN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function CN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Yc(c){return Array.isArray(c)}function Nl(c){return typeof c=="boolean"}function fo(c){return c===null}function iS(c){return c==null}function Hc(c){return typeof c=="number"}function po(c){return typeof c=="string"}function aS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&Kc(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&Kc(c)==="[object Date]"}function ha(c){return Li(c)&&(Kc(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function Ml(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function oS(c){return vt.isBuffer(c)}function Kc(c){return Object.prototype.toString.call(c)}function Jc(c){return c<10?"0"+c.toString(10):c.toString(10)}var wN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kN(){var c=new Date,s=[Jc(c.getHours()),Jc(c.getMinutes()),Jc(c.getSeconds())].join(":");return[c.getDate(),wN[c.getMonth()],s].join(" ")}function lS(){console.log("%s - %s",kN(),_l.apply(null,arguments))}function ef(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function uS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function tf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,V=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=V(xe/je);xe>G*k>>1;Ge+=S)xe=V(xe/G);return V(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>V((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtV(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),V(Ge/nr)>b-ut&&$("overflow"),ut+=V(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnV((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,Cr.index),jn=ar.slice(Cr.index+Cr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Vt(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ue=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ue))Ce=Ce.replace(Ue,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Vt(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Ut(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var pr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:pr.domainHost,parse:pr.parse,serialize:pr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ve="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ve+"%"+Ve+Ve+"%"+Ve+Ve)+"|"+a("%[89A-Fa-f]"+Ve+"%"+Ve+Ve)+"|"+a("%"+Ve+Ve)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return V[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,U=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;yf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],V=L[3],Q=L[5];return(j<=23&&G<=59&&V<=59||j==23&&G==59&&V==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return yf}var bf,PS;function LN(){return PS||(PS=1,bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),bf}var vf,TS;function NN(){return TS||(TS=1,vf=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),vf}var xf,DS;function MN(){return DS||(DS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),Ef}var Cf,_S;function QN(){return _S||(_S=1,Cf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),Cf}var wf,BS;function VN(){return BS||(BS=1,wf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),wf}var kf,LS;function UN(){return LS||(LS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),kf}var Af,NS;function WN(){return NS||(NS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Af}var Pf,MS;function GN(){return MS||(MS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,V=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Pf}var Tf,$S;function jS(){return $S||($S=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Tf}var Df,qS;function QS(){return qS||(qS=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Df}var If,VS;function US(){return VS||(VS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),If}var Rf,WS;function GS(){return WS||(WS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,zS;function zN(){return zS||(zS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,ZS;function ZN(){return ZS||(ZS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),_f}var Bf,XS;function XN(){return XS||(XS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Bf}var Lf,YS;function YN(){return YS||(YS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Lf}var Nf,HS;function HN(){return HS||(HS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(U),P=s.schema.patternProperties||{},N=Object.keys(P).filter(U),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,V=s.opts.removeAdditional,Q=j||G||V,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ue=s.util.getProperty(z),it=x+Ue,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ue,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Ut=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),Nf}var Mf,KS;function KN(){return KS||(KS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),jf}var qf,t1;function tM(){return t1||(t1=1,qf={$ref:LN(),allOf:NN(),anyOf:MN(),$comment:$N(),const:jN(),contains:qN(),dependencies:QN(),enum:VN(),format:UN(),if:WN(),items:GN(),maximum:jS(),minimum:jS(),maxItems:QS(),minItems:QS(),maxLength:US(),minLength:US(),maxProperties:GS(),minProperties:GS(),multipleOf:zN(),not:ZN(),oneOf:XN(),pattern:YN(),properties:HN(),propertyNames:KN(),required:JN(),uniqueItems:eM(),validate:CS()}),qf}var Qf,r1;function rM(){if(r1)return Qf;r1=1;var c=tM(),s=da().toHash;return Qf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Qf}var Vf,n1;function nM(){if(n1)return Vf;n1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Vf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),V={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...V},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...V},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...V},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...V,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,U=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Vt=new Error(qt,{cause:kt});throw kt.code&&(Vt.code=kt.code),Vt}}validateEnvironment(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Al.Legacy=Re,Al}var jl={exports:{}},ql={exports:{}},Yf,d1;function i$(){if(d1)return Yf;d1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Yf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Yf}var Hf,m1;function g1(){if(m1)return Hf;m1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=i$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=g1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(ql,ql.exports)),ql.exports}var Ql={exports:{}};function b1(){return!1}function v1(){throw new Error("tty.ReadStream is not implemented")}function x1(){throw new Error("tty.ReadStream is not implemented")}var o$={isatty:b1,ReadStream:v1,WriteStream:x1},l$=Object.freeze({__proto__:null,ReadStream:v1,WriteStream:x1,default:o$,isatty:b1}),u$=i(l$),O1;function c$(){return O1||(O1=1,function(c,s){const u=u$,p=fS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=dH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Ql,Ql.exports)),Ql.exports}var S1;function $i(){return S1||(S1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?jl.exports=a$():jl.exports=c$()),jl.exports}var Kf,E1;function Jf(){if(E1)return Kf;E1=1;const c=Cl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),V=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ve=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ve=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ve=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ve=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ve},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),U=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ve=Object.getOwnPropertyDescriptor(Te,ke);if(Ve)return Ve;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ve=0;Ve":return{value:Te.value>Ve.value};case">=":return{value:Te.value>=Ve.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ve.value};case">>>":return{value:Te.value>>>Ve.value};case"+":return{value:Te.value+Ve.value};case"-":return{value:Te.value-Ve.value};case"*":return{value:Te.value*Ve.value};case"/":return{value:Te.value/Ve.value};case"%":return{value:Te.value%Ve.value};case"**":return{value:Te.value**Ve.value};case"|":return{value:Te.value|Ve.value};case"^":return{value:Te.value^Ve.value};case"&":return{value:Te.value&Ve.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ve=ue(Ie.arguments,ke);if(Ve!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ve)};if(U.has(Pe[de]))return{value:Ve[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ve)};if(U.has(Oe))return{value:Ve[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ve=Te.defs[0];if(Ve.parent&&Ve.parent.kind==="const"&&Ve.node.id.type==="Identifier")return ce(Ve.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ve=ce(Ie.right,ke);if(Ve!=null)return Ve}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ve=pe(Ie,ke);if(Ve!=null&&!z(Te.value,Ve.value))return{value:Te.value[Ve.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ve=ue(Ie.arguments,ke);if(Te!=null&&Ve!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ve)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ve of Ie.properties)if(Ve.type==="Property"){if(Ve.kind!=="init")return null;const lt=pe(Ve,ke),Oe=ce(Ve.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ve.type==="SpreadElement"||Ve.type==="ExperimentalSpreadProperty"){const lt=ce(Ve.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ve=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ve!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ve)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ve=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ve}=Ie;return typeof this[Ve]=="function"?this[Ve](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ve}=Ie;for(const lt of Te[Ve]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ve=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ve},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ve,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ve=Ie|0,lt=ke,Oe=Te,!(Ve>=1))throw new TypeError("'times' should be a positive integer.")}else Ve=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ve>0);return Ve===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Vt=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ve=ke-1;Ve>=0&&Ie.charCodeAt(Ve)===92;--Ve)Te=!Te;return Te}function fe(Ie,ke,Te){const Ve=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}function Ue(Ie,ke,Te){const Ve=[];let lt=0;for(const Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Vt.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ve}=Vt.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ve||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ue(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Ut=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function pr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ve=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ve.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ve=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ve,!0))}for(const Te of this.globalObjectNames){const Ve=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ve,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ve=oe(Te.arguments[0]);if(Ve==null||!Bt(ke,Ve))continue;const lt=ke[Ve],Oe=[Ve];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ve of Te.body){if(!Pt.test(Ve.type)||Ve.source==null)continue;const lt=Ve.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ve,path:Pe,type:se,info:Oe[se]}),Ve.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ve,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ve.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ve,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ve[se]&&(yield{node:Pe,path:Te,type:se,info:Ve[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ve)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ve){let lt=ke;for(;pr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ve,Pe))return;Te=Te.concat(Pe);const de=Ve[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ve[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ve[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ve[Ut]&&(yield{node:Oe,path:Te,type:Ut,info:Ve[Ut]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve),yield*this._iteratePropertyReferences(Oe,Te,Ve));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ve))}*_iterateLhsReferences(ke,Te,Ve){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ve,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ve,Oe))continue;const Pe=Te.concat(Oe),de=Ve[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ve))}*_iterateImportReferences(ke,Te,Ve){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ve,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Ut,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Ut,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:V,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Ut,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=V,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(ep)),ep}function k1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}co(Vl,Error);function F1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=ap;function ap(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",ap)}En.notDeepStrictEqual=op;function op(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",op)}En.strictEqual=lp;function lp(c,s,u){c!==s&&Cn(c,s,u,"===",lp)}En.notStrictEqual=up;function up(c,s,u){c===s&&Cn(c,s,u,"!==",up)}function L1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function g$(c){var s;try{c()}catch(u){s=u}return s}function N1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=g$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&L1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!L1(a,u)||!c&&a)throw a}En.throws=M1;function M1(c,s,u){N1(!0,c,s,u)}En.doesNotThrow=$1;function $1(c,s,u){N1(!1,c,s,u)}En.ifError=j1;function j1(c){if(c)throw c}var y$=Object.freeze({__proto__:null,AssertionError:Vl,assert:ho,deepEqual:sp,deepStrictEqual:ip,default:En,doesNotThrow:$1,equal:rp,fail:Cn,ifError:j1,notDeepEqual:ap,notDeepStrictEqual:op,notEqual:np,notStrictEqual:up,ok:ho,strictEqual:lp,throws:M1}),Ul=i(y$),cp,q1;function mo(){return q1||(q1=1,cp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),cp}var go={},Q1;function yo(){return Q1||(Q1=1,go.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},go.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},go.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),go}var fp,V1;function b$(){if(V1)return fp;V1=1;const c=mo(),s=yo();return fp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},fp}var pp,U1;function v$(){if(U1)return pp;U1=1;const c=mo(),{getLastIndex:s,getFirstIndex:u}=yo();return pp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},pp}var hp,W1;function dp(){if(W1)return hp;W1=1;const c=mo();return hp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},hp}var mp,G1;function x$(){if(G1)return mp;G1=1;const c=dp();return mp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},mp}var gp,z1;function O$(){if(z1)return gp;z1=1;const c=mo(),{getFirstIndex:s,search:u}=yo();return gp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},vp}var xp,Y1;function E$(){if(Y1)return xp;Y1=1;const c=dp();return xp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},xp}var Op,H1;function C$(){if(H1)return Op;H1=1;const c=b$(),s=v$(),u=x$(),p=O$(),a=bp(),d=S$(),v=E$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Op={forward:new m(a,p),backward:new m(s,c)},Op}var Sp,K1;function w$(){if(K1)return Sp;K1=1;const c=bp();return Sp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Sp}var Ep,J1;function k$(){if(J1)return Ep;J1=1;const c=Ul,{isCommentToken:s}=Kr(),u=C$(),p=bp(),a=w$(),d=yo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return Ep=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Ap}var Pp,oE;function Tp(){if(oE)return Pp;oE=1;const c=aE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Dp=d,Dp}var Ip,uE;function P$(){if(uE)return Ip;uE=1;const c=Tp(),s=A$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,V=this.thrownForkContext;G.add=f.bind(null,G,V,j),V.add=f.bind(null,V,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const V=this.choiceContext;return V.trueForkContext.addAll(I.trueForkContext),V.falseForkContext.addAll(I.falseForkContext),V.nullishForkContext.addAll(I.nullishForkContext),V.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const V=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,V,I.defaultBodySegments)):j.add(V));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Ip=P,Ip}var Rp,cE;function fE(){if(cE)return Rp;cE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return Rp=c,Rp}var Fp,pE;function T$(){if(pE)return Fp;pE=1;const c=P$(),s=fE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return _p=R,_p}var Bp,dE;function mE(){return dE||(dE=1,Bp=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Bp}var ji={},Lp={exports:{}},Np={exports:{}},Mp,gE;function I$(){if(gE)return Mp;gE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},qp={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)U?te:U}),s=K(function(te,U){return te0?1:0},d=K(function(te,U){return~~(te/U)}),v=K(function(te,U){return te%U}),m=K(function(te,U){return Math.floor(te/U)}),o=K(function(te,U){var ae;return(te%(ae=U)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,U){return Math.pow(te,U)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,U){return Math.atan2(te,U)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},V=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,U){var ae;for(te=Math.abs(te),U=Math.abs(U);U!==0;)ae=te%U,te=U,U=ae;return te}),W=K(function(te,U){return Math.abs(Math.floor(te/$(te,U)*U))}),Qp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:V,odd:Q,gcd:$,lcm:W};function K(te,U){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Gp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,WB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,WB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){Rn(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return kr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Zp,RE;function q$(){var j;if(RE)return Zp;RE=1;const{isCommentToken:c}=Kr(),s=k$(),u=Wl(),p=Jf(),a=rE(),{directivesPattern:d}=sE(),v=D$(),m=mE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=IE(),g=Mc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,V){const Q=[];let $=0,W=0;for(;$=V.length||$=V.range[0]||V.range[0]<=G.range[0]&&V.range[1]>=G.range[0]}function F(G,V,Q,$){if(R(V,Q))return!1;const[W,K]=V.range[1]<=Q.range[0]?[V,Q]:[Q,V],te=G.getLastToken(W)||W,U=G.getFirstToken(K)||K;let ae=te;for(;ae!==U;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==U&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,V={},Q={}){for(const $ of new Set([...Object.keys(V),...Object.keys(Q)])){const W=V[$]===void 0?void 0:T(V[$]),te=Q[$]&&Q[$].value||W,U=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=U!==void 0,ae.eslintExplicitGlobalComments=U,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,V){Object.keys(V).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,U,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,U=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);Rn(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=U||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const U=this.scopeManager.acquire(te,K);if(U)return U.type==="function-expression-name"?($.set(Q,U.childScopes[0]),U.childScopes[0]):($.set(Q,U),U)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const U=te.variables.find(ae=>ae.name===Q);if(U)return U.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:U,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(U);if(!(te.type==="Line"&&!ue)){if(U==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${U} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(U){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=U.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(U=>{const{label:ae,value:z}=f.parseDirective(U.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:U.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(U),K[ue].value=ce):K[ue]={comments:[U],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:U.loc}):Q.push({ruleId:null,loc:U.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(kr(this,j))return kr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Zp=L,Zp}var Xp,FE;function _E(){return FE||(FE=1,Xp={SourceCode:q$()}),Xp}var Yp,BE;function Gl(){return BE||(BE=1,Yp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Yp}var Hp,LE;function Q$(){if(LE)return Hp;LE=1;const c=Gl(),{Legacy:{ConfigOps:s}}=h1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Hp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Hp}function bo(c){return(bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function Kp(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||NE(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function V$(c){return function(s){if(Array.isArray(s))return Jp(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||NE(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function NE(c,s){if(c){if(typeof c=="string")return Jp(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Jp(c,s):void 0}}function Jp(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[V]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[V]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,V,Q,$,W,K,te;function U(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(V=$.length;(V-=1)>=0;)if($[V]){if(S(I,Q[G]))j=new g($[V],[te,V],"Property",new x($,V));else{if(!b($[V]))continue;j=new g($[V],[te,V],null,new x($,V))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||U(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)V.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(V),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var V;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),U$=ME(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=pr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,V=pr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=pr(["\\",'"'],!0,!1),U=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=pr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=pr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=pr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=pr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=pr(["/"],!0,!1),qt=Zt(":not(",!1),Vt=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ue=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Ut=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function pr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beUt&&(Ut=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ve(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(V))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Vt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ue)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&jE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&jE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&qE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&qE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&QE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&QE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function th(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:zl.VisitorKeys[p]?zl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function rh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&bo(c)==="object"&&typeof c[u]=="string"}function jE(c,s,u,p,a){var d=Kp(u,1)[0];if(!d)return!1;for(var v=th(d,a),m=0;m0&&rh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return ih={getPlaceholderMatcher:c,interpolate:s},ih}var ah,XE;function Z$(){if(XE)return ah;XE=1;const c=Ul,{RuleFixer:s}=G$(),{interpolate:u}=z$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return ah=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},ah}function X$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oh,YE;function Y$(){if(YE)return oh;YE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),oh={LazyLoadingRuleMap:s},oh}var lh={exports:{}},vo={},uh={exports:{}},HE;function H$(){return HE||(HE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}uh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),uh.exports}var ch={exports:{}},KE;function JE(){return KE||(KE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ch.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ch.exports}var fh={exports:{}},eC;function K$(){return eC||(eC=1,function(){var c=JE();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}fh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),fh.exports}var tC;function rC(){return tC||(tC=1,function(){vo.ast=H$(),vo.code=JE(),vo.keyword=K$()}()),vo}var ph,nC;function sC(){return nC||(nC=1,ph={LATEST_ECMA_VERSION:2025}),ph}var iC;function Ze(){return iC||(iC=1,function(c){const{KEYS:s}=Cl(),u=rC(),p=kl(),a=Gl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=Wl(),y=rE(),{LATEST_ECMA_VERSION:O}=sC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function V(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function U(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Vt(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ue(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Ut(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ue(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ue):ee.getFirstToken(X,Ue)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ve(ee.left,ee.operator),Ke=be&&ve&&Ve(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ve(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:U,isES5Constructor:G,getUpperFunction:V,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Ut,isDotToken:qt,isQuestionDotToken:Vt,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Vt),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ue),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ue,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=V(Ne);if(Ke===null||!U(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!U(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(U(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},hh}var dh,oC;function e3(){if(oC)return dh;oC=1;const c=Ze();return dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},dh}var mh,lC;function t3(){if(lC)return mh;lC=1;const c=Ze();return mh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},mh}var gh,uC;function r3(){if(uC)return gh;uC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return gh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},gh}var yh,cC;function n3(){if(cC)return yh;cC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},yh}var bh,fC;function s3(){if(fC)return bh;fC=1;const c=Ze();return bh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},bh}var vh,pC;function i3(){if(pC)return vh;pC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},vh}var xh,hC;function a3(){if(hC)return xh;hC=1;const c=Ze();return xh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},xh}var Oh,dC;function o3(){return dC||(dC=1,Oh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Oh}var Sh,mC;function l3(){if(mC)return Sh;mC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Sh}var Eh,gC;function u3(){if(gC)return Eh;gC=1;const c=Ze();return Eh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},Eh}var Ch,yC;function c3(){return yC||(yC=1,Ch={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),Ch}var wh,bC;function f3(){if(bC)return wh;bC=1;const c=Ze();return wh={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},wh}var kh,vC;function p3(){if(vC)return kh;vC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return kh={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},kh}var Ah,xC;function h3(){if(xC)return Ah;xC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Ah}var Ph,OC;function d3(){if(OC)return Ph;OC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Ph={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Ph}var Th,SC;function m3(){if(SC)return Th;SC=1;const c=Ze();return Th={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Th}var Dh,EC;function g3(){if(EC)return Dh;EC=1;const c=Ze();return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Dh}var Ih,CC;function Qi(){if(CC)return Ih;CC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Ih={upperCaseFirst:u,getGraphemeCount:p},Ih}var Rh,wC;function y3(){if(wC)return Rh;wC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Rh={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},Rh}var Fh,kC;function b3(){if(kC)return Fh;kC=1;const c=Ze();return Fh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Fh}var _h,AC;function v3(){if(AC)return _h;AC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return _h={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},_h}var Bh,PC;function x3(){return PC||(PC=1,Bh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Bh}var Lh,TC;function O3(){if(TC)return Lh;TC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Lh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const V=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+V)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},Nh}var Mh,IC;function E3(){if(IC)return Mh;IC=1;const c=/^no default$/iu;return Mh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},Mh}var $h,RC;function C3(){return RC||(RC=1,$h={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),$h}var jh,FC;function w3(){return FC||(FC=1,jh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),jh}var qh,_C;function k3(){if(_C)return qh;_C=1;const c=Ze();return qh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},qh}var Qh,BC;function Vh(){return BC||(BC=1,Qh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Qh}var Uh,LC;function A3(){if(LC)return Uh;LC=1;const c=Ze(),s=Vh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Uh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Uh}var Wh,NC;function P3(){return NC||(NC=1,Wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),Wh}var Gh,MC;function T3(){if(MC)return Gh;MC=1;const c=Ze();return Gh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Gh}var zh,$C;function D3(){if($C)return zh;$C=1;const{getStaticValue:c}=Kr();return zh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},zh}var Zh,jC;function I3(){if(jC)return Zh;jC=1;const c=Ze();return Zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Xh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Xh}var Yh,QC;function F3(){if(QC)return Yh;QC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Yh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Yh}var Hh,VC;function _3(){return VC||(VC=1,Hh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Hh}var Kh,UC;function B3(){return UC||(UC=1,Kh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return rd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},rd}var nd,XC;function j3(){if(XC)return nd;XC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},nd}var sd,YC;function q3(){return YC||(YC=1,sd={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),sd}var id,HC;function Q3(){return HC||(HC=1,id={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),id}var ad,KC;function V3(){if(KC)return ad;KC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ad={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ad}var od,JC;function U3(){if(JC)return od;JC=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return od={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},od}var ld,ew;function W3(){if(ew)return ld;ew=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return ld={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},ld}var ud,tw;function G3(){return tw||(tw=1,ud={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),ud}var cd,rw;function z3(){if(rw)return cd;rw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return cd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},cd}var fd,nw;function Z3(){if(nw)return fd;nw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function V(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function U(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:U}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||U(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(U,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[U.range[1]-U.loc.end.column,U.range[1]-U.loc.end.column+z+ue]:[U.range[0]-U.loc.start.column,U.range[0]-U.loc.start.column+z+ue];s.report({node:U,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(U,ae){const z=ae?o.getLastToken(U):o.getFirstToken(U),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(U,ae){const z=ae===!0?o.getLastToken(U,1):o.getTokenBefore(U),ue=ae===!0?U.loc.end.line:U.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(U,ae){const z=g(U,!1);if(U.type!=="ArrayExpression"&&U.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab),U.type==="IfStatement"&&U.alternate){const ue=o.getTokenBefore(U.alternate);b(ue,ae),f(U.alternate)||b(U.alternate,ae)}if(U.type==="TryStatement"&&U.handler){const ue=o.getFirstToken(U.handler);b(ue,ae)}if(U.type==="TryStatement"&&U.finalizer){const ue=o.getTokenBefore(U.finalizer);b(ue,ae)}if(U.type==="DoWhileStatement"){const ue=o.getTokenAfter(U.body);b(ue,ae)}}function S(U,ae){U.forEach(z=>b(z,ae))}function E(U,ae){const z=o.getLastToken(U),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(U,!0)&&x(U,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(U,ae){const z=o.getLastToken(U,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(U,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(U,ae){const z=g(U,!1);(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab,{line:U.loc.start.line,column:U.loc.start.column})}function T(U,ae,z){let ue=U.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(U){return T(U,"VariableDeclarator")}function F(U,ae){return ae&&ae.parent.loc.start.line===U.loc.start.line&&ae.parent.declarations.length>1}function P(U){const ae=U.parent;return ae.arguments.length>=2&&ae.arguments[1]===U?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(U){const ae=U.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==U)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(U){const ae=U.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(U.body,z),E(U,z-ue)}function L(U){const ae=o.getLastToken(U),z=U.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(U){if(L(U))return;let ae=U.type==="ArrayExpression"?U.elements:U.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(U);if(f(U)){const ce=U.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==U.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=U.parent.type==="ObjectExpression"?U.parent.properties:U.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(U)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(U,z)}else z=g(U).goodChar;m[U.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[U.type],F(U,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===U.loc.end.line)&&E(U,z+(F(U,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(U){return U.type==="BlockStatement"||U.type==="ClassBody"||U.body&&U.body.type==="BlockStatement"||U.consequent&&U.consequent.type==="BlockStatement"}function V(U){if(L(U))return;if(U.parent&&(U.parent.type==="FunctionExpression"||U.parent.type==="FunctionDeclaration"||U.parent.type==="ArrowFunctionExpression")){I(U);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];U.parent&&ue.includes(U.parent.type)&&G(U)?ae=g(U.parent).goodChar:U.parent&&U.parent.type==="CatchClause"?ae=g(U.parent.parent).goodChar:ae=g(U).goodChar,U.type==="IfStatement"&&U.consequent.type!=="BlockStatement"?z=[U.consequent]:Array.isArray(U.body)?z=U.body:z=[U.body],z.length>0&&S(z,ae+v),U.type==="BlockStatement"&&E(U,ae)}function Q(U){return U.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==U.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(U){const ae=Q(U),z=g(U).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[U.kind];if(S(ae,ne),o.getLastToken(U).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(U,g(ce).goodChar):E(U,ne-v)}function W(U){U.body.type!=="BlockStatement"&&V(U)}function K(U,ae){const z=U.type==="SwitchStatement"?U:U.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(U){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(U).replace(o.getText(U.argument),"");return ae.test(z)}return{Program(U){U.body.length>0&&S(U.body,g(U).goodChar)},ClassBody:V,BlockStatement:V,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(U){U.consequent.type!=="BlockStatement"&&U.consequent.loc.start.line>U.loc.start.line&&V(U)},VariableDeclaration(U){U.declarations.at(-1).loc.start.line>U.declarations[0].loc.start.line&&$(U)},ObjectExpression(U){j(U)},ArrayExpression(U){j(U)},MemberExpression(U){if(typeof m.MemberExpression>"u"||L(U)||T(U,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(U,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(U).goodChar+v*m.MemberExpression,z=[U.property],ue=o.getTokenBefore(U.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(U){const ae=g(U).goodChar,z=K(U,ae);S(U.cases,z),E(U,ae)},SwitchCase(U){if(L(U))return;const ae=K(U);S(U.consequent,ae+v)},FunctionDeclaration(U){L(U)||(m.FunctionDeclaration.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(U){L(U)||(m.FunctionExpression.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(U){if(L(U))return;const ae=g(U).goodChar;te(U)?k(U,ae):b(U,ae)},CallExpression(U){L(U)||(m.CallExpression.arguments==="first"&&U.arguments.length?S(U.arguments.slice(1),U.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(U.arguments,g(U).goodChar+v*m.CallExpression.arguments))}}}},pd}var hd,iw;function Y3(){if(iw)return hd;iw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return hd={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const U=W.length-K;if((U&&te==="strict"||U<0&&te==="minimum"||U>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=U>0,pe=Math.abs(U),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),U,ae,z;f&&$>1?(U=f.beforeColon,ae=f.afterColon,z=f.mode):(U=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?U:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,U,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):V(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},md}var gd,lw;function J3(){if(lw)return gd;lw=1;const c=Ze(),s=Vh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:V,ExportNamedDeclaration:U,ExportDefaultDeclaration:U,ExportAllDeclaration:U,FunctionDeclaration:G,ImportDeclaration:U,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:V,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},gd}var yd,uw;function e5(){if(uw)return yd;uw=1;const c=Ze();return yd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},yd}var bd,cw;function t5(){if(cw)return bd;cw=1;const c=Ze();return bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},bd}var vd,fw;function r5(){if(fw)return vd;fw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function V($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const U=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&V($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(U<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(U)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},vd}var xd,pw;function n5(){if(pw)return xd;pw=1;const c=Ze();return xd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},xd}var Od,hw;function s5(){if(hw)return Od;hw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Od}var Sd,dw;function i5(){if(dw)return Sd;dw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Sd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),V=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||V)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield V.insertTextBefore(W,I.operator),yield V.removeRange([R.range[0],P.range[0]]),yield V.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield V.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Sd}var Ed,mw;function a5(){return mw||(mw=1,Ed={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),Ed}var Cd,gw;function o5(){return gw||(gw=1,Cd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),Cd}var wd,yw;function l5(){if(yw)return wd;yw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return wd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(V,Q){let $=0;return V.replace(/\t/gu,(W,K)=>{const te=K+$,U=Q?te%Q:0,ae=Q-U;$+=ae-1}),Array.from(V).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(V,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===V.length)}function D(V,Q,$){const W=$.loc.start,K=$.loc.end,te=!V.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===V.length)}function T(V){if(!V||!V.parent||V.type!=="JSXEmptyExpression"||V.parent.type!=="JSXExpressionContainer")return!1;const Q=V.parent;return Q.loc.start.line===Q.loc.end.line}function R(V,Q){return V.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(V,Q,$){Array.isArray(V[Q])||(V[Q]=[]),V[Q].push($)}function P(){return a.ast.tokens.filter(V=>V.type==="String"||V.type==="JSXText"&&a.getNodeByRangeIndex(V.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(V=>V.type==="Template")}function I(){return a.ast.tokens.filter(V=>V.type==="RegularExpression")}function L(V){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?V.at(-1)!==$.parent&&V.push($.parent):V.push(Q)}),V}function G(V){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),U=N(),ae=L(U),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:V,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:V,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},wd}var kd,bw;function u5(){if(bw)return kd;bw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},kd}var Ad,vw;function c5(){if(vw)return Ad;vw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Ad={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Ad}var Pd,xw;function f5(){return xw||(xw=1,Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Pd}var Td,Ow;function p5(){if(Ow)return Td;Ow=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Td}var Dd,Sw;function h5(){if(Sw)return Dd;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Dd}var Id,Ew;function d5(){if(Ew)return Id;Ew=1;const c=Ze();return Id={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Id}var Rd,Cw;function m5(){if(Cw)return Rd;Cw=1;const c=Ze();return Rd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const V=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=V+K.length;return G.replaceTextRange([V,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=V+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const U=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=U.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([V,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},Rd}var Fd,ww;function g5(){if(ww)return Fd;ww=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Fd}var _d,kw;function y5(){if(kw)return _d;kw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return _d={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},_d}var Bd,Aw;function b5(){if(Aw)return Bd;Aw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Bd}var Ld,Pw;function v5(){if(Pw)return Ld;Pw=1;const c=Ze();return Ld={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Ld}var Nd,Tw;function x5(){return Tw||(Tw=1,Nd={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),Nd}var Md,Dw;function O5(){if(Dw)return Md;Dw=1;const c=Ze();return Md={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},Md}var $d,Iw;function S5(){if(Iw)return $d;Iw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return $d={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},$d}var jd,Rw;function E5(){if(Rw)return jd;Rw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return jd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},jd}var qd,Fw;function C5(){return Fw||(Fw=1,qd={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),qd}var Qd,_w;function w5(){if(_w)return Qd;_w=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Qd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Qd}var Vd,Bw;function k5(){if(Bw)return Vd;Bw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Vd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Vd}var Ud,Lw;function A5(){return Lw||(Lw=1,Ud={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Ud}var Wd,Nw;function P5(){return Nw||(Nw=1,Wd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),Wd}var Gd,Mw;function T5(){return Mw||(Mw=1,Gd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Gd}var zd,$w;function D5(){if($w)return zd;$w=1;const c=Ze();return zd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},zd}var Zd,jw;function I5(){if(jw)return Zd;jw=1;const c=Ze();return Zd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Zd}var Xd,qw;function R5(){return qw||(qw=1,Xd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Xd}var Yd,Qw;function F5(){if(Qw)return Yd;Qw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Yd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Yd}var Hd,Vw;function _5(){if(Vw)return Hd;Vw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Hd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Hd}var Kd,Uw;function B5(){if(Uw)return Kd;Uw=1;const c=Ze();return Kd={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},Kd}var Jd,Ww;function L5(){if(Ww)return Jd;Ww=1;const c=Ze();return Jd={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},Jd}var em,Gw;function N5(){if(Gw)return em;Gw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return em={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},em}var tm,zw;function M5(){if(zw)return tm;zw=1;const{isConstant:c}=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},tm}var rm,Zw;function $5(){return Zw||(Zw=1,rm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),rm}var nm,Xw;function j5(){return Xw||(Xw=1,nm={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),nm}var Es={},Yw;function Cs(){if(Yw)return Es;Yw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,V=33,Q=35,$=36,W=37,K=38,te=40,U=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Vt=66,tr=68,fe=70,Ue=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Ut=98,ir=99,Ot=100,Zt=102,pr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ve=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class Cr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new Cr(this,null)}sibling(){return new Cr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new Cr(null,null),this.groupNames=new Map}clear(){this.branchID=new Cr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,U,be,ve,at,ht,dt]),Xn=new Set([K,V,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,U,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,V,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Vi(nt){return ws(nt)||bt(nt)}class Ui{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===U&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==V)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(V))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==U&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ue)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ve)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Vi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Ui(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function cr(nt,H){return new li(H).parseLiteral(String(nt))}function Eo(nt,H){new Ui(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Ui,Es.parseRegExpLiteral=cr,Es.validateRegExpLiteral=Eo,Es.visitRegExpAST=ci,Es}var sm,Hw;function q5(){if(Hw)return sm;Hw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return sm={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},sm}var im,Kw;function Q5(){return Kw||(Kw=1,im={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var am,Jw;function V5(){return Jw||(Jw=1,am={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),am}var om,ek;function U5(){return ek||(ek=1,om={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),om}var lm,tk;function W5(){return tk||(tk=1,lm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),lm}var um,rk;function G5(){if(rk)return um;rk=1;const c=Ze();return um={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},um}var cm,nk;function z5(){if(nk)return cm;nk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return cm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},cm}var fm,sk;function Z5(){if(sk)return fm;sk=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return fm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},fm}var pm,ik;function X5(){if(ik)return pm;ik=1;const c=Ze();return pm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},pm}var hm,ak;function Y5(){if(ak)return hm;ak=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},hm}var dm,ok;function xo(){if(ok)return dm;ok=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return dm=s,dm}var mm,lk;function H5(){if(lk)return mm;lk=1;const c=Ze(),s=xo();return mm={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),V=p.getTokenBefore(G);if(V.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===V.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},mm}var gm,uk;function K5(){if(uk)return gm;uk=1;const c=Ze();return gm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},gm}var ym,ck;function J5(){if(ck)return ym;ck=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return ym={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},ym}var bm,fk;function ej(){if(fk)return bm;fk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return bm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},bm}var vm,pk;function tj(){if(pk)return vm;pk=1;const c=Ze();return vm={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},vm}var xm,hk;function rj(){return hk||(hk=1,xm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),xm}var Om,dk;function nj(){return dk||(dk=1,Om={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Om}var Sm,mk;function sj(){if(mk)return Sm;mk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Sm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Sm}var Em,gk;function ij(){if(gk)return Em;gk=1;const c=Ze();return Em={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},Em}var Cm,yk;function aj(){if(yk)return Cm;yk=1;const c=Ze();return Cm={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},Cm}var wm,bk;function oj(){if(bk)return wm;bk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return wm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},wm}var km,vk;function lj(){if(vk)return km;vk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return km={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ue||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function V(fe){for(let Ue=fe;Ue;Ue=Ue.parent)if(Ue.type==="ReturnStatement"||Ue.type==="ArrowFunctionExpression"&&Ue.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ue=p.getLastToken(fe),mt=p.getTokenBefore(Ue);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ue)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ue.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ue.range[1],mt.range[0]);return Bt.replaceTextRange([Ue.range[0],mt.range[1]],(te(fe)?" ":"")+se+(U(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ue=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ue=Ue.object,mt=Ue.type;return mt==="CallExpression"}function Be(fe){const Ue=fe.callee;j(Ue,d(fe))&&(L(Ue)||!(ae(fe)||Ue.type==="NewExpression"&&!Q(Ue)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ue.type==="MemberExpression"&&pe(Ue)||!fe.optional&&Ue.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ue=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ue||mt===Ue&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ue||Pt===Ue&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ue=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ue,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ue)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ue){const mt=[fe];let Pt=fe;for(;Pt!==Ue;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ue){return Se(Ue,fe).reverse()}function Me(fe,Ue){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ue);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ue);case"MemberExpression":return fe.computed&&fe.property===Ue;case"ConditionalExpression":return fe.consequent===Ue;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ue,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ue),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ue=>Ue.node===fe)}function qt(fe){T.reports=T.reports.filter(Ue=>Ue.node!==fe)}function Vt(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Vt(fe.parent):!1}function tr({left:fe,operator:Ue,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ue)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ue=>Ue&&j(Ue,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ue=>z(Ue)&&I(Ue)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ue=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ue);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ue)&&a.add(Ue),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ue=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ue.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ue.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ue.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&a.add(Ue)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ue=>{const mt=we(fe,Ue);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ue=>Ue.value&&j(Ue.value,k)).forEach(Ue=>ne(Ue.value))},ObjectPattern(fe){fe.properties.filter(Ue=>{const mt=Ue.value;return z(mt)&&I(mt)}).forEach(Ue=>ne(Ue.value))},Property(fe){if(fe.computed){const{key:Ue}=fe;Ue&&j(Ue,k)&&ne(Ue)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ue=fe.argument;z(Ue)&&I(Ue)&&ne(Ue)},ReturnStatement(fe){const Ue=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ue,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ue=d(fe);fe.expressions.filter(mt=>j(mt,Ue)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ue=p.getFirstToken(fe);K(Ue,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ue}=fe,mt=p.getLastToken(fe);Ue.loc.end.line===mt.loc.start.line?ce(fe):L(Ue)&&ne(Ue)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ue=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ue,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ue=>Ue&&I(Ue)).forEach(ne)},AssignmentPattern(fe){const{left:Ue,right:mt}=fe;z(Ue)&&I(Ue)&&ne(Ue),mt&&j(mt,k)&&ne(mt)}}}},Pm}var Tm,Sk;function fj(){if(Sk)return Tm;Sk=1;const c=xo(),s=Ze();return Tm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Tm}var Dm,Ek;function pj(){if(Ek)return Dm;Ek=1;const{directivesPattern:c}=sE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Dm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Dm}var Im,Ck;function hj(){if(Ck)return Im;Ck=1;const c=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Im}var Rm,wk;function dj(){if(wk)return Rm;wk=1;const c=Ze();return Rm={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},Rm}var Fm,kk;function mj(){return kk||(kk=1,Fm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Fm}var _m,Ak;function gj(){if(Ak)return _m;Ak=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return _m={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},_m}var Bm,Pk;function yj(){return Pk||(Pk=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Bm}var Lm,Tk;function bj(){if(Tk)return Lm;Tk=1;const c=Ze(),{getStaticValue:s}=Kr();return Lm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Lm}var Nm,Dk;function vj(){if(Dk)return Nm;Dk=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return Nm={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},Nm}var Mm,Ik;function xj(){if(Ik)return Mm;Ik=1;const c=Ze();return Mm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},Mm}var $m,Rk;function Oj(){if(Rk)return $m;Rk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return $m={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},$m}var jm,Fk;function Sj(){if(Fk)return jm;Fk=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return jm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},jm}var qm,_k;function Ej(){if(_k)return qm;_k=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return qm={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},qm}var Qm,Bk;function Cj(){if(Bk)return Qm;Bk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Qm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const V=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:V,column:Q.index},end:{line:V,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let V=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],V+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),V=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Qm}var Vm,Lk;function wj(){if(Lk)return Vm;Lk=1;const{getStaticPropertyName:c}=Ze();return Vm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Vm}var Um,Nk;function kj(){if(Nk)return Um;Nk=1;const c=Ze();return Um={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Um}var Wm,Mk;function Aj(){if(Mk)return Wm;Mk=1;const c=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},Wm}var Gm,$k;function Pj(){return $k||($k=1,Gm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Gm}var zm,jk;function Tj(){return jk||(jk=1,zm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),zm}var Zm,qk;function Dj(){if(qk)return Zm;qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Zm={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Zm}var Xm,Qk;function Ij(){return Qk||(Qk=1,Xm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Xm}var Ym,Vk;function Rj(){if(Vk)return Ym;Vk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Ym={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),Km}var Jm,Gk;function Bj(){return Gk||(Gk=1,Jm=function(s){return s>=127462&&s<=127487}),Jm}var eg,zk;function Lj(){return zk||(zk=1,eg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),eg}var tg,Zk;function Nj(){if(Zk)return tg;Zk=1;const c=Fj(),s=_j(),u=Bj(),p=Lj();return tg={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},tg}var rg,Xk;function ng(){if(Xk)return rg;Xk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return rg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},rg}var sg,Yk;function Mj(){if(Yk)return sg;Yk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return sg={parseStringLiteral:o,parseTemplateToken:y},sg}var ig,Hk;function $j(){if(Hk)return ig;Hk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=Nj(),x=Ze(),{isValidWithUnicodeFlag:g}=ng(),{parseStringLiteral:f,parseTemplateToken:b}=Mj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,V=I[j].end,Q=N.slice(G,V);return R(P,Q)}return ig={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var V;const N=(V=P.options[0])==null?void 0:V.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let U=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return U??(U=f(ce)),F(ne,ce,U)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return U??(U=b(ce)),F(ne,ce,U)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];U??(U=b(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];U??(U=f(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,U;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),U=a(z,$);else{if(ue.regex)continue;te=String(ue.value),U=""}typeof U=="string"&&G(ae,te,U,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},ig}var ag,Kk;function jj(){if(Kk)return ag;Kk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return ag={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},ag}var og,Jk;function qj(){return Jk||(Jk=1,og={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),og}var lg,eA;function Qj(){return eA||(eA=1,lg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),lg}var ug,tA;function Vj(){return tA||(tA=1,ug={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),ug}var cg,rA;function Uj(){if(rA)return cg;rA=1;const c=Ze();return cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},cg}var fg,nA;function Wj(){if(nA)return fg;nA=1;const c=Ze();return fg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},fg}var pg,sA;function Gj(){return sA||(sA=1,pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),pg}var hg,iA;function zj(){return iA||(iA=1,hg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),hg}var dg,aA;function Zj(){return aA||(aA=1,dg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),dg}var mg,oA;function Xj(){return oA||(oA=1,mg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),mg}var gg,lA;function Yj(){return lA||(lA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),gg}var yg,uA;function Hj(){return uA||(uA=1,yg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),yg}var bg,cA;function Kj(){if(cA)return bg;cA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return bg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},bg}var vg,fA;function Jj(){if(fA)return vg;fA=1;const c=["Symbol","BigInt"];return vg={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},vg}var xg,pA;function eq(){if(pA)return xg;pA=1;const c=Ze();return xg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},xg}var Og,hA;function tq(){return hA||(hA=1,Og={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Og}var Sg,dA;function rq(){return dA||(dA=1,Sg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Sg}var Eg,mA;function nq(){if(mA)return Eg;mA=1;const{getVariableByName:c}=Ze();return Eg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},Eg}var Cg,gA;function sq(){if(gA)return Cg;gA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return Cg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},Cg}var wg,yA;function iq(){if(yA)return wg;yA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return wg={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},wg}var kg,bA;function aq(){if(bA)return kg;bA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return kg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},kg}var Ag,vA;function oq(){return vA||(vA=1,Ag={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Ag}var Pg,xA;function lq(){return xA||(xA=1,Pg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Pg}var Tg,OA;function uq(){if(OA)return Tg;OA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Tg={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Tg}var Dg,SA;function cq(){return SA||(SA=1,Dg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Dg}var Ig,EA;function fq(){if(EA)return Ig;EA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Ig={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Ig}var Rg,CA;function pq(){return CA||(CA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),Rg}var Fg,wA;function hq(){return wA||(wA=1,Fg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Fg}var _g,kA;function dq(){if(kA)return _g;kA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return _g={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},_g}var Bg,AA;function mq(){if(AA)return Bg;AA=1;const{getStaticPropertyName:c}=Ze();return Bg={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Bg}var Lg,PA;function gq(){if(PA)return Lg;PA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Lg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Lg}var Ng,TA;function yq(){if(TA)return Ng;TA=1;const c=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},Ng}var Mg,DA;function bq(){if(DA)return Mg;DA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return Mg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},Mg}var $g,IA;function vq(){if(IA)return $g;IA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},$g}var jg,RA;function xq(){return RA||(RA=1,jg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),jg}var qg,FA;function _A(){if(FA)return qg;FA=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,U)=>Object.defineProperty(K,te,{value:U}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,U,ae)=>U.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,U)=>te+6{const ae=U.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,U,ae,z)=>te===p?`\\[${U}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(U)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let U=T[K];return U||(U=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=U),te?new RegExp(U,"i"):new RegExp(U)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,U,ae,z){this.origin=te,this.pattern=U,this.negative=ae,this.regex=z}}const L=(K,te)=>{const U=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(U,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,U)=>F(K)?K?G.isNotRelative(K)?U(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:U("path must not be empty",TypeError):U(`path must be a string, but got \`${te}\``,TypeError),V=K=>y.test(K);G.isNotRelative=V,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:U=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=U,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const U=L(te,this._ignoreCase);this._added=!0,this._rules.push(U)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,U){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!U)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,U,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,U,ae,z)}_t(te,U,ae,z){if(te in U)return U[te];if(z||(z=te.split(O)),z.pop(),!z.length)return U[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,U,ae,z);return U[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,qg=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=U=>/^\\\\\?\\/.test(U)||/["<>|\u0000-\u001F]+/u.test(U)?U:U.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=U=>te.test(U)||V(U)}return qg}var Qg,BA;function Oq(){if(BA)return Qg;BA=1;const c=Ze(),s=_A(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Qg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Qg}var Vg,LA;function Sq(){if(LA)return Vg;LA=1;const c=Ze(),s=_A(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Vg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Vg}var Ug,NA;function Eq(){if(NA)return Ug;NA=1;const c=Ze();return Ug={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Ug}var Wg,MA;function Cq(){return MA||(MA=1,Wg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),Wg}var Gg,$A;function wq(){if($A)return Gg;$A=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Gg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Gg}var zg,jA;function kq(){if(jA)return zg;jA=1;const c=Ze();return zg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},zg}var Zg,qA;function Aq(){if(qA)return Zg;qA=1;const c=Ze();return Zg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Zg}var Xg,QA;function Pq(){if(QA)return Xg;QA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Yg}var Hg,UA;function Dq(){if(UA)return Hg;UA=1;const c=Ze(),s={allowInParentheses:!0};return Hg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Hg}var Kg,WA;function Iq(){if(WA)return Kg;WA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return Kg={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},Kg}var Jg,GA;function Rq(){if(GA)return Jg;GA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return Jg={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,V=>u.has(V.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},Jg}var e0,zA;function Fq(){if(zA)return e0;zA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return e0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},e0}var t0,ZA;function _q(){return ZA||(ZA=1,t0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},s0}var i0,KA;function Mq(){return KA||(KA=1,i0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),i0}var a0,JA;function $q(){return JA||(JA=1,a0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),a0}var o0,eP;function jq(){if(eP)return o0;eP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return o0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},o0}var l0,tP;function qq(){if(tP)return l0;tP=1;const c=Ze();return l0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},l0}var u0,rP;function Qq(){if(rP)return u0;rP=1;const c=Ze();return u0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&V{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},c0}var f0,sP;function Uq(){if(sP)return f0;sP=1;const c=Ze();return f0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},f0}var p0,iP;function Wq(){return iP||(iP=1,p0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),p0}var h0,aP;function Gq(){return aP||(aP=1,h0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let V=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(V.type);)V=V.parent;f(G)&&!S(G)&&!g(G)&&!(y&&V.type==="ArrayPattern")&&!(O&&V.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),h0}var d0,oP;function zq(){if(oP)return d0;oP=1;const c=Ze();return d0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},d0}var m0,lP;function Zq(){if(lP)return m0;lP=1;const c=Jf(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},m0}var g0,uP;function Xq(){if(uP)return g0;uP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return g0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return y0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},y0}var b0,fP;function Hq(){if(fP)return b0;fP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return b0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},b0}var v0,pP;function Kq(){if(pP)return v0;pP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return v0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},v0}var x0,hP;function Jq(){if(hP)return x0;hP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return x0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},x0}var O0,dP;function e6(){if(dP)return O0;dP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return O0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},O0}var S0,mP;function t6(){if(mP)return S0;mP=1;const c=Ze();function s(){return!0}function u(){return!1}return S0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},E0}var C0,yP;function n6(){return yP||(yP=1,C0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),C0}var w0,bP;function s6(){if(bP)return w0;bP=1;const c=Ze();return w0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(V){if(a.destructuredArrayIgnorePattern&&V.name.parent.type==="ArrayPattern")return"array-destructure";switch(V.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(V){let Q,$;switch(V){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${V}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"defined",additional:$}}function y(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"assigned a value",additional:$}}function O(V,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:V.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(V){const Q=V.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(V){return V.type==="Property"&&V.parent.type==="ObjectPattern"&&p.test(V.parent.properties.at(-1).type)}function b(V){if(a.ignoreRestSiblings){const Q=V.defs.some(W=>f(W.name.parent)),$=V.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(V){return V.isRead()}function E(V,Q){let $=V.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(V){const Q=[];return V.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(V,Q){return V.range[0]>=Q.range[0]&&V.range[1]<=Q.range[1]}function T(V){const Q=V.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===V?T(Q):!0:!1}function R(V,Q){const $=V.identifier,W=$.parent,K=V.from.variableScope,te=V.resolved.scope.variableScope,U=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!U?W.right:null}function F(V,Q){let $=V,W=V.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(V,Q){const $=c.getUpperFunction(V);return $&&D($,Q)&&F($,Q)}function N(V,Q){const $=V.identifier,W=$.parent;return V.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(V){let Q=V.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(V){if(V.eslintUsed)return!0;const Q=k(V),$=Q.length>0;let W=null;return V.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(V){const Q=V.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(V)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(V,Q){const $=V.variables,W=V.childScopes;let K,te;if(V.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(U))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"variable")});continue}}!L(U)&&!g(U)&&!b(U)&&Q.push(U)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let U;te.length>0&&(U=te.at(-1)),s.report({node:U?U.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:V,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},w0}var k0,vP;function i6(){if(vP)return k0;vP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return k0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},A0}var P0,OP;function o6(){if(OP)return P0;OP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return P0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const V=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=V.length-1;do Q--,$--;while(T[Q]===V[$]);const W=$+1,K=V.slice(0,W),te=V.slice(W),U=te.find(o),ae=U&&U.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},P0}var T0,SP;function l6(){if(SP)return T0;SP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return T0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},T0}var D0,EP;function u6(){return EP||(EP=1,D0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),D0}var I0,CP;function c6(){if(CP)return I0;CP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},I0}var R0,wP;function f6(){if(wP)return R0;wP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},R0}var F0,kP;function p6(){if(kP)return F0;kP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const V=P[0];if(I==="^"&&V.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!V.negate||V.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},B0}var L0,TP;function m6(){if(TP)return L0;TP=1;const c=Ze(),s=xo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return L0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},L0}var N0,DP;function g6(){if(DP)return N0;DP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return N0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},N0}var M0,IP;function y6(){return IP||(IP=1,M0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),M0}var $0,RP;function b6(){if(RP)return $0;RP=1;const c=Gl(),s=Ze(),u=40;return $0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},$0}var j0,FP;function v6(){if(FP)return j0;FP=1;const c=Ze();return j0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},j0}var q0,_P;function x6(){return _P||(_P=1,q0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),q0}var Q0,BP;function O6(){if(BP)return Q0;BP=1;const c={enum:["beside","below","any"]};return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},Q0}var V0,LP;function S6(){if(LP)return V0;LP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},V0}var U0,NP;function E6(){if(NP)return U0;NP=1;const c=Ze();return U0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},U0}var W0,MP;function C6(){return MP||(MP=1,W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+U;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${U}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function V(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":V,"FunctionDeclaration:exit":V,"FunctionExpression:exit":V,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},G0}var z0,jP;function k6(){if(jP)return z0;jP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return z0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!V||G.required&&V?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(V=>V.range[0]===I.parent.range[0]),G=L[j-1];return V=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(V.replaceText($,",")):W.push(V.insertTextAfter($,",")),W.push(V.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const V=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(V.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(V.loc.start.line>G.loc.end.line||V.type==="Line"||V.type==="Block"){let $=V;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),V=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&V&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},z0}var Z0,qP;function A6(){return qP||(qP=1,Z0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Z0}var X0,QP;function P6(){if(QP)return X0;QP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return X0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},X0}var Y0,VP;function T6(){if(VP)return Y0;VP=1;const c=Ze();return Y0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},Y0}var H0,UP;function D6(){if(UP)return H0;UP=1;const c=Ze();return H0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},H0}var K0,WP;function I6(){if(WP)return K0;WP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),U=j(K,Q);te.verify(D,K,Q,U)}F.prevNode=Q}function V(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:V,"SwitchCase:exit":N}}},K0}var J0,GP;function R6(){if(GP)return J0;GP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return J0={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},J0}var ey,zP;function F6(){if(zP)return ey;zP=1;const c=xo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EV.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const V=L.declarations[0];if(V.init){const Q=V.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(V=>V.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let V=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?V+=Q.id.properties.length:Q.id.type==="ArrayPattern"?V+=Q.id.elements.length:V+=1}),G=G&&T===V}I.forEach(V=>{f.report({node:V,messageId:"useConst",data:V,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ey}var ty,ZP;function _6(){if(ZP)return ty;ZP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ty={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ty}var ry,XP;function B6(){if(XP)return ry;XP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return ry={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},ry}var ny,YP;function L6(){if(YP)return ny;YP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return ny={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},ny}var sy,HP;function N6(){if(HP)return sy;HP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return sy={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},sy}var iy,KP;function M6(){if(KP)return iy;KP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return iy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},iy}var ay,JP;function $6(){if(JP)return ay;JP=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const V=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),V[1]),L.range[1]];yield T.removeRange(V),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ay={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ay}var oy,eT;function j6(){if(eT)return oy;eT=1;const c=Ze();return oy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},oy}var ly,tT;function q6(){return tT||(tT=1,ly={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),ly}var uy,rT;function Q6(){if(rT)return uy;rT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ng();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return uy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function V($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:U}of K.iterateGlobalReferences(te))if(b&&F(U)){const ae=U.arguments[0];if(U.arguments.length===2){const z=[],ue=D(U.arguments[1])||"";V(U,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&V(U,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:U,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(U,Q(U,`/${Be}/${pe}`))}}))})}else{const z=[];V(U,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:U,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(U,Q(U,ue))}}))})}}else if(R(U)){let ae=D(U.arguments[0]),z=!1,ue;if(U.arguments[1]&&(ue=D(U.arguments[1])),V(U,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},py}var hy,aT;function G6(){if(aT)return hy;aT=1;const c=kl(),s=Ze(),u=Vh();return hy={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},hy}var dy,oT;function z6(){if(oT)return dy;oT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},dy}var my,lT;function Z6(){if(lT)return my;lT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return my={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},my}var gy,uT;function X6(){if(uT)return gy;uT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return gy={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},gy}var yy,cT;function Y6(){if(cT)return yy;cT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return yy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},yy}var by,fT;function H6(){if(fT)return by;fT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ng();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return by={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},by}var vy,pT;function K6(){return pT||(pT=1,vy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),vy}var xy,hT;function J6(){return hT||(hT=1,xy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),xy}var Oy,dT;function e8(){if(dT)return Oy;dT=1;const c=xo(),s=Ze();return Oy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,V,Q;L?(G="extraSemi",Q=j.loc,V=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},V=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:V})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),V=j||G;L&&V?g(I,!0):!L&&!V&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Oy}var Sy,mT;function t8(){if(mT)return Sy;mT=1;const c=Ze();return Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Sy}var Ey,gT;function r8(){if(gT)return Ey;gT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},Ey}var Cy,yT;function n8(){return yT||(yT=1,Cy={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),Cy}var wy={exports:{}},bT;function s8(){if(bT)return wy.exports;bT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ay}var Py,OT;function o8(){if(OT)return Py;OT=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Py={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Py}var Ty,ST;function l8(){if(ST)return Ty;ST=1;const c=Ze();return Ty={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Ty}var Dy,ET;function u8(){if(ET)return Dy;ET=1;const c=Ze();return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Dy}var Iy,CT;function c8(){if(CT)return Iy;CT=1;const{isEqToken:c}=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Iy}var Ry,wT;function f8(){if(wT)return Ry;wT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},Ry}var Fy,kT;function p8(){if(kT)return Fy;kT=1;const c=Gl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return Fy={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},Fy}var _y,AT;function h8(){if(AT)return _y;AT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},_y}var By,PT;function d8(){if(PT)return By;PT=1;const c=Ze();return By={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},By}var Ly,TT;function m8(){if(TT)return Ly;TT=1;const c=Ze();return Ly={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},Ly}var Ny,DT;function g8(){if(DT)return Ny;DT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},Ny}var My,IT;function y8(){return IT||(IT=1,My={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),My}var $y,RT;function b8(){return RT||(RT=1,$y={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),$y}var jy,FT;function v8(){if(FT)return jy;FT=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return jy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},jy}var qy,_T;function x8(){if(_T)return qy;_T=1;const c=Ze();return qy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},qy}var Qy,BT;function O8(){return BT||(BT=1,Qy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Uy}var Wy,MT;function C8(){return MT||(MT=1,Wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),Wy}var Gy,$T;function w8(){if($T)return Gy;$T=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Gy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,V=>V.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Gy}var zy,jT;function qT(){if(jT)return zy;jT=1;const{LazyLoadingRuleMap:c}=Y$();return zy=new c(Object.entries({"accessor-pairs":()=>J$(),"array-bracket-newline":()=>e3(),"array-bracket-spacing":()=>t3(),"array-callback-return":()=>r3(),"array-element-newline":()=>n3(),"arrow-body-style":()=>s3(),"arrow-parens":()=>i3(),"arrow-spacing":()=>a3(),"block-scoped-var":()=>o3(),"block-spacing":()=>l3(),"brace-style":()=>u3(),"callback-return":()=>c3(),camelcase:()=>f3(),"capitalized-comments":()=>p3(),"class-methods-use-this":()=>h3(),"comma-dangle":()=>d3(),"comma-spacing":()=>m3(),"comma-style":()=>g3(),complexity:()=>y3(),"computed-property-spacing":()=>b3(),"consistent-return":()=>v3(),"consistent-this":()=>x3(),"constructor-super":()=>O3(),curly:()=>S3(),"default-case":()=>E3(),"default-case-last":()=>C3(),"default-param-last":()=>w3(),"dot-location":()=>k3(),"dot-notation":()=>A3(),"eol-last":()=>P3(),eqeqeq:()=>T3(),"for-direction":()=>D3(),"func-call-spacing":()=>I3(),"func-name-matching":()=>R3(),"func-names":()=>F3(),"func-style":()=>_3(),"function-call-argument-newline":()=>B3(),"function-paren-newline":()=>L3(),"generator-star-spacing":()=>N3(),"getter-return":()=>M3(),"global-require":()=>$3(),"grouped-accessor-pairs":()=>j3(),"guard-for-in":()=>q3(),"handle-callback-err":()=>Q3(),"id-blacklist":()=>V3(),"id-denylist":()=>U3(),"id-length":()=>W3(),"id-match":()=>G3(),"implicit-arrow-linebreak":()=>z3(),indent:()=>Z3(),"indent-legacy":()=>X3(),"init-declarations":()=>Y3(),"jsx-quotes":()=>H3(),"key-spacing":()=>K3(),"keyword-spacing":()=>J3(),"line-comment-position":()=>e5(),"linebreak-style":()=>t5(),"lines-around-comment":()=>r5(),"lines-around-directive":()=>n5(),"lines-between-class-members":()=>s5(),"logical-assignment-operators":()=>i5(),"max-classes-per-file":()=>a5(),"max-depth":()=>o5(),"max-len":()=>l5(),"max-lines":()=>u5(),"max-lines-per-function":()=>c5(),"max-nested-callbacks":()=>f5(),"max-params":()=>p5(),"max-statements":()=>h5(),"max-statements-per-line":()=>d5(),"multiline-comment-style":()=>m5(),"multiline-ternary":()=>g5(),"new-cap":()=>y5(),"new-parens":()=>b5(),"newline-after-var":()=>v5(),"newline-before-return":()=>x5(),"newline-per-chained-call":()=>O5(),"no-alert":()=>S5(),"no-array-constructor":()=>E5(),"no-async-promise-executor":()=>C5(),"no-await-in-loop":()=>w5(),"no-bitwise":()=>k5(),"no-buffer-constructor":()=>A5(),"no-caller":()=>P5(),"no-case-declarations":()=>T5(),"no-catch-shadow":()=>D5(),"no-class-assign":()=>I5(),"no-compare-neg-zero":()=>R5(),"no-cond-assign":()=>F5(),"no-confusing-arrow":()=>_5(),"no-console":()=>B5(),"no-const-assign":()=>L5(),"no-constant-binary-expression":()=>N5(),"no-constant-condition":()=>M5(),"no-constructor-return":()=>$5(),"no-continue":()=>j5(),"no-control-regex":()=>q5(),"no-debugger":()=>Q5(),"no-delete-var":()=>V5(),"no-div-regex":()=>U5(),"no-dupe-args":()=>W5(),"no-dupe-class-members":()=>G5(),"no-dupe-else-if":()=>z5(),"no-dupe-keys":()=>Z5(),"no-duplicate-case":()=>X5(),"no-duplicate-imports":()=>Y5(),"no-else-return":()=>H5(),"no-empty":()=>K5(),"no-empty-character-class":()=>J5(),"no-empty-function":()=>ej(),"no-empty-pattern":()=>tj(),"no-empty-static-block":()=>rj(),"no-eq-null":()=>nj(),"no-eval":()=>sj(),"no-ex-assign":()=>ij(),"no-extend-native":()=>aj(),"no-extra-bind":()=>oj(),"no-extra-boolean-cast":()=>lj(),"no-extra-label":()=>uj(),"no-extra-parens":()=>cj(),"no-extra-semi":()=>fj(),"no-fallthrough":()=>pj(),"no-floating-decimal":()=>hj(),"no-func-assign":()=>dj(),"no-global-assign":()=>mj(),"no-implicit-coercion":()=>gj(),"no-implicit-globals":()=>yj(),"no-implied-eval":()=>bj(),"no-import-assign":()=>vj(),"no-inline-comments":()=>xj(),"no-inner-declarations":()=>Oj(),"no-invalid-regexp":()=>Sj(),"no-invalid-this":()=>Ej(),"no-irregular-whitespace":()=>Cj(),"no-iterator":()=>wj(),"no-label-var":()=>kj(),"no-labels":()=>Aj(),"no-lone-blocks":()=>Pj(),"no-lonely-if":()=>Tj(),"no-loop-func":()=>Dj(),"no-loss-of-precision":()=>Ij(),"no-magic-numbers":()=>Rj(),"no-misleading-character-class":()=>$j(),"no-mixed-operators":()=>jj(),"no-mixed-requires":()=>qj(),"no-mixed-spaces-and-tabs":()=>Qj(),"no-multi-assign":()=>Vj(),"no-multi-spaces":()=>Uj(),"no-multi-str":()=>Wj(),"no-multiple-empty-lines":()=>Gj(),"no-native-reassign":()=>zj(),"no-negated-condition":()=>Zj(),"no-negated-in-lhs":()=>Xj(),"no-nested-ternary":()=>Yj(),"no-new":()=>Hj(),"no-new-func":()=>Kj(),"no-new-native-nonconstructor":()=>Jj(),"no-new-object":()=>eq(),"no-new-require":()=>tq(),"no-new-symbol":()=>rq(),"no-new-wrappers":()=>nq(),"no-nonoctal-decimal-escape":()=>sq(),"no-obj-calls":()=>iq(),"no-object-constructor":()=>aq(),"no-octal":()=>oq(),"no-octal-escape":()=>lq(),"no-param-reassign":()=>uq(),"no-path-concat":()=>cq(),"no-plusplus":()=>fq(),"no-process-env":()=>pq(),"no-process-exit":()=>hq(),"no-promise-executor-return":()=>dq(),"no-proto":()=>mq(),"no-prototype-builtins":()=>gq(),"no-redeclare":()=>yq(),"no-regex-spaces":()=>bq(),"no-restricted-exports":()=>vq(),"no-restricted-globals":()=>xq(),"no-restricted-imports":()=>Oq(),"no-restricted-modules":()=>Sq(),"no-restricted-properties":()=>Eq(),"no-restricted-syntax":()=>Cq(),"no-return-assign":()=>wq(),"no-return-await":()=>kq(),"no-script-url":()=>Aq(),"no-self-assign":()=>Pq(),"no-self-compare":()=>Tq(),"no-sequences":()=>Dq(),"no-setter-return":()=>Iq(),"no-shadow":()=>Rq(),"no-shadow-restricted-names":()=>Fq(),"no-spaced-func":()=>_q(),"no-sparse-arrays":()=>Bq(),"no-sync":()=>Lq(),"no-tabs":()=>Nq(),"no-template-curly-in-string":()=>Mq(),"no-ternary":()=>$q(),"no-this-before-super":()=>jq(),"no-throw-literal":()=>qq(),"no-trailing-spaces":()=>Qq(),"no-undef":()=>Vq(),"no-undef-init":()=>Uq(),"no-undefined":()=>Wq(),"no-underscore-dangle":()=>Gq(),"no-unexpected-multiline":()=>zq(),"no-unmodified-loop-condition":()=>Zq(),"no-unneeded-ternary":()=>Xq(),"no-unreachable":()=>Yq(),"no-unreachable-loop":()=>Hq(),"no-unsafe-finally":()=>Kq(),"no-unsafe-negation":()=>Jq(),"no-unsafe-optional-chaining":()=>e6(),"no-unused-expressions":()=>t6(),"no-unused-labels":()=>r6(),"no-unused-private-class-members":()=>n6(),"no-unused-vars":()=>s6(),"no-use-before-define":()=>i6(),"no-useless-assignment":()=>a6(),"no-useless-backreference":()=>o6(),"no-useless-call":()=>l6(),"no-useless-catch":()=>u6(),"no-useless-computed-key":()=>c6(),"no-useless-concat":()=>f6(),"no-useless-constructor":()=>p6(),"no-useless-escape":()=>h6(),"no-useless-rename":()=>d6(),"no-useless-return":()=>m6(),"no-var":()=>g6(),"no-void":()=>y6(),"no-warning-comments":()=>b6(),"no-whitespace-before-property":()=>v6(),"no-with":()=>x6(),"nonblock-statement-body-position":()=>O6(),"object-curly-newline":()=>S6(),"object-curly-spacing":()=>E6(),"object-property-newline":()=>C6(),"object-shorthand":()=>w6(),"one-var":()=>k6(),"one-var-declaration-per-line":()=>A6(),"operator-assignment":()=>P6(),"operator-linebreak":()=>T6(),"padded-blocks":()=>D6(),"padding-line-between-statements":()=>I6(),"prefer-arrow-callback":()=>R6(),"prefer-const":()=>F6(),"prefer-destructuring":()=>_6(),"prefer-exponentiation-operator":()=>B6(),"prefer-named-capture-group":()=>L6(),"prefer-numeric-literals":()=>N6(),"prefer-object-has-own":()=>M6(),"prefer-object-spread":()=>$6(),"prefer-promise-reject-errors":()=>j6(),"prefer-reflect":()=>q6(),"prefer-regex-literals":()=>Q6(),"prefer-rest-params":()=>V6(),"prefer-spread":()=>U6(),"prefer-template":()=>W6(),"quote-props":()=>G6(),quotes:()=>z6(),radix:()=>Z6(),"require-atomic-updates":()=>X6(),"require-await":()=>Y6(),"require-unicode-regexp":()=>H6(),"require-yield":()=>K6(),"rest-spread-spacing":()=>J6(),semi:()=>e8(),"semi-spacing":()=>t8(),"semi-style":()=>r8(),"sort-imports":()=>n8(),"sort-keys":()=>i8(),"sort-vars":()=>a8(),"space-before-blocks":()=>o8(),"space-before-function-paren":()=>l8(),"space-in-parens":()=>u8(),"space-infix-ops":()=>c8(),"space-unary-ops":()=>f8(),"spaced-comment":()=>p8(),strict:()=>h8(),"switch-colon-spacing":()=>d8(),"symbol-description":()=>m8(),"template-curly-spacing":()=>g8(),"template-tag-spacing":()=>y8(),"unicode-bom":()=>b8(),"use-isnan":()=>v8(),"valid-typeof":()=>x8(),"vars-on-top":()=>O8(),"wrap-iife":()=>S8(),"wrap-regex":()=>E8(),"yield-star-spacing":()=>C8(),yoda:()=>w8()})),zy}var Zy,QT;function k8(){if(QT)return Zy;QT=1;const c=qT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,X$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Zy=s,Zy}var Xy,VT;function A8(){if(VT)return Xy;VT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Xy=a,Xy}var Yy,UT;function WT(){if(UT)return Yy;UT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Yy={startTime:c,endTime:s},Yy}var Hy,GT;function P8(){if(GT)return Hy;GT=1;const{startTime:c,endTime:s}=WT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Hy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Hy}var T8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},zT={rules:T8},Ky,ZT;function XT(){if(ZT)return Ky;ZT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return Ky={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},Ky}var Jy={},eb={},tb,YT;function D8(){if(YT)return tb;YT=1,tb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return rb}var nb,KT;function R8(){if(KT)return nb;KT=1;var c=D8(),s=I8();nb=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],V;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,U=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}V.push(ue)}}else V=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var V="",Q=!!G.nocase,$=!1,W=[],K=[],te,U=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":V+=d,Q=!0;break;case"?":V+=a,Q=!0;break;default:V+="\\"+te;break}ne.debug("clearStateChar %j %j",te,V),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=V.slice(0,pt.reStart),qt=V.slice(pt.reStart,pt.reEnd-8),Vt=V.slice(pt.reEnd-8,pt.reEnd),tr=V.slice(pt.reEnd);Vt+=tr;var fe=kt.split("(").length-1,Ue=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var V=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=U===te,this.debug("string match",te,U,ne)):(ne=U.match(te),this.debug("pattern match",te,U,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return sb}var Oo={},eD;function _8(){var o,y;if(eD)return Oo;eD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){Rn(this,o,new Map);Rn(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),kr(this,o).set(f,g[f]),g[f].required&&kr(this,y).set(f,g[f])}}hasKey(g){return kr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of kr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=kr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of kr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,Oo.MergeStrategy=c,Oo.ObjectSchema=m,Oo.ValidationStrategy=s,Oo}var tD;function rD(){return tD||(tD=1,function(c){var s=io,u=F8(),p=$i(),a=_8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function V(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function U(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,U(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await V(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(eb)),eb}var ib,nD;function sD(){if(nD)return ib;nD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ib={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ib}var ab,iD;function ob(){if(iD)return ab;iD=1;const{normalizeSeverityToNumber:c}=sD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(V){return typeof V=="object"&&V!==null}function p(V){return u(V)&&!Array.isArray(V)}function a(V){return typeof V>"u"}function d(V,Q,$=new Map){let W=$.get(V);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(V,W);const K={...V,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(V,te))continue;const U=V[te],ae=Q[te];p(U)&&p(ae)?K[te]=d(U,ae,$):a(ae)&&(K[te]=U)}return K}function v(V){const Q=Array.isArray(V)?V.slice(0):[V];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(V){for(const Q of Object.keys(V))if(typeof V[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(V,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(V,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(V,Q){if(typeof s.get(Q)>"u")throw new O(V,Q)}function g(V){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(V))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${V}".`)}function f(V){if(!u(V))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(V,Q){const $=Q===void 0?V:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(V){if(!(k.has(V)||typeof V=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(V={},Q={}){return d(V,Q)},validate:"object"},R={merge(V={},Q={}){const $=d(V,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??V[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(V={},Q={}){const $=new Set([...Object.keys(V),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in V&&K in Q&&V[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||V[K]}return W},validate(V){if(V===null||typeof V!="object")throw new TypeError("Expected an object.");if(Array.isArray(V))throw new S(V);for(const Q of Object.keys(V))if(Q!=="__proto__"&&(V[Q]===null||typeof V[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(V){if(typeof V=="string")g(V);else if(V&&typeof V=="object"){if(typeof V.preprocess!="function"||typeof V.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(V={},Q={}){const $={...V,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in V)||!(W in Q))continue;const K=v(V[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(V){f(V);for(const Q of Object.keys(V)){if(Q==="__proto__")continue;const $=V[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(V){return{merge:"replace",validate(){throw new b(V)}}}return ab={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(V=>[V,L(V)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},ab}var lb={},ub,aD;function B8(){if(aD)return ub;aD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return ub={validateLanguageOptions:o},ub}var cb,oD;function lD(){if(oD)return cb;oD=1;const{SourceCode:c}=_E(),s=$i(),u=Wl(),p=Mc(),a=Cl(),{validateLanguageOptions:d}=B8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return cb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},cb}var uD;function L8(){if(uD)return lb;uD=1;const c=qT();return lb.defaultConfig=[{plugins:{"@":{languages:{js:lD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:kl(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],lb}var fb={},N8="http://json-schema.org/draft-04/schema#",M8="http://json-schema.org/draft-04/schema#",$8="Core schema meta-schema",j8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},q8="object",Q8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},V8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},U8={id:N8,$schema:M8,description:$8,definitions:j8,type:q8,properties:Q8,dependencies:V8,default:{}},pb,cD;function W8(){if(cD)return pb;cD=1;const c=c1(),s=U8;return pb=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},pb}var fD;function pD(){if(fD)return fb;fD=1;const s=W8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=XT(),d=zT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return fb.RuleValidator=o,fb}var hb,hD;function G8(){var x,g;if(hD)return hb;hD=1;const{RuleValidator:c}=pD(),{flatConfigSchema:s,hasMethod:u}=ob(),{ObjectSchema:p}=rD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){Rn(this,x,void 0);Rn(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!kr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!kr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:kr(this,x),languageOptions:o(this.languageOptions),processor:kr(this,g)}}}return x=new WeakMap,g=new WeakMap,hb={Config:O},hb}var dD;function z8(){if(dD)return Jy;dD=1;const{ConfigArray:c,ConfigArraySymbol:s}=rD(),{flatConfigSchema:u}=ob(),{defaultConfig:p}=L8(),{Config:a}=G8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return Jy.FlatConfigArray=O,Jy}var db,mD;function Z8(){return mD||(mD=1,db={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),db}var mb,gD;function yD(){if(gD)return mb;gD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return mb={VFile:u},mb}var gb,bD;function X8(){if(bD)return gb;bD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return gb={ParserService:c},gb}var yb={},vD;function Y8(){if(vD)return yb;vD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return yb.FileContext=c,yb}var bb,xD;function H8(){if(xD)return bb;xD=1;const c=io,{VFile:s}=yD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return bb={ProcessorService:u},bb}var vb,OD;function K8(){var Ve,Ox,Oe,Sx;if(OD)return vb;OD=1;const c=io,s=Mc(),u=Cl(),p=kl(),a=yL(),d=qL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=h1(),y=Jf(),{SourceCode:O}=_E(),x=Q$(),{ConfigCommentParser:g}=IE(),f=W$(),b=Z$(),S=k8(),E=mE(),k=A8(),D=P8(),T=zT,{getRuleFromConfig:R}=XT(),{FlatConfigArray:F}=z8(),{startTime:P,endTime:N}=WT(),{RuleValidator:I}=pD(),{assertIsRuleSeverity:L}=ob(),{normalizeSeverityToString:j}=sD(),G=lD(),{activeFlags:V,inactiveFlags:Q}=Z8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,U=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=sC(),{VFile:ne}=yD(),{ParserService:ce}=X8(),{FileContext:pe}=Y8(),{ProcessorService:Be}=H8(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(U.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=U.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,U.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(U.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=U.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Vt(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},U.parseListConfig(U.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ue(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ue(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Vt(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Ut(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Ut(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const Cr=ar(...Lr),Nr=ht?Cr.result:Cr;return ht&&Kt(Cr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(Cr){throw Cr.ruleId=qe,Cr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function pr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){Rn(this,Ve);Rn(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!V.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ve,Ox).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Sx).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ve,Ox).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Sx=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Vt(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},vb={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},vb}function J8(){return K8().Linter}var e9=l.Linter=J8();t.Linter=e9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(hH,pc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=yl.define(t);return[r,O_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const mH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class QI extends qs{beforeRender(e){this.state={content:vr(fr)(e.content,"")}}template(e){return zt("section",{class:["editor",e.class]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[vX,dl.of([Iz]),dY(),bX(),cX(bY(new pc.Linter,{languageOptions:{globals:{...pH.browser},parserOptions:{ecmaVersion:2022,sourceType:"module"}}})),mH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class gH extends qs{constructor(){super(...arguments);Rn(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(fr)(t.width),height:vr(fr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(kr(this,Na)),this.state.height.subscribe(kr(this,Na)),kr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class yH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:fr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(gH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Ou="workshop-data-light@0.0.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Ou+e),l=fr(i?r(i):n);return i===null&&localStorage.setItem(Ou+e,t(l.current)),l.persist=h=>localStorage.setItem(Ou+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Ou+e),l}class bH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(GI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Su,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??Z9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??K9,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const vH=async(n,e={})=>{if(await new Promise(r=>{Ex(zt(bH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var na,cl;class xH extends qs{constructor(){super(...arguments);or(this,"state",{running:fr(!1),frameCount:fr(0),dataMode:fr(!1)});or(this,"store",{code:Zi(RD.toString(),"code"),data:Zi("{}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:fr(+"300")});or(this,"tick",Ds);or(this,"context",new mV);or(this,"__module",Ds);Rn(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await x9(()=>import("data:text/javascript,"+t),[]),this.tick=E9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){kr(this,cl).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){kr(this,cl).call(this,r)}});Rn(this,cl,t=>{this.stop(),console.clear(),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"is-data-mode":this.state.dataMode}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:r4}),zt("span",null,document.title)),zt("a",{innerHTML:J9,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(QI,{class:"editor__code",ref:this.ref("editor"),content:this.store.code}),zt(QI,{class:"editor__data",ref:this.ref("data"),content:this.store.data}),zt(yH,{ref:this.ref("scene"),running:this.state.running}),zt("footer",{class:"app__footer"},zt(Su,null,zt(Hs,{icon:Ab(this.state.dataMode,t=>t?t4:e4),label:Ab(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Hs,{icon:X9,title:"Commencer un nouveau programme","event-click":t=>vH(()=>{this.refs.data.clear("{}"),this.refs.editor.clear(RD.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),zt(Su,null,zt(Su,{compact:!0},zt(Hs,{icon:Ab(this.state.running,t=>t?H9:Y9),"event-click":t=>{this.state.running.get()?this.stop():this.start()}}),zt(ko,{class:"readonly",type:"number",value:this.state.frameCount}),zt(ko,{type:"number",label:"/",titles:"frames",value:this.store.frames}),zt("hr",null),zt(ko,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),zt(Hs,{icon:ID,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["data","ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(kr(this,na)),this.store.frameRate.subscribe(kr(this,na)),this.store.code.subscribe(kr(this,na)),kr(this,na).call(this,this.store.code.get())}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.context.reset(),PD.add(this.tick),this.state.running.set(!0)}stop(){PD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(GI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(ko,{type:"text",label:"titre",value:this.store.title}),zt(ko,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:ID,label:"exporter","event-click":async()=>{await xV({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${dv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}na=new WeakMap,cl=new WeakMap;Ex(zt(xH,null)); diff --git a/assets/index-ceeddee0.css b/assets/index-ceeddee0.css new file mode 100644 index 0000000..f801a78 --- /dev/null +++ b/assets/index-ceeddee0.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--body-font-family, inherit);font-size:var(--body-font-size, inherit);font-weight:var(--body-font-weight, inherit);font-style:var(--body-font-style, normal);font-synthesis:var(--body-font-synthesis, none);font-feature-settings:var(--body-font-feature-settings, initial);font-variant:var(--body-font-variant, none);font-kerning:var(--body-font-kerning, auto);line-height:var(--body-line-height, inherit);text-transform:var(--body-text-transform, none);text-underline-offset:var(--body-text-underline-offset, inherit);text-decoration-thickness:var(--body-text-decoration-thickness, from-font);word-spacing:var(--body-word-spacing, normal);letter-spacing:var(--body-letter-spacing, normal);font-variation-settings:var(--body-font-variation-settings, initial);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}a{color:inherit}::selection{color:var(--color-background);background:var(--color-dash)}:root{--gutter: 2rem;--gap: 1rem;--color-text: #222;--color-background: #e0e0e0;--color-dash: #454759;--ui-font-size: 1.4rem;--ui-line-height: 1.2;--ui-color-text: var(--color-background);--ui-color-text-dim: var(--color-text);--ui-color-background: #2d2f3f;--ui-color-background-dim: var(--color-background);--ui-color-accent: #bc93f9;--ui-color-accent-contrast: var(--color-text);--body-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--body-font-size: 1.67rem;--body-line-height: 1.3;--small-font-size: 1.4rem}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}[class^=ui-modal__content-]{color:var(--color-text)}[class^=ui-toolbar-] hr{border-left-color:var(--color-dash)}.readonly{pointer-events:none}.app{display:grid;grid-template:"header header" "editor scene" "footer footer";grid-template-columns:1fr 20rem;grid-template-rows:var(--ui-height) 1fr var(--ui-height);gap:var(--gap);height:100%;padding:var(--gutter)}.app__header{grid-area:header;width:100%}.app__header,.app__header fieldset{display:flex;align-items:center;gap:var(--ui-gap)}.app__header .app__logo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1.5em;height:1.5em;fill:var(--ui-color-background);animation:rotate 3s infinite linear}.app:not(.is-running) .app__header .app__logo{animation-play-state:paused}.app__header .app__title{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;flex:1;display:flex;align-items:center;gap:var(--gap);font-size:inherit}.app .editor{grid-area:editor}.app .editor__data,.app.is-data-mode .editor__code{display:none}.app.is-data-mode .editor__data{display:flex}.app .scene{grid-area:scene}.app__footer{grid-area:footer;display:flex;justify-content:space-between}.app__export fieldset{--ui-color-background: var(--color-background);--ui-color-text: var(--color-text);--ui-border: 1px solid var(--color-dash);display:flex;flex-direction:column;gap:var(--ui-gap);min-width:35rem}.app__export fieldset>*{width:100%}.app__export fieldset>*:hover,.app__export fieldset>*:focus{border-color:var(--ui-color-accent)}.app__export fieldset label{color:var(--color-dash)}.app__export input[type=text]{text-align:right}.app__export textarea{padding:var(--ui-padding-container);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--color-text);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius)}.app__export textarea:hover,.app__export textarea:focus{background:var(--ui-color-accent);outline:0}.app__export footer{padding:0;margin-top:var(--gutter)}.app__export footer>*{width:100%;justify-content:center}.editor{display:flex;overflow:hidden}.editor__view{flex:1;overflow:hidden;border-radius:var(--ui-border-radius)}.editor__view .cm-selectionBackground{background:var(--color-dash)!important}.editor__view .cm-activeLine{background-color:inherit}.editor__view .cm-scroller{margin-block:.5em}.editor__view .cm-editor{height:100%;max-height:100%}.editor__view .cm-lint-marker-error{content:url('data:image/svg+xml,%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2215%22%20fill%3D%22%23dd1110%22%20%2F%3E')}.editor__view .cm-diagnostic{padding:.5em;background:var(--ui-color-background)!important;outline:1px solid var(--color-dash)}.editor__view .cm-gutters{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#2d2f3f;border-right:1px solid var(--color-dash)}.editor__view .cm-lineNumbers .cm-gutterElement{font-family:var(--small-font-family, inherit);font-size:var(--small-font-size, inherit);font-weight:var(--small-font-weight, inherit);font-style:var(--small-font-style, normal);font-synthesis:var(--small-font-synthesis, none);font-feature-settings:var(--small-font-feature-settings, initial);font-variant:var(--small-font-variant, none);font-kerning:var(--small-font-kerning, auto);line-height:var(--small-line-height, inherit);text-transform:var(--small-text-transform, none);text-underline-offset:var(--small-text-underline-offset, inherit);text-decoration-thickness:var(--small-text-decoration-thickness, from-font);word-spacing:var(--small-word-spacing, normal);letter-spacing:var(--small-letter-spacing, normal);font-variation-settings:var(--small-font-variation-settings, initial);display:flex;padding-left:1em;justify-content:flex-end;align-items:center}.editor__view .cm-foldGutter .cm-gutterElement{font-size:smaller;padding-inline:.5em}.editor__view .cm-line{padding-inline:.5em 1em;padding-block:.05em}.scene{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:grid;place-items:center;padding:var(--gutter);cursor:zoom-in;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.scene canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:1px;height:auto}.scene.is-zoomed{cursor:zoom-out;background:black}.scene.is-zoomed canvas{position:absolute;inset:var(--gap);width:calc(100% - var(--gap) * 2);height:calc(100% - var(--gap) * 2);border-radius:3px}.canvas{image-rendering:pixelated;-webkit-optimize-contrast:crisp-edges}*{text-decoration-thickness:inherit}.confirm-modal{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;--ui-modal-width: 41rem}.confirm-modal__content:not(:empty){margin-bottom:var(--gutter)}.confirm-modal__toolbar{width:100%}.confirm-modal__toolbar>*{flex:1;justify-content:center} diff --git a/assets/index-cf38ae49.js b/assets/index-cf38ae49.js new file mode 100644 index 0000000..ded0da4 --- /dev/null +++ b/assets/index-cf38ae49.js @@ -0,0 +1,230 @@ +var n9=Object.defineProperty;var s9=(n,e,t)=>e in n?n9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(s9(n,typeof e!="symbol"?e+"":e,t),t),Cb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Cb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Gi=(n,e,t,r)=>(Cb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Cb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function i9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let kb;const Xi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),Ab=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}kb=t??"",e||(r[n]=kb),(e||a9.has(n)||Xi(n,"data-"))&&r.setAttribute(n,kb)}};function o9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};wb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{Ab(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Ab(e,i)(t,n)}}function l9(n){return Array.isArray(n)?n:[n]}function hl(n,e){if(Array.isArray(n))return u9(n,e);if(n instanceof window.Element)return p9(n);if(n===null||typeof n!="object"||!n.vnode)return c9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return f9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return h9(n,t,e);if(n.isComponent)return AD(n,t,e)}function u9(n,e){n=l9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=O9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":x9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},E9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(di)})(E9);function C9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var mc=typeof window>"u"?global:window,Ki=[],ja=[],qa=[],xi=null,Ji=null,Vo=!1,wx=!1,kx,fi;function Lu(n){n===void 0&&(n=0),Ji===null&&(Ji=n),fi=n-Ji,kx+=fi,Ji=n,xi=Vo?null:mc.requestAnimationFrame(Lu),Vo&&(Vo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function w9(n,e){Ax(qa,n,e)&&gc()}function k9(n,e){Ax(ja,n,e)&&gc()}function A9(n,e){Ax(Ki,n,e)&&WI()}function P9(n){Px(qa,n)&&gc()}function T9(n,e){Px(ja,n)&&gc()}function D9(n){Px(Ki,n)&&Tx()}function WI(n){Vo=!1,!xi&&(n=!!n,Ji=null,n?Lu():xi=mc.requestAnimationFrame(Lu))}function I9(){xi||(Vo=!0,Ji=null,xi=mc.requestAnimationFrame(Lu))}function Tx(){xi&&(mc.cancelAnimationFrame(xi),xi=null)}function R9(){Tx(),Ki.length=0,ja.length=0,qa.length=0,wx=!1,Ji=null,kx=0,fi=0}const DD={add:A9,addAfter:k9,addBefore:w9,remove:D9,removeAfter:T9,removeBefore:P9,start:WI,stop:Tx,time:kx,dt:fi,requestOnce:I9,dispose:R9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Pb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Pb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Pb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Pb(this,e),e=e.next}},F9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends F9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Cu(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},_9=n=>Cu(n,e=>!e),B9="ui-backdrop-1l3kn107",L9={backdrop:B9,"loader-spin":"ui-loader-spin-1l3kn1"};class N9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[L9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const M9="ui-button-1urez107",$9="ui-button__label-1urez161",j9="ui-button__icon-1urez171",Tb={button:M9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:$9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:j9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Hs extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const q9="ui-input-ada4i107",Q9="ui-input__icon-ada4i150",ko={input:q9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:Q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const V9="ui-modal-1ng3s107",U9="ui-modal__header-1ng3s119",W9="ui-modal__title-1ng3s125",G9="ui-modal__content-1ng3s129",Po={modal:V9,modal__header:U9,modal__title:W9,modal__content:G9,"loader-spin":"ui-loader-spin-1ng3s1"},z9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(N9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Hs,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Hs,{class:Po.modal__close,icon:z9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const Z9="ui-toolbar-1r0eh107",X9={toolbar:Z9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Lo extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[X9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const Y9=` + + +`,H9=` + + + +`,K9=` + + + +`,J9=` + + + +`,e4=` + + +`,t4=` + + + + + + +`,FD=` + + + + +`,r4=` + + + + +`,n4=` + + + + +`,_D=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,s4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nd4(m4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},JI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])JI[`[object ${n}]`]=n.toLowerCase();function dr(n){return JI[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:yc,min:eR,max:tR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=yc*2,Db=yc/3,g4=yc/180,y4=180/yc;function rR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const b4="3.1.2",hr=(...n)=>new Ct(...n);hr.version=b4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,x4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,nR=n=>{if(n.match(v4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(x4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Hl}=Math,sR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Hl(e),t=Hl(t),r=Hl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Hl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=sR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return nR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},O4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ks(n){const e=O4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Xo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=S4(e,t,r),[C,A,_]=iR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},S4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},iR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=aR(e,t,r),[A,_,B]=E4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function E4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const aR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const C4=(...n)=>new Ct(...n,"lab");Object.assign(hr,{lab:C4,getLabWhitePoint:Xo,setLabWhitePoint:Ks});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:w4}=Math,k4=1e-7,A4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=A4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return P4(...this._rgb.slice(0,3))};const P4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:w4((n+.055)/1.055,2.4)),bn={},Va=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Va(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:T4,cos:D4}=Math,oR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*g4,[e,D4(r)*t,T4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=oR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},I4=(...n)=>{const e=rR(ur(n,"hcl"));return Fx(...e)},{sqrt:R4,atan2:F4,round:_4}=Math,lR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=R4(t*t+r*r);let l=(F4(r,t)*y4+360)%360;return _4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return rR(_x(this._rgb))};const B4=(...n)=>new Ct(...n,"lch"),L4=(...n)=>new Ct(...n,"hcl");Object.assign(hr,{lch:B4,hcl:L4});lr.format.lch=Fx;lr.format.hcl=I4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Va(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Va(this,"black",n,...e)};const N4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=N4;const{sqrt:_b,pow:Oa}=Math,M4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=M4;const $4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=$4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},uR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=uR;bn.hcl=uR;const j4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},q4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return q4(this._rgb)};const Q4=(...n)=>new Ct(...n,"num");Object.assign(hr,{num:Q4});lr.format.num=j4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const V4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=V4;const{floor:U4}=Math,W4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=U4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},G4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=eR(e,t,r),l=tR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return G4(this._rgb)};const z4=(...n)=>new Ct(...n,"hcg");hr.hcg=z4;lr.format.hcg=W4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const Z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=Z4;const{cos:Sa}=Math,X4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Y4,sqrt:H4,acos:K4}=Math,J4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Y4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=H4((e-t)*(e-t)+(e-r)*(t-r)),i=K4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return J4(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsi");hr.hsi=eQ;lr.format.hsi=X4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const tQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=tQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},cR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=eR(e,t,r),l=tR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return cR(this._rgb)};const rQ=(...n)=>new Ct(...n,"hsl");hr.hsl=rQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const nQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=nQ;const{floor:sQ}=Math,iQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=sQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:aQ,max:oQ}=Math,lQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=aQ(e,t,r),l=oQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return lQ(this._rgb)};const uQ=(...n)=>new Ct(...n,"hsv");hr.hsv=uQ;lr.format.hsv=iQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const cQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=cQ;function Nu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=fQ([e,t,r]),[A,_,B]=iR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Nu(t,n);return Nu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=aR(e,t,r);return[...pQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function pQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Nu(e,n);return Nu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const hQ=(...n)=>new Ct(...n,"oklab");Object.assign(hr,{oklab:hQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const dQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=dQ;const mQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=mQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:gQ}=Math,yQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return bQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},bQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:vQ}=Math;function Mu(n){let e="rgb",t=hr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&hr.brewer&&hr.brewer[Ye.toLowerCase()]&&(Ye=hr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=vQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=hr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=hr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=hr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Ur=20;for(;Math.abs(er)>.01&&Ur-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=xQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return hr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=hr(Ye),ot):t},ot}function xQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const OQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=OQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},EQ=n=>{const e=SQ(n);return e.scale=()=>Mu(e),e},{round:fR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(fR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:fR(e):e)};const CQ=(...n)=>new Ct(...n,"rgb");Object.assign(hr,{rgb:CQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Di=n=>(e,t)=>{const r=hr(t).rgb(),i=hr(e).rgb();return hr.rgb(n(r,i))},Ii=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},wQ=n=>n,kQ=(n,e)=>n*e/255,AQ=(n,e)=>n>e?e:n,PQ=(n,e)=>n>e?n:e,TQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),DQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),IQ=(n,e)=>255*(1-(1-e/255)/(n/255)),RQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Di(Ii(wQ));ms.multiply=Di(Ii(kQ));ms.screen=Di(Ii(TQ));ms.overlay=Di(Ii(DQ));ms.darken=Di(Ii(AQ));ms.lighten=Di(Ii(PQ));ms.dodge=Di(Ii(RQ));ms.burn=Di(Ii(IQ));const{pow:FQ,sin:_Q,cos:BQ}=Math;function LQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=FQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=BQ(_),me=_Q(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return hr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>hr.scale(C),C.hue(t),C}const NQ="0123456789abcdef",{floor:MQ,random:$Q}=Math,jQ=()=>{let n="#";for(let e=0;e<6;e++)n+=NQ.charAt(MQ($Q()*16));return new Ct(n,"hex")},{log:ND,pow:qQ,floor:QQ,abs:VQ}=Math;function pR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>hR(t,r,i),t}function hR(n,e="equal",t=7){dr(n)=="array"&&(n=pR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const UQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,WQ=5e-4,GQ=.1,$D=1.14,Kl=.022,jD=1.414,zQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Va(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Kl?t:t+Math.pow(Kl-t,jD),l=r>=Kl?r:r+Math.pow(Kl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:ZQ,max:XQ,atan2:QD,abs:VD,cos:Jl,sin:UD,exp:YQ,PI:WD}=Math;function HQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=VD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Jl(h(Nt-30))+.24*Jl(h(2*Nt))+.32*Jl(h(3*Nt+6))-.2*Jl(h(4*Nt-63));let Yt=_t-It;Yt=VD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*UD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Ur=1+.045*ot,On=1+.015*ot*At,qr=30*YQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*UD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Ur),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Ur))*(Yt/(i*On)));return XQ(0,ZQ(100,hn))}function KQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const JQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},eV={cool(){return Mu([hr.hsl(180,1,.9),hr.hsl(250,.7,.4)])},hot(){return Mu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},dR=Object.keys(vv),GD=new Map(dR.map(n=>[n.toLowerCase(),n])),tV=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(dR)}}):vv,rV=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,nV=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return nV(this._rgb)};const sV=(...n)=>new Ct(...n,"cmyk");Object.assign(hr,{cmyk:sV});lr.format.cmyk=rV;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const iV=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},aV=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},oV=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},lV=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},mR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=lR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},uV=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,cV=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return iV(cR(e),t);if(t.substr(0,3)==="lab"){const r=Xo();Ks("d50");const i=aV(Rx(e),t);return Ks(r),i}if(t.substr(0,3)==="lch"){const r=Xo();Ks("d50");const i=oV(_x(e),t);return Ks(r),i}return t.substr(0,5)==="oklab"?lV(Lx(e)):t.substr(0,5)==="oklch"?uV(mR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},gR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=oR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},Js=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$u=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,bc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,yR=new RegExp("^rgba?\\("+rs+[Js,Js,Js].join(eo)+to+"\\)$"),bR=new RegExp("^rgb\\("+rs+[Js,Js,Js].join(Nx)+rs+"\\)$"),vR=new RegExp("^rgba\\("+rs+[Js,Js,Js,ds].join(Nx)+rs+"\\)$"),xR=new RegExp("^hsla?\\("+rs+[bc,$u,$u].join(eo)+to+"\\)$"),OR=new RegExp("^hsl?\\("+rs+[bc,$u,$u].join(Nx)+rs+"\\)$"),SR=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ER=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),CR=new RegExp("^lch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),wR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),kR=new RegExp("^oklch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),{round:AR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(AR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(yR))||(e=n.match(bR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(vR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(xR))||(e=n.match(OR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(SR)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=AR(r[i]);return r[3]=+e[4],r}if(e=n.match(ER)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Xo();Ks("d50");const i=Ea(Ix(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Xo();Ks("d50");const i=Ea(Fx(t));Ks(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(gR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>yR.test(n)||xR.test(n)||ER.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||bR.test(n)||vR.test(n)||OR.test(n)||SR.test(n)||n==="transparent";Ct.prototype.css=function(n){return cV(this._rgb,n)};const fV=(...n)=>new Ct(...n,"css");hr.css=fV;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const pV=(...n)=>new Ct(...n,"gl");hr.gl=pV;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return sR(this._rgb,n)};const hV=(...n)=>new Ct(...n,"hex");hr.hex=hV;lr.format.hex=nR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:eu}=Math,PR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*eu(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*eu(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*eu(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*eu(r),i=255),[t,r,i,1]},{round:dV}=Math,mV=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=PR(C);A[2]/A[0]>=r/t?l=C:i=C}return dV(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return mV(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(hr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=PR;Ct.prototype.oklch=function(){return mR(this._rgb)};const gV=(...n)=>new Ct(...n,"oklch");Object.assign(hr,{oklch:gV});lr.format.oklch=gR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(hr,{analyze:pR,average:yQ,bezier:EQ,blend:ms,brewer:tV,Color:Ct,colors:Qa,contrast:UQ,contrastAPCA:zQ,cubehelix:LQ,deltaE:HQ,distance:KQ,input:lr,interpolate:Va,limits:hR,mix:Va,random:jQ,scale:Mu,scales:eV,valid:JQ});class yV{constructor(){or(this,"PROPERTIES",{...h4,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:hr,rgb:(e=0,t=e,r=t=e)=>hr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>hr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,r)=>{for(let i=Math.round(e);i{this.line(0,this.ledCount,e)},gradient:(e,t,r,i)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))bV(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let r=0;r"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof di=="object"&&di.global===di?di:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(vV);const xV=xv;var ea={},OV={get exports(){return ea},set exports(n){ea=n}};(function(n,e){(function(t,r){r(e)})(di,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const C=document.createElement("canvas");C.width=n.frames,C.height=n.ledCount;const A=C.getContext("2d");e();for(let B=0;Bthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ua(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ua(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Uo(this),l=new Uo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Uo(this,e)}iterRange(e,t=this.length){return new TR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new DR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=CV(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new wV(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=wu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Ua(this,e,t);let i=wu(this.text,wu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Ua(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Ua(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function CV(n){let e=-1;for(let t of n)e+=t.length+1;return e}function wu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class TR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Uo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class DR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Uo.prototype[Symbol.iterator]=TR.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=function(){return this});class wV{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ua(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?IR:AV)(n,e,r)}function IR(n,e,t){if(e==n.length)return e;e&&RR(n.charCodeAt(e))&&FR(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function AV(n,e,t){for(;e>0;){let r=IR(n,e-2,t);if(r=56320&&n<57344}function FR(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!FR(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return RR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&yi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),yi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function yi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Yo(n),C=new Yo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Yo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function BR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new ku([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class ku{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=qu(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Yi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new LR(e,n)}const Ri={highest:To(Yi.highest),high:To(Yi.high),default:To(Yi.default),low:To(Yi.low),lowest:To(Yi.lowest)};class LR{constructor(e,t){this.inner=e,this.prec=t}}class vc{of(e){return new wv(this,e)}reconfigure(e){return vc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class ju{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of TV(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>PV($e,me,ie))}}let q=_.map(Y=>Y(C));return new ju(e,h,q,C,A,l)}}function TV(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof LR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof ku)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Yi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Yi.default),r.reduce((h,C)=>h.concat(C))}function Wo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function qu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const NR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),MR=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),$R=$t.define(),jR=$t.define(),qR=$t.define(),QR=$t.define({combine:n=>n.length?n[0]:!1});class ri{constructor(e,t){this.type=e,this.value=t}static define(){return new DV}}class DV{of(e){return new ri(this,e)}}class IV{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new IV(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&BR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ri.define();Xr.userEvent=ri.define();Xr.addToHistory=ri.define();Xr.remote=ri.define();function RV(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=UR(e,Ia(l),!1)}return n}function _V(n){let e=n.startState,t=e.facet(qR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const BV=[];function Ia(n){return n==null?BV:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const LV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NV(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||LV.test(t)))return!0}return!1}function MV(n){return e=>{if(!/\S/.test(e))return Br.Space;if(NV(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=ju.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ju.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return BR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(QR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(NR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return MV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=MR;Sr.readOnly=QR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=NR;Sr.changeFilter=$R;Sr.transactionFilter=jR;Sr.transactionExtender=qR;vc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class WR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new WR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new GR(this,null,-1).goto(0),A=0,_=[],B=new Ci;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ho.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ho.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new Ci;for(let i of e instanceof Tv?[e]:t?$V(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function $V(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class Ci{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ci)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new GR(h,t,r,l));return i.length==1?i[0]:new Ho(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ho.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){tu(this.active,e),tu(this.activeTo,e),tu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;ru(this.active,t,r),ru(this.activeTo,t,i),ru(this.activeRank,t,l),e&&ru(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&tu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class wi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new jV(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class jV{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qV=typeof navigator<"u"&&/Mac/.test(navigator.platform),QV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)ki[48+un]=ki[96+un]=String(un);for(var un=1;un<=24;un++)ki[un+111]="F"+un;for(var un=65;un<=90;un++)ki[un]=String.fromCharCode(un+32),Ko[un]=String.fromCharCode(un);for(var qb in ki)Ko.hasOwnProperty(qb)||(Ko[qb]=ki[qb]);function VV(n){var e=qV&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||QV&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ko:ki)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Jo(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Au(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function el(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Go(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function xc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function UV(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function zR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function WV(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=UV(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=zR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class zV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function ZR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function HR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!Qu(t))r=oa(t),t=t.parentNode;else return null}}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Vx){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function eF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:Oc,ie_version:rF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:nF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YV=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>YV||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return HV(this.dom,e,t)}}class ti extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(XR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ti(this.mark,t,h)}domAtPos(e){return sF(this,e)}coordsAt(e,t){return aF(this,e,t)}}function HV(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?xc(A,h<0):A||null}class bi extends Pr{static create(e,t,r){return new bi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=bi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof bi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=bi.prototype.children=Wa.prototype.children=Vx;function sF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ti&&i.length&&(r=i[i.length-1])instanceof ti&&r.mark.eq(e.mark)?iF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function aF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function JV(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ai(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=oF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ai(e,r,i,t,e.widget||null,!0)}static line(e){return new ml(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class dl extends Ht{constructor(e){let{start:t,end:r}=oF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof dl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Vu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}dl.prototype.point=!1;class ml extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ml&&this.spec.class==e.spec.class&&Vu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ml.prototype.mapMode=cn.TrackBefore;ml.prototype.point=!0;class Ai extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&eU(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ai.prototype.point=!0;function oF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function eU(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),tF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Vu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){iF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return sF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(XR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=el(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=aF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ei extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ei)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends ni{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class zo{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nu(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ei)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(nu(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ei(r.widget||Ga.block,C,r));else{let A=bi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(nu(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(nu(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new zo(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function nu(n,e){for(let t of e)n=new ti(t,[n],n.length);return n}class Ga extends ni{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Ux=Rr.RTL;function lF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function cF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function aU(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Uv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new vi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Uv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function fF(n){return[new vi(0,n,0)]}let pF="";function lU(n,e,t,r,i){var l;let h=r.head-n.from,C=vi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),pF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),xF=$t.define({combine:n=>n.some(e=>e)}),OF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const su=sr.define({map:(n,e)=>n.map(e)}),SF=sr.define();function Tn(n,e,t){let r=n.facet(gF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const mi=$t.define({combine:n=>n.length?n[0]:!0});let cU=0;const No=$t.define();class Vr{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Vr(cU++,e,r,i,C=>{let A=[No.of(C)];return h&&A.push(tl.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Vr.define(r=>new e(r),t)}}class Vb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const EF=$t.define(),zx=$t.define(),tl=$t.define(),CF=$t.define(),Zx=$t.define(),wF=$t.define();function p2(n,e){let t=n.state.facet(wF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=uU(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const kF=$t.define();function AF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(kF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Mo=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Uu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Uu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!yU(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?pU(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=mU(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=zo.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=zo.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=zo.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);eF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(SF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ti(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&Au(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&fU(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Go(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Go(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&gU(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Jo(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=hU(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?HR:KR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Go(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Jo(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ei&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?el(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=el(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new JR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(tl).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(CF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=AF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;WV(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function bU(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function xU(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Ub(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=el(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Ub(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=vU(e,Qe),ct=xU(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Ub(B,Qe)?B=m2(B,Qe.bottom):q&&Ub(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function TF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&OU(Qe,Je,B)||Qt.chrome&&SU(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function OU(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function SU(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function EU(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=lU(i,l,h,C,t),B=pF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function CU(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function wU(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=TF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(AU(e,r.node,r.offset)?t:0))}}function AU(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class PU{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:IU(e),A=new kU(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=RU(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=TU(n,e,t));return n.state.facet(yF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function TU(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&PF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function DU(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function IU(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function RU(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class FU{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&XU(e.contentDOM.ownerDocument)}handleEvent(e){!qU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_U(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&RF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=IF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BU.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function _U(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const IF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BU="dthko",RF=[16,17,18,20,91,92,224,225],iu=6;function au(n){return Math.max(0,n)*.7+8}function LU(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class NU{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=GV(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&MU(e,t),this.dragging=jU(e,t)&&BF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LU(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=AF(this.view);e.clientX-A.left<=i+iu?t=-au(i-e.clientX):e.clientX+A.right>=h-iu&&(t=au(e.clientX-h)),e.clientY-A.top<=l+iu?r=-au(l-e.clientY):e.clientY+A.bottom>=C-iu&&(r=au(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MU(n,e){let t=n.state.facet(hF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function $U(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function jU(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Jo(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function qU(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),FF=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function QU(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),_F(n,t.value)},50)}function Sc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function _F(n,e){e=Sc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(mF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=WU(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new NU(n,e,t,r)),r&&n.observer.ignore(()=>{ZR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return bU(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function VU(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:VU(n,t,e.clientX,e.clientY)}}const UU=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function BF(n){if(!UU)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function WU(n,e){let t=E2(n,e),r=BF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=GU(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function GU(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Sc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Sc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&$U(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=FF?null:e.clipboardData;return t?(_F(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(QU(n),!1)};function zU(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function ZU(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Sc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=ZU(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=FF?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(zU(n,t),!1)};const LF=ri.define();function NF(n,e){let t=[];for(let r of n.facet(bF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:LF.of(!0)}):null}function MF(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=NF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),MF(n)};ns.blur=n=>{n.observer.clearSelectionRange(),MF(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=IF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function XU(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class YU{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Tu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends $F{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Un||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Un(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Tu&&(A=-2);let Y=new Un(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Tu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Tu)&&(za=!0),Wu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class KU extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Wu(this.left,e),this.right=Wu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const JU=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Un?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Un(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=JU)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let t=new Un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function n7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new YU(t),this.stateDeco=e.facet(tl).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new ou(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(jo(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(tl).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,e7(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=zR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=YR(e.scrollDOM);let me=(this.printing?n7:r7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new HU(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new ou(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||jo(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||jo(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return jo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ou{constructor(e,t){this.from=e,this.to=t}}function i7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function uu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function a7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function jo(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>jo(i,e)):n._content)}const cu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=wi.newName(),jF=wi.newName(),qF=wi.newName(),QF={"&light":"."+jF,"&dark":"."+qF};function Kv(n,e,t){return new wi(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const o7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},QF),l7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class u7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new f7(e),e.state.facet(mi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(mi)?r.root.activeElement!=this.dom:!Au(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Go(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jo(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&c7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Au(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Au(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new PU(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=DF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mi)!=e.state.facet(mi)&&(e.view.contentDOM.editContext=e.state.facet(mi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Go(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function c7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class f7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:SF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Jo(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZV(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(su)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(No).map(i=>new Vb(i));for(let i of this.plugins)i.update(this);this.observer=new u7(this),this.inputState=new FU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(LF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=NF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Uu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(su)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Gu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Mo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(cu)!=i.state.facet(cu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!DF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(No).map(r=>new Vb(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(No),r=e.state.facet(No);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Vb(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(YR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Uu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?qF:jF)+" "+this.state.facet(cu)}updateAttrs(){let e=N2(this,EF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(mi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Mo);let e=this.state.facet(Mt.cspNonce);wi.mount(this.root,this.styleModules.concat(o7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>CU(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return EU(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,wU(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),TF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[vi.find(l,e-i.from,-1,t)];return xc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(vF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p7)return fF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||cF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=oU(e.text,t,r);return this.bidiCache.push(new Gu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ZR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return su.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return su.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Vr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=wi.newName(),i=[cu.of(r),Mo.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return Ri.lowest(Mo.of(Kv("."+Hv,e,QF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=Mo;Mt.inputHandler=yF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=OF;Mt.focusChangeEffect=bF;Mt.perLineTextDirection=vF;Mt.exceptionSink=gF;Mt.updateListener=Gv;Mt.editable=mi;Mt.mouseSelectionStyle=mF;Mt.dragMovesSelection=dF;Mt.clickAddsSelectionRange=hF;Mt.decorations=tl;Mt.outerDecorations=CF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=wF;Mt.scrollMargins=kF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=EF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const p7=4096,L2={};class Gu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const h7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function d7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function g7(n,e,t){return UF(VF(n.state),e,n,t)}let gi=null;const y7=4e3;function b7(n,e=h7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>d7(Qe,e));for(let Qe=1;Qe{let yt=gi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{gi==yt&&(gi=null)},y7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function UF(n,e,t,r){Jv=e;let i=VV(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;gi&&gi.view==t&&gi.scope==r&&(C=gi.prefix+" ",RF.indexOf(e.keyCode)<0&&(_=!0,gi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+fu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=ki[e.keyCode])&&me!=i?(Y(ie[C+fu(me,e,!0)])||e.shiftKey&&(_e=Ko[e.keyCode])!=i&&_e!=me&&Y(ie[C+fu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+fu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class yl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=WF(e);return[new yl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return v7(e,t,r)}}function WF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function v7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=WF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Ur.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function x7(n,e){return n.constructor==e.constructor&&n.eq(e)}class O7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t!x7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=$t.define();function GF(n){return[Vr.define(e=>new O7(e,n)),Du.of(n)]}const zF=!Qt.ios,rl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function S7(n={}){return[rl.of(n),E7,C7,w7,xF.of(!0)]}function ZF(n){return n.startState.facet(rl)!=n.state.facet(rl)}const E7=GF({above:!0,markers(n){let{state:e}=n,t=e.facet(rl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||zF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of yl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ZF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(rl).cursorBlinkRate+"ms"}const C7=GF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:yl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ZF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const w7=Ri.highest(Mt.theme(ex)),XF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),qo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(XF)?r.value:t,n)}}),k7=Vr.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(qo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(qo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(qo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(qo)!=n&&this.view.dispatch({effects:XF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function A7(){return[qo,k7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function P7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class T7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new Ci,r=t.add.bind(t);for(let{from:i,to:l}of P7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",D7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),I7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function R7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Iu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:D7,addSpecialChars:null});return(e.replaceTabs=!R7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function F7(n={}){return[Iu.of(n),_7()]}let Q2=null;function _7(){return Q2||(Q2=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Iu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new T7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new M7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new N7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Iu);n.startState.facet(Iu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const B7="•";function L7(n){return n>=32?B7:n==10?"␤":String.fromCharCode(9216+n)}class N7 extends ni{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=L7(this.code),r=e.state.phrase("Control character")+" "+(I7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class M7 extends ni{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $7(){return q7}const j7=Ht.line({class:"cm-activeLine"}),q7=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(j7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function Q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function V7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function V2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?V7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function U7(n,e){let t=V2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=V2(n,i);if(!C)return r;let A=Q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function W7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?U7(t,r):null)}const G7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},z7={style:"cursor: crosshair"};function Z7(n={}){let[e,t]=G7[n.key||"Alt"],r=Vr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?z7:null})]}const Io="-10000px";class YF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function X7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||X7}}}),U2=new WeakMap,Kx=Vr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new YF(n,Ec,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=U2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||H7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Y7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),H7={x:0,y:0},Ec=$t.define({enables:[Kx,Y7]}),zu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Cc{static create(e){return new Cc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new YF(e,zu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K7=Ec.compute([zu],n=>{let e=n.facet(zu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Cc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class J7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Cc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!eW(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!tW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pu=4;function eW(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-pu&&e.clientX<=r+pu&&e.clientY>=i-pu&&e.clientY<=l+pu}function tW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function rW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(nW)&&(i=[]);return i},provide:i=>zu.from(i)});return{active:r,extension:[r,Vr.define(i=>new J7(i,n,r,t,e.hoverTime||300)),K7]}}function HF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const nW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function nl(n,e){let t=n.plugin(KF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const KF=Vr.fromClass(class{constructor(n){this.input=n.state.facet(sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new hu(n,!0,e.topContainer),this.bottom=new hu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new hu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new hu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(sl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class hu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const sl=$t.define({enables:KF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Ru=$t.define(),sW=$t.define(),iW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Zo=$t.define();function JF(n){return[e_(),Zo.of(Object.assign(Object.assign({},iW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function e_(n){let e=[aW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const aW=Vr.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Ru),this.view.viewport.from),r=[],i=this.gutters.map(l=>new oW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Zo),t=n.state.facet(Zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Ru),n.state.facet(Ru),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new t_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(sW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new t_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class t_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const fW=Zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(uW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function pW(n={}){return[Aa.of(n),e_(),fW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hW.range(i)))}return gr.of(e)});function mW(){return dW}const r_=1024;let gW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=gW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const yW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):yW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return OW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Pi{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function il(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(n_(i,r,q,q+B.length)){if(B instanceof Pi){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new bW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class bW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends s_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function i_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(il(C,e,t,!1))}}return i?i_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Pi||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Pi||!e.type.isAnonymous||tO(e))}function OW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=r_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Ur=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Pi($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Vs=Nt>=h?Nt:-1,si=0,is=Yt;for(;C.pos>$n;)Vs>=0&&C.id==Vs&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,si,C.end,is,Vs,yr,$r),si=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Vs,_t+1);if(Vs>=0&&si>0&&si-1&&si>0){let Cl=ie(Ur,$r);On=rO(Ur,hn,dn,0,hn.length,0,Yt-At,Cl,Cl)}else On=_e(Ur,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Pi(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Ur=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Ur,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Fu(n,e){if(!n.isAnonymous||e instanceof Pi||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Fu(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class SW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class EW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let CW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=CW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Xu(e);return r=>r.modified.indexOf(t)>-1?r:Xu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let wW=0;class Xu{constructor(e){this.name=e,this.instances=[],this.id=wW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&kW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=AW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Xu.get(C,A));return l}}function kW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function AW(n){let e=[[]];for(let t=0;tr.length-t.length)}function o_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Yu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return l_.add(e)}const l_=new mr;class Yu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function PW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function TW(n,e,t,r=0,i=n.length){let l=new DW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class DW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=IW(e)||Yu.empty,q=PW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function IW(n){let e=n.type.prop(l_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,mu=Ft(),pi=Ft(),J2=Ft(pi),eI=Ft(pi),hi=Ft(),gu=Ft(hi),Jb=Ft(hi),Ts=Ft(),zi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),yu=Ft(),re={comment:mu,lineComment:Ft(mu),blockComment:Ft(mu),docComment:Ft(mu),name:pi,variableName:Ft(pi),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(pi),labelName:Ft(pi),namespace:Ft(pi),macroName:Ft(pi),literal:hi,string:gu,docString:Ft(gu),character:Ft(gu),attributeValue:Ft(gu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(hi),regexp:Ft(hi),escape:Ft(hi),color:Ft(hi),url:Ft(hi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:zi,heading1:Ft(zi),heading2:Ft(zi),heading3:Ft(zi),heading4:Ft(zi),heading5:Ft(zi),heading6:Ft(zi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:yu,documentMeta:Ft(yu),annotation:Ft(yu),processingInstruction:Ft(yu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}u_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function c_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ti.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class RW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Ku{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Ku(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends a_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Ku.create(e.facet(Ti).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ti)!=e.state.facet(Ti)?Za.init(e.state):n.apply(e)}});let f_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(f_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,FW=Vr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=f_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ti=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,FW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class _W{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const BW=$t.define(),wc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ju(n){let e=n.facet(wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function al(n,e){let t="",r=n.tabSize,i=n.facet(wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?LW(n,t,e):null}class kc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ju(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const p_=new mr;function LW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return h_(r,n,t)}function h_(n,e,t){for(let r=n;r;r=r.next){let i=MW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function NW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function MW(n){let e=n.type.prop(p_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>d_(h,!0,1,void 0,l&&!NW(h)?i.from:void 0)}return n.parent==null?$W:null}function $W(){return 0}class iO extends kc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return h_(this.context.next,this.base,this.pos)}}function jW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function qW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function QW({closing:n,align:e=!0,units:t=1}){return r=>d_(r,e,t,n)}function d_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?qW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const VW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const UW=200;function WW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+UW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=al(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const GW=$t.define(),m_=new mr;function zW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function XW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function ec(n,e,t){for(let r of n.facet(GW)){let i=r(n,e,t);if(i)return i}return ZW(n,e,t)}function g_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ac=sr.define({map:g_}),bl=sr.define({map:g_});function y_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Ac)&&!YW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new nG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(bl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function YW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function b_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(x_()))}const HW=n=>{for(let e of y_(n)){let t=ec(n.state,e.from,e.to);if(t)return n.dispatch({effects:b_(n.state,[Ac.of(t),v_(n,t)])}),!0}return!1},KW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of y_(n)){let r=tc(n.state,t.from,t.to);r&&e.push(bl.of(r),v_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function v_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(bl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:HW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KW},{key:"Ctrl-Alt-[",run:JW},{key:"Ctrl-Alt-]",run:eG}],rG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,rG)}});function x_(n){let e=[ca,aG];return n&&e.push(aO.of(n)),e}function O_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=tc(n.state,C.from,C.to);A&&n.dispatch({effects:bl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends ni{toDOM(n){return O_(n,null)}}});class nG extends ni{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return O_(e,this.value)}}const sG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iG(n={}){let e=Object.assign(Object.assign({},sG),n),t=new nv(e,!0),r=new nv(e,!1),i=Vr.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ti)!=h.state.facet(Ti)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new Ci;for(let A of h.viewportLineBlocks){let _=tc(h.state,A.from,A.to)?r:ec(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,JF({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=tc(h.state,C.from,C.to);if(_)return h.dispatch({effects:bl.of(_)}),!0;let B=ec(h.state,C.from,C.to);return B?(h.dispatch({effects:Ac.of(B)}),!0):!1}})}),x_()]}const aG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vl{constructor(e,t){this.specs=e;let r;function i(C){let A=wi.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=u_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new wi(r):null,this.themeType=t.themeType}static define(e,t){return new vl(e,t||{})}}const lx=$t.define(),S_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(S_)}function E_(n,e){let t=[lG],r;return n instanceof vl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(S_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class oG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new Ci;for(let{from:i,to:l}of e.visibleRanges)TW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const lG=Ri.high(Vr.fromClass(oG,{decorations:n=>n.decorations})),uG=vl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),cG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),C_=1e4,w_="()[]{}",k_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:w_,maxScanDistance:C_,renderMatch:hG})}}),fG=Ht.mark({class:"cm-matchingBracket"}),pG=Ht.mark({class:"cm-nonmatchingBracket"});function hG(n){let e=[],t=n.matched?fG:pG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const dG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(k_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),mG=[dG,cG];function gG(n={}){return[k_.of(n),mG]}const yG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(yG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||C_,l=r.brackets||w_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return bG(n,e,t,A,B,_,l)}}return vG(n,e,t,h,C.type,i,l)}function bG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const xG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),OG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OG[n]=SG(xG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function SG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[o_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const EG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?CG(n):r.block?kG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const CG=oO(TG,0),wG=oO(A_,0),kG=oO((n,e)=>A_(n,e,PG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function AG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function PG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function A_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>AG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ri.define(),DG=ri.define(),IG=$t.define(),P_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),T_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(P_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=rc(B,B.length,t.minDepth,A):B=R_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(DG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function RG(n={}){return[T_,P_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?D_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Pc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(T_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const D_=Pc(0,!1),px=Pc(1,!1),FG=Pc(0,!0),_G=Pc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(IG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function rc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function BG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function LG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function I_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],NG=200;function R_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-NG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),rc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function MG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=$G(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function $G(n,e,t){let r=I_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const jG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||jG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const __=n=>F_(n,!vn(n)),B_=n=>F_(n,vn(n));function L_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Tc(t,e))}const QG=n=>L_(n,!vn(n)),VG=n=>L_(n,vn(n));function UG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;UG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const WG=n=>vs(n,e=>Dc(n.state,e,!vn(n))),GG=n=>vs(n,e=>Dc(n.state,e,vn(n)));function N_(n,e){return vs(n,t=>{if(!t.empty)return Tc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const M_=n=>N_(n,!1),$_=n=>N_(n,!0);function j_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Tc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>q_(n,!1),hx=n=>q_(n,!0);function Fi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const zG=n=>vs(n,e=>Fi(n,e,!0)),ZG=n=>vs(n,e=>Fi(n,e,!1)),XG=n=>vs(n,e=>Fi(n,e,!vn(n))),YG=n=>vs(n,e=>Fi(n,e,vn(n))),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),KG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function JG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headJG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function Q_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>Q_(n,!vn(n)),U_=n=>Q_(n,vn(n));function W_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const tz=n=>W_(n,!vn(n)),rz=n=>W_(n,vn(n)),nz=n=>ss(n,e=>Dc(n.state,e,!vn(n))),sz=n=>ss(n,e=>Dc(n.state,e,vn(n)));function G_(n,e){return ss(n,t=>n.moveVertically(t,e))}const z_=n=>G_(n,!1),Z_=n=>G_(n,!0);function X_(n,e){return ss(n,t=>n.moveVertically(t,e,j_(n).height))}const lI=n=>X_(n,!1),uI=n=>X_(n,!0),iz=n=>ss(n,e=>Fi(n,e,!0)),az=n=>ss(n,e=>Fi(n,e,!1)),oz=n=>ss(n,e=>Fi(n,e,!vn(n))),lz=n=>ss(n,e=>Fi(n,e,vn(n))),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),cz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),pz=({state:n,dispatch:e})=>{let t=Ic(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},hz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},dz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function xl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=bu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=bu(n,h,!1),C=bu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const Y_=(n,e,t)=>xl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iY_(n,!1,!0),H_=n=>Y_(n,!0,!1),K_=(n,e)=>xl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),J_=n=>K_(n,!1),mz=n=>K_(n,!0),gz=n=>xl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headxl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bz=n=>xl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},xz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ic(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function eB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Ic(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Oz=({state:n,dispatch:e})=>eB(n,e,!1),Sz=({state:n,dispatch:e})=>eB(n,e,!0);function tB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Ic(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ez=({state:n,dispatch:e})=>tB(n,e,!1),Cz=({state:n,dispatch:e})=>tB(n,e,!0),wz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ic(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function kz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=rB(!1),Az=rB(!0);function rB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&kz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new kc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Pz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new kc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=al(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(wc)})}),{userEvent:"input.indent"})),!0),sB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=al(n,Math.max(0,l-Ju(n)));for(;h(n.setTabFocusMode(),!0),Dz=[{key:"Ctrl-b",run:__,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:B_,shift:U_},{key:"Ctrl-p",run:M_,shift:z_},{key:"Ctrl-n",run:$_,shift:Z_},{key:"Ctrl-a",run:HG,shift:uz},{key:"Ctrl-e",run:KG,shift:cz},{key:"Ctrl-d",run:H_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:gz},{key:"Ctrl-Alt-h",run:J_},{key:"Ctrl-o",run:vz},{key:"Ctrl-t",run:xz},{key:"Ctrl-v",run:hx}],Iz=[{key:"ArrowLeft",run:__,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:XG,shift:oz,preventDefault:!0},{key:"ArrowRight",run:B_,shift:U_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:VG,shift:rz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:YG,shift:lz,preventDefault:!0},{key:"ArrowUp",run:M_,shift:z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:ZG,shift:az,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:zG,shift:iz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:fz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:H_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:J_},{key:"Mod-Delete",mac:"Alt-Delete",run:mz},{mac:"Mod-Backspace",run:yz},{mac:"Mod-Delete",run:bz}].concat(Dz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:WG,shift:nz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GG,shift:sz},{key:"Alt-ArrowUp",run:Oz},{key:"Shift-Alt-ArrowUp",run:Ez},{key:"Alt-ArrowDown",run:Sz},{key:"Shift-Alt-ArrowDown",run:Cz},{key:"Escape",run:dz},{key:"Mod-Enter",run:Az},{key:"Alt-l",mac:"Ctrl-l",run:pz},{key:"Mod-i",run:hz,preventDefault:!0},{key:"Mod-[",run:sB},{key:"Mod-]",run:nB},{key:"Mod-Alt-\\",run:Pz},{key:"Shift-Mod-k",run:wz},{key:"Shift-Mod-\\",run:ez},{key:"Mod-/",run:EG},{key:"Alt-A",run:wG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Tz}].concat(Iz),Fz={key:"Tab",run:nB,shift:sB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=nc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=nc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(oB.prototype[Symbol.iterator]=lB.prototype[Symbol.iterator]=function(){return this});function _z(n){try{return new RegExp(n,cO),!0}catch{return!1}}function nc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:sc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[sc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const sc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sc)&&(n=t.value);return n},provide:n=>sl.from(n,e=>e?mx:null)}),Bz=n=>{let e=nl(n,mx);if(!e){let t=[sc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Lz])),n.dispatch({effects:t}),e=nl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Lz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Nz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uB=$t.define({combine(n){return bs(n,Nz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mz(n){let e=[Vz,Qz];return n&&e.push(uB.of(n)),e}const $z=Ht.mark({class:"cm-selectionMatch"}),jz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function qz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const Qz=Vr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(uB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&qz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(jz.range(B,q)):(B>=i.to||q<=i.from)&&C.push($z.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Vz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Uz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Wz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Gz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Uz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Wz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class cB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||_z(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Yz(this):new Zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class fB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?zz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function zz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new oB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Xz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function ic(n,e){return n.slice(pn(n,e,!1),e)}function ac(n,e){return n.slice(e,pn(n,e))}function Xz(n){return(e,t,r)=>!r[0].length||(n(ic(r.input,r.index))!=Br.Word||n(ac(r.input,r.index))!=Br.Word)&&(n(ac(r.input,r.index+r[0].length))!=Br.Word||n(ic(r.input,r.index+r[0].length))!=Br.Word)}class Yz extends fB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const ol=sr.define(),fO=sr.define(),Oi=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ol)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>sl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Hz=Ht.mark({class:"cm-searchMatch"}),Kz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jz=Vr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Oi))}update(n){let e=n.state.field(Oi);(e!=n.startState.field(Oi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new Ci;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Kz:Hz)})}return r.finish()}},{decorations:n=>n.decorations});function Ol(n){return e=>{let t=e.state.field(Oi,!1);return t&&t.query.spec.valid?n(e,t):dB(e)}}const oc=Ol((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),hB(n),!0}),lc=Ol((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),hB(n),!0}),eZ=Ol((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),tZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=Ol((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),rZ=Ol((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new cB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function pB(n){let e=nl(n,pO);return e&&e.dom.querySelector("[main-field]")}function hB(n){let e=pB(n);e&&e==n.root.activeElement&&e.select()}const dB=n=>{let e=n.state.field(Oi,!1);if(e&&e.panel){let t=pB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:ol.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?ol.of(gx(n.state,e.query.spec)):sr.appendConfig.of(aZ)]});return!0},mB=n=>{let e=n.state.field(Oi,!1);if(!e||!e.panel)return!1;let t=nl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},nZ=[{key:"Mod-f",run:dB,scope:"editor search-panel"},{key:"F3",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:mB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tZ},{key:"Mod-Alt-g",run:Bz},{key:"Mod-d",run:Gz,preventDefault:!0}];class sZ{constructor(e){this.view=e;let t=this.query=e.state.field(Oi).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>oc(e),[Qn(e,"next")]),r("prev",()=>lc(e),[Qn(e,"previous")]),r("select",()=>eZ(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>rZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>mB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new cB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ol.of(e)}))}keydown(e){g7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?lc:oc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(ol)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const vu=30,xu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-vu),h=Math.min(i,t+vu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-vu;A--)if(!xu.test(C[A-1])&&xu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const iZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aZ=[Oi,Ri.low(Jz),iZ];class gB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(bB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function oZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:oZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function lZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Si(n){return n.selection.main.from}function bB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ri.define();function uZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function cZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=yB(n)),e}const uc=sr.define(),ll=sr.define();class fZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class pZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function hZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function dZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class mZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=dZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ll.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&yZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew mZ(t,n,e)}function yZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new pZ(q):new fZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=bZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:CZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new cc(SZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Si(t)).map(cZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!vZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(OB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new cc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xZ:OZ}}function vZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SZ=[];function vB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=vB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(uc))i=new Wn(i.source,1,l.value?Si(e.state):-1);else if(l.is(ll))i=new Wn(i.source,0);else if(l.is(xB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Si(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Si(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Si(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new gB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Si(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function EZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):bB(n,!0).test(i)}const xB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),OB=sr.define(),Bn=Hr.define({create(){return cc.start()},update(n,e){return n.update(e)},provide:n=>[Ec.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},uZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const CZ=gZ(Bn,mO);function Ou(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:OB.of(C)}),!0}}const wZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:uc.of(!0)}),!0):!1,kZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ll.of(null)}),!0)};class AZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const PZ=50,TZ=1e3,DZ=Vr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=vB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lPZ&&Date.now()-h.time>TZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(uc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Si(e),r=new gB(e,t,n.explicitPos==t,this.view),i=new AZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ll.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:xB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&HF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ll.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uc.of(!1)}),20),this.composing=0}}}),IZ=typeof navigator=="object"&&/Win/.test(navigator.platform),RZ=Ri.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(IZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),SB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new FZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let _Z=Ht.widget({widget:new class extends ni{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),BZ=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?_Z:BZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Sl=sr.define({map(n,e){return n&&n.map(e)}}),LZ=sr.define(),ul=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Sl))return t.value;if(t.is(LZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function NZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Sl.of(_)];t.state.field(ul,!1)===void 0&&B.push(sr.appendConfig.of([ul,QZ,VZ,SB]))}t.dispatch(t.state.update(A))}}function EB(n){return({state:e,dispatch:t})=>{let r=e.field(ul,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Sl.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const MZ=({state:n,dispatch:e})=>n.field(ul,!1)?(e(n.update({effects:Sl.of(null)})),!0):!1,$Z=EB(1),jZ=EB(-1),qZ=[{key:"Tab",run:$Z,shift:jZ},{key:"Escape",run:MZ}],kI=$t.define({combine(n){return n.length?n[0]:qZ}}),QZ=Ri.highest(gl.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:NZ(n)})}const VZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ul,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Sl.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const CB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function UZ(){return[GZ,CB]}const cv="()[]{}<>";function wB(n){for(let e=0;e{if((WZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=XZ(n.state,r);return l?(n.dispatch(l),!0):!1}),zZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=kB(n,n.selection.main.head).brackets||cl.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=YZ(n.doc,h.head);for(let A of r)if(A==C&&Rc(n.doc,h.head)==wB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},ZZ=[{key:"Backspace",run:zZ}];function XZ(n,e){let t=kB(n,n.selection.main.head),r=t.brackets||cl.brackets;for(let i of r){let l=wB(ln(i,0));if(e==i)return l==i?JZ(n,i,r.indexOf(i+i+i)>-1,t):HZ(n,i,l,t.before||cl.before);if(e==l&&AB(n,n.selection.main.from))return KZ(n,i,l)}return null}function AB(n,e){let t=!1;return n.field(CB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Rc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function YZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function HZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Rc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Rc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function JZ(n,e,t,r){let i=r.stringPrefixes||cl.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Rc(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(AB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!eX(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function eX(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function tX(n={}){return[RZ,Bn,fn.of(n),DZ,rX,SB]}const PB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:kZ},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:wZ}],rX=Ri.highest(gl.computeN([fn],n=>n.facet(fn).defaultKeymap?[PB]:[]));class nX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Hi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new hX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Hi(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new nX(i,l,h.diagnostic),!1}),r}function TB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Fc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function DB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(NB))}function sX(n,e){return{effects:DB(n,[Fc.of(e)])}}const Fc=sr.define(),xO=sr.define(),IB=sr.define(),Gn=Hr.define({create(){return new Hi(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Hi(t,i,r)}for(let t of e.effects)if(t.is(Fc)){let r=e.state.facet(Ls).autoPanel?t.value.length?fl.open:null:n.panel;n=Hi.init(t.value,r,e.state)}else t.is(xO)?n=new Hi(n.diagnostics,t.value?fl.open:null,n.selected):t.is(IB)&&(n=new Hi(n.diagnostics,n.panel,t.value));return n},provide:n=>[sl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),iX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function aX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).to_B(n,t,!1)))}const oX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:DB(n.state,[xO.of(!0)])});let t=nl(n,fl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},lX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uX=[{key:"Mod-Shift-m",run:oX,preventDefault:!0},{key:"F8",run:lX}],cX=Vr.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(sX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function fX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function pX(n,e={}){return[Ls.of({source:n,config:e}),cX,NB]}function FB(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function _B(n,e,t){var r;let i=t?FB(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class hX extends ni{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=_B(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=FB(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:IB.of(r)})}static open(e){return new fl(e)}}function _u(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Su(n){return _u(``,'width="6" height="3"')}const dX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class BB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)gX(e,t,r)),t}}function mX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mX(n,e)}let{hoverTime:i}=n.state.facet(_c),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function yX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new BB(t[i]).range(+i));return gr.of(r,!0)}const bX=JF({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new BB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(_c).markerFilter;for(let r of e.effects)if(r.is(Fc)){let i=r.value;t&&(i=t(i||[],e.state)),n=yX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),LB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=TB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Ec.from(n)}),vX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:_u('')},".cm-lint-marker-warning":{content:_u('')},".cm-lint-marker-error":{content:_u('')}}),NB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([iX.range(e.from,e.to)])}),rW(aX,{hideOn:TB}),dX],_c=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function xX(n={}){return[_c.of(n),yx,bX,vX,LB]}const OX=(()=>[pW(),mW(),F7(),RG(),iG(),S7(),A7(),Sr.allowMultipleSelections.of(!0),WW(),E_(uG,{fallback:!0}),gG(),UZ(),tX(),W7(),Z7(),$7(),Mz(),gl.of([...ZZ,...Rz,...nZ,...qG,...tG,...PB,...uX])])();class fc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new fc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new fc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class SX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class pc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pc(this.stack,this.pos,this.index)}}function Qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new Bu;class EX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;MB(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if(MB(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class El{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function MB(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||CX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function CX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class wX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class kX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Bu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Bu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Bu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new wX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&DX(i);if(h)return Vn&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Vn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Vn&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Vn&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Vn&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Vn&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Vn&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Vn&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Vn&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Vn&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class TX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class hc extends a_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r_;let h=Qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new AX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Ys(r,l+2)];else{if(r[l+1]==2)return Ys(r,l+2);break}if(h==t||h==0)return Ys(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ys(this.data,l+2);else break;i=t(Ys(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ys(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(hc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const IX=312,RX=313,MI=1,FX=2,_X=3,BX=4,LX=314,NX=316,MX=317,$X=5,jX=6,qX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$B=125,QX=59,xx=47,VX=42,UX=43,WX=45,GX=60,zX=44,ZX=63,XX=46,YX=91,HX=new TX({start:!1,shift(n,e){return e==$X||e==jX||e==NX?n:e==MX},strict:!1}),KX=new El((n,e)=>{let{next:t}=n;(t==$B||t==-1||e.context)&&n.acceptToken(LX)},{contextual:!0,fallback:!0}),JX=new El((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==VX)||t!=$B&&t!=QX&&t!=-1&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new El((n,e)=>{n.next==YX&&!e.context&&n.acceptToken(RX)},{contextual:!0}),tY=new El((n,e)=>{let{next:t}=n;if(t==UX||t==WX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:FX)}}else t==ZX&&n.peek(1)==XX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(_X))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const rY=new El((n,e)=>{if(n.next!=GX||!e.dialectEnabled(qX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(BX,-t)}),nY=o_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),sY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},iY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aY={__proto__:null,"<":187},oY=hc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:HX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[nY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[JX,eY,tY,rY,2,3,4,5,6,7,8,9,10,11,12,13,14,KX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>sY[n]||-1},{term:339,get:n=>iY[n]||-1},{term:92,get:n=>aY[n]||-1}],tokenPrec:15004}),jB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lY=jB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new SW,qB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const uY=["FunctionDeclaration"],cY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(uY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function QB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=cY[h.name];if(C&&C(h,l)||qB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of QB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function fY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)qB.has(i.name)&&(r=r.concat(QB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const Ei=Hu.define({name:"javascript",parser:oY.configure({props:[p_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:VW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:QW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),m_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),UB={test:n=>/^JSX/.test(n.name),facet:c_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pY=Ei.configure({dialect:"ts"},"typescript"),hY=Ei.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[UB]:void 0)]}),dY=Ei.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[UB]:void 0)]},"typescript");let WB=n=>({label:n,type:"keyword"});const GB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(WB),mY=GB.concat(["declare","implements","private","protected","public"].map(WB));function gY(n={}){let e=n.jsx?n.typescript?dY:hY:n.typescript?pY:Ei,t=n.typescript?lY.concat(mY):jB.concat(GB);return new _W(e,[Ei.data.of({autocomplete:lZ(VB,yB(t))}),Ei.data.of({autocomplete:fY}),n.jsx?vY:[]])}function yY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vY=Mt.inputHandler.of((n,e,t,r,i)=>{if((bY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ei.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=yY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function xY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of Ei.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(OY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function OY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},SY={get exports(){return Ox},set exports(n){Ox=n}};const EY={define:!1,require:!1},CY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},wY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},kY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},AY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},PY={assert:!0,expect:!0,should:!0},TY={exports:!0,global:!1,module:!1,require:!1},DY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},IY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},RY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},UY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},GY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},ZY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},XY={$:!1,jQuery:!1},YY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},HY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},KY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},JY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},eH={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},rH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},nH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},sH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},iH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},aH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},oH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},lH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},uH={browser:!1,chrome:!1,opr:!1},cH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},fH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},pH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},hH={amd:EY,applescript:CY,atomtest:wY,browser:kY,builtin:AY,chai:PY,commonjs:TY,couch:DY,devtools:IY,embertest:RY,es2015:FY,es2016:_Y,es2017:BY,es2018:LY,es2019:NY,es2020:MY,es2021:$Y,es2022:jY,es2023:qY,es2024:QY,es2025:VY,es3:UY,es5:WY,greasemonkey:GY,jasmine:zY,jest:ZY,jquery:XY,meteor:YY,mocha:HY,mongo:KY,nashorn:JY,node:eH,nodeBuiltin:tH,phantomjs:rH,prototypejs:nH,protractor:sH,qunit:iH,rhino:aH,serviceworker:oH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:lH,webextensions:uH,worker:cH,wsh:fH,yui:pH};(function(n){n.exports=hH})(SY);const dH=S9(Ox);var dc={},mH={get exports(){return dc},set exports(n){dc=n}},dv,VI;function gH(){return VI||(VI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(di,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var HB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bc=function(c){return HB.exec(c).slice(1)};function wl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Mc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Lc(c){var s=Nc(c),u=JB(c,-1)==="/";return c=SO(Mc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Nc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Lc(Mc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=wl(c).substr(1),s=wl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function V(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,V=G.type||j.wrap,te=this.__keys[V],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+V+".");for(W=te.length;(W-=1)>=0;)if($=te[W],U=G[$],!!U){if(Array.isArray(U)){for(K=U.length;(K-=1)>=0;)if(U[K]&&!E(L,U[K])){if(S(V,te[W]))j=new g(U[K],[$,K],"Property",null);else if(b(U[K]))j=new g(U[K],[$,K],null,null);else continue;I.push(j)}}else if(b(U)){if(E(L,U))continue;I.push(new g(U,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,V,Q,$,W,K,te,U,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,V;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(V,1)):V+=1;if(V===I.length)return a.Break;if(I[V].extendedRange[0]>Q.range[1])return a.Skip}}),V=0,k(F,{leave:function(Q){for(var $;VQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}($c)),$c}var oo={},tL="esrecurse",rL="ECMAScript AST recursive visitor",nL="https://github.com/estools/esrecurse",sL="esrecurse.js",iL="4.3.0",aL={node:">=4.0"},oL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],lL={type:"git",url:"https://github.com/estools/esrecurse.git"},uL={estraverse:"^5.2.0"},cL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},fL="BSD-2-Clause",pL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},hL={presets:["es2015"]},dL={name:tL,description:rL,homepage:nL,main:sL,version:iL,engines:aL,maintainers:oL,repository:lL,dependencies:uL,devDependencies:cL,license:fL,scripts:pL,babel:hL},RO;function mL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class V extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:U}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===U.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===U.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===U.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===U.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===U.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===U.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===U.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===U.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===U.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Vt=256,tr=Re|Se|Vt;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ue=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Ut=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ut.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Vt)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Vt))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vt)>0},Ut.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,V.lastIndex=w,w+=V.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var pr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var w=V.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){V.lastIndex=this.pos;var tt=V.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new pr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ve=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ve&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Vt|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Ut.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new pr,Gs=this.yieldPos,Wi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=Wi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=Wi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Ut.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ii(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ii(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!oi(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Vi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Vi(w){return ws(w)||oi(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||li(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Ui(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Ui(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return oi(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;oi(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function oi(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return li(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function li(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function ci(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=ci(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=ci(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Vc}var NO;function yL(){return NO||(NO=1,function(c){const s=gL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(qc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||qc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(Qc)),Qc.exports}var uo={},MO;function bL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Pl(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=qc(),s=yL(),u=bL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var U=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,U.get?U:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],U=W.at(-1),ae={type:o.Template,value:K.slice(te.start,U.end)};return te.loc&&(ae.loc={start:te.loc.start,end:U.loc.end}),te.range&&(ae.start=te.range[0],ae.end=U.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,U=this._acornTokTypes;if(te===U.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===U.privateId)W.type=o.PrivateIdentifier;else if(te===U.semi||te===U.comma||te===U.parenL||te===U.parenR||te===U.braceL||te===U.braceR||te===U.dot||te===U.bracketL||te===U.colon||te===U.question||te===U.bracketR||te===U.ellipsis||te===U.arrow||te===U.jsxTagStart||te===U.incDec||te===U.starstar||te===U.jsxTagEnd||te===U.prefix||te===U.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===U.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===U.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===U.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===U.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===U.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,U=K.tokens,ae=this._tokens,z=()=>{U.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(U.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),U.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),U=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:U,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,U,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=U,ce.range=[te,U]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(U,ae){(typeof U!="object"||U===null)&&(U={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=U.sourceType,ue=E(U),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const U=this[k],ae=U.tokens;return U.comments&&(ae.comments=U.comments),ae}finishNode(...U){const ae=super.finishNode(...U);return this[D](ae)}finishNodeAt(...U){const ae=super.finishNodeAt(...U);return this[D](ae)}parse(){const U=this[k],ae=super.parse();if(ae.sourceType=U.originalSourceType,U.comments&&(ae.comments=U.comments),U.tokens&&(ae.tokens=U.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return U.lastToken&&(ae.range&&(ae.range[1]=U.lastToken.range[1]),ae.loc&&(ae.loc.end=U.lastToken.loc.end),ae.end=U.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(U){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(U)}raise(U,ae){const z=W.acorn.getLineInfo(this.input,U),ue=new SyntaxError(ae);throw ue.index=U,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(U,ae){this.raise(U,ae)}unexpected(U){let ae="Unexpected token";if(U!=null){if(this.pos=U,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(U){const ae=super.jsx_readString(U);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](U){return U.type==="TemplateElement"&&this[k].templateElements.push(U),U.type.includes("Function")&&!U.generator&&(U.generator=!1),U}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),V=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=V,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function vL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",U="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[V]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[U]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&oi(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ve||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Ut}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function Wi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var xL="eslint",OL="9.12.0",SL="Nicholas C. Zakas ",EL="An AST-based pattern checker for JavaScript.",CL={eslint:"./bin/eslint.js"},wL="./lib/api.js",kL="./lib/types/index.d.ts",AL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},PL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},TL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},DL={"pre-commit":"lint-staged"},IL=["LICENSE","README.md","bin","conf","lib","messages"],RL="eslint/eslint",FL="https://eslint.org/donate",_L="https://eslint.org",BL="https://github.com/eslint/eslint/issues/",LL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},NL={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},ML={jiti:"*"},$L={jiti:{optional:!0}},jL=["ast","lint","javascript","ecmascript","espree"],qL="MIT",QL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:xL,version:OL,author:SL,description:EL,bin:CL,main:wL,types:kL,exports:AL,typesVersions:PL,scripts:TL,gitHooks:DL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:IL,repository:RL,funding:FL,homepage:_L,bugs:BL,dependencies:LL,devDependencies:NL,peerDependencies:ML,peerDependenciesMeta:$L,keywords:jL,license:qL,engines:QL},Tl={},xs=[],Zn=[],UL=typeof Uint8Array<"u"?Uint8Array:Array,Uc=!1;function qO(){Uc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new UL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function GL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function zL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Dl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function VO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var ZL={}.toString,UO=Array.isArray||function(c){return ZL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var XL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Il();function Il(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Us(c,s){if(Il()=Il())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Il().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return _l(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function eN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return cN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return lN(this,s,u);case"latin1":case"binary":return uN(this,s,u);case"base64":return aN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function _i(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return tN(this,s,u,p);case"utf8":case"utf-8":return rN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return nN(this,s,u,p);case"base64":return sN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function aN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return oN(p)}var KO=4096;function oN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Rl(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2};function Fl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Fl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Fl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),VO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),VO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function gN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return WL(hN(c))}function Bl(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function bN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||vN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function vN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),$l(s)?u.showHidden=s:s&&rf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=ON),Ml(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ON(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function SN(c,s){return c}function EN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Ml(c,s,u){if(c.customInspect&&s&&Ni(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Ml(c,p,u)),p}var a=CN(c,s);if(a)return a;var d=Object.keys(s),v=EN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Yc(s);if(d.length===0){if(Ni(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Bi(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Yc(s)}var o="",y=!1,O=["{","}"];if(Kc(s)&&(y=!0,O=["[","]"]),Ni(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Bi(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Yc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Bi(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=wN(c,s,u,v,d):g=d.map(function(f){return Hc(c,s,u,v,f,y)}),c.seen.pop(),kN(g,o,O)}function CN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Jc(s))return c.stylize(""+s,"number");if($l(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Yc(c){return"["+Error.prototype.toString.call(c)+"]"}function wN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function kN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Kc(c){return Array.isArray(c)}function $l(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Jc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Bi(c){return Li(c)&&ef(c)==="[object RegExp]"}function Li(c){return typeof c=="object"&&c!==null}function pa(c){return Li(c)&&ef(c)==="[object Date]"}function ha(c){return Li(c)&&(ef(c)==="[object Error]"||c instanceof Error)}function Ni(c){return typeof c=="function"}function jl(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function ef(c){return Object.prototype.toString.call(c)}function tf(c){return c<10?"0"+c.toString(10):c.toString(10)}var AN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function PN(){var c=new Date,s=[tf(c.getHours()),tf(c.getMinutes()),tf(c.getSeconds())].join(":");return[c.getDate(),AN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",PN(),Ll.apply(null,arguments))}function rf(c,s){if(!s||!Li(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var Mi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function nf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(Mi&&c[Mi]){var s=c[Mi];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,Mi,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,V=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=V(xe/je);xe>G*k>>1;Ge+=S)xe=V(xe/G);return V(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>V((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtV(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),V(Ge/nr)>b-ut&&$("overflow"),ut+=V(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnV((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ii;!(Wr=(ii=Xn.next()).done);Wr=!0){var ai=ii.value;if(aib&&$("overflow"),ai==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Vt(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ue=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ue))Ce=Ce.replace(Ue,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Vt(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Ut(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var pr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:pr.domainHost,parse:pr.parse,serialize:pr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ve="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ve+"%"+Ve+Ve+"%"+Ve+Ve)+"|"+a("%[89A-Fa-f]"+Ve+"%"+Ve+Ve)+"|"+a("%"+Ve+Ve)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return V[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,U=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;vf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],V=L[3],Q=L[5];return(j<=23&&G<=59&&V<=59||j==23&&G==59&&V==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return vf}var xf,TS;function MN(){return TS||(TS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),xf}var Of,DS;function $N(){return DS||(DS=1,Of=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),Of}var Sf,IS;function jN(){return IS||(IS=1,Sf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),wf}var kf,BS;function UN(){return BS||(BS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),kf}var Af,LS;function WN(){return LS||(LS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),Af}var Pf,NS;function GN(){return NS||(NS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Pf}var Tf,MS;function zN(){return MS||(MS=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Tf}var Df,$S;function ZN(){return $S||($S=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,V=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Df}var If,jS;function qS(){return jS||(jS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),If}var Rf,QS;function VS(){return QS||(QS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,US;function WS(){return US||(US=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,GS;function zS(){return GS||(GS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,ZS;function XN(){return ZS||(ZS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Bf}var Lf,XS;function YN(){return XS||(XS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Lf}var Nf,YS;function HN(){return YS||(YS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Nf}var Mf,HS;function KN(){return HS||(HS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Mf}var $f,KS;function JN(){return KS||(KS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(U),P=s.schema.patternProperties||{},N=Object.keys(P).filter(U),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,V=s.opts.removeAdditional,Q=j||G||V,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ue=s.util.getProperty(z),it=x+Ue,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ue,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Ut=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),$f}var jf,JS;function eM(){return JS||(JS=1,jf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var V=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Qf}var Vf,r1;function nM(){return r1||(r1=1,Vf={$ref:MN(),allOf:$N(),anyOf:jN(),$comment:qN(),const:QN(),contains:VN(),dependencies:UN(),enum:WN(),format:GN(),if:zN(),items:ZN(),maximum:qS(),minimum:qS(),maxItems:VS(),minItems:VS(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:XN(),not:YN(),oneOf:HN(),pattern:KN(),properties:JN(),propertyNames:eM(),required:tM(),uniqueItems:rM(),validate:wS()}),Vf}var Uf,n1;function sM(){if(n1)return Uf;n1=1;var c=nM(),s=da().toHash;return Uf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Uf}var Wf,s1;function iM(){if(s1)return Wf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Wf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),V={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...V},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...V},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...V},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...V,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...V,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,U=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Vt=new Error(qt,{cause:kt});throw kt.code&&(Vt.code=kt.code),Vt}}validateEnvironment(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=U){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Tl.Legacy=Re,Tl}var Ql={exports:{}},Vl={exports:{}},Kf,m1;function o$(){if(m1)return Kf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Kf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Kf}var Jf,g1;function y1(){if(g1)return Jf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=o$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Vl,Vl.exports)),Vl.exports}var Ul={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var u$={isatty:v1,ReadStream:x1,WriteStream:O1},c$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:u$,isatty:v1}),f$=i(c$),S1;function p$(){return S1||(S1=1,function(c,s){const u=f$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=gH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Ul,Ul.exports)),Ul.exports}var E1;function $i(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?Ql.exports=l$():Ql.exports=p$()),Ql.exports}var ep,C1;function tp(){if(C1)return ep;C1=1;const c=kl(),s=$i()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),V=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ve=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ve=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ve=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ve=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ve},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),U=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ve=Object.getOwnPropertyDescriptor(Te,ke);if(Ve)return Ve;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ve=0;Ve":return{value:Te.value>Ve.value};case">=":return{value:Te.value>=Ve.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ve.value};case">>>":return{value:Te.value>>>Ve.value};case"+":return{value:Te.value+Ve.value};case"-":return{value:Te.value-Ve.value};case"*":return{value:Te.value*Ve.value};case"/":return{value:Te.value/Ve.value};case"%":return{value:Te.value%Ve.value};case"**":return{value:Te.value**Ve.value};case"|":return{value:Te.value|Ve.value};case"^":return{value:Te.value^Ve.value};case"&":return{value:Te.value&Ve.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ve=ue(Ie.arguments,ke);if(Ve!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ve)};if(U.has(Pe[de]))return{value:Ve[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ve)};if(U.has(Oe))return{value:Ve[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ve=Te.defs[0];if(Ve.parent&&Ve.parent.kind==="const"&&Ve.node.id.type==="Identifier")return ce(Ve.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ve=ce(Ie.right,ke);if(Ve!=null)return Ve}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ve=pe(Ie,ke);if(Ve!=null&&!z(Te.value,Ve.value))return{value:Te.value[Ve.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ve=ue(Ie.arguments,ke);if(Te!=null&&Ve!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ve)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ve of Ie.properties)if(Ve.type==="Property"){if(Ve.kind!=="init")return null;const lt=pe(Ve,ke),Oe=ce(Ve.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ve.type==="SpreadElement"||Ve.type==="ExperimentalSpreadProperty"){const lt=ce(Ve.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ve=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ve!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ve)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ve=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ve}=Ie;return typeof this[Ve]=="function"?this[Ve](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ve}=Ie;for(const lt of Te[Ve]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ve=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ve},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ve,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ve=Ie|0,lt=ke,Oe=Te,!(Ve>=1))throw new TypeError("'times' should be a positive integer.")}else Ve=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ve>0);return Ve===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Vt=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ve=ke-1;Ve>=0&&Ie.charCodeAt(Ve)===92;--Ve)Te=!Te;return Te}function fe(Ie,ke,Te){const Ve=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}function Ue(Ie,ke,Te){const Ve=[];let lt=0;for(const Oe of Ie.execAll(ke))Ve.push(ke.slice(lt,Oe.index)),Ve.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ve.push(ke.slice(lt)),Ve.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Vt.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ve}=Vt.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ve||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ue(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Ut=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function pr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ve=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ve.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ve=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ve,!0))}for(const Te of this.globalObjectNames){const Ve=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ve,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ve=oe(Te.arguments[0]);if(Ve==null||!Bt(ke,Ve))continue;const lt=ke[Ve],Oe=[Ve];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ve of Te.body){if(!Pt.test(Ve.type)||Ve.source==null)continue;const lt=Ve.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ve,path:Pe,type:se,info:Oe[se]}),Ve.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ve,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ve.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ve,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ve[se]&&(yield{node:Pe,path:Te,type:se,info:Ve[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ve)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ve){let lt=ke;for(;pr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ve,Pe))return;Te=Te.concat(Pe);const de=Ve[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ve[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ve[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ve[Ut]&&(yield{node:Oe,path:Te,type:Ut,info:Ve[Ut]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve),yield*this._iteratePropertyReferences(Oe,Te,Ve));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ve));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ve))}*_iterateLhsReferences(ke,Te,Ve){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ve,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ve,Oe))continue;const Pe=Te.concat(Oe),de=Ve[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ve))}*_iterateImportReferences(ke,Te,Ve){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ve,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ve,Oe))return;Te=Te.concat(Oe);const Pe=Ve[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Ut,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Ut,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:V,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Ut,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=V,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(rp)),rp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Wl,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=lp;function lp(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",lp)}En.notDeepStrictEqual=up;function up(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",up)}En.strictEqual=cp;function cp(c,s,u){c!==s&&Cn(c,s,u,"===",cp)}En.notStrictEqual=fp;function fp(c,s,u){c===s&&Cn(c,s,u,"!==",fp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function b$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=b$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var v$=Object.freeze({__proto__:null,AssertionError:Wl,assert:mo,deepEqual:ap,deepStrictEqual:op,default:En,doesNotThrow:j1,equal:sp,fail:Cn,ifError:q1,notDeepEqual:lp,notDeepStrictEqual:up,notEqual:ip,notStrictEqual:fp,ok:mo,strictEqual:cp,throws:$1}),Gl=i(v$),pp,Q1;function go(){return Q1||(Q1=1,pp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),pp}var yo={},V1;function bo(){return V1||(V1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var hp,U1;function x$(){if(U1)return hp;U1=1;const c=go(),s=bo();return hp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},hp}var dp,W1;function O$(){if(W1)return dp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return dp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},dp}var mp,G1;function gp(){if(G1)return mp;G1=1;const c=go();return mp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},mp}var yp,z1;function S$(){if(z1)return yp;z1=1;const c=gp();return yp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},yp}var bp,Z1;function E$(){if(Z1)return bp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return bp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},Op}var Sp,H1;function w$(){if(H1)return Sp;H1=1;const c=gp();return Sp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Sp}var Ep,K1;function k$(){if(K1)return Ep;K1=1;const c=x$(),s=O$(),u=S$(),p=E$(),a=xp(),d=C$(),v=w$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Ep={forward:new m(a,p),backward:new m(s,c)},Ep}var Cp,J1;function A$(){if(J1)return Cp;J1=1;const c=xp();return Cp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Cp}var wp,eE;function P$(){if(eE)return wp;eE=1;const c=Gl,{isCommentToken:s}=Kr(),u=k$(),p=xp(),a=A$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return wp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Tp}var Dp,lE;function Ip(){if(lE)return Dp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Rp=d,Rp}var Fp,cE;function D$(){if(cE)return Fp;cE=1;const c=Ip(),s=T$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,V=this.thrownForkContext;G.add=f.bind(null,G,V,j),V.add=f.bind(null,V,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const V=this.choiceContext;return V.trueForkContext.addAll(I.trueForkContext),V.falseForkContext.addAll(I.falseForkContext),V.nullishForkContext.addAll(I.nullishForkContext),V.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const V=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,V,I.defaultBodySegments)):j.add(V));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Fp=P,Fp}var _p,fE;function pE(){if(fE)return _p;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return _p=c,_p}var Bp,hE;function I$(){if(hE)return Bp;hE=1;const c=D$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Lp=R,Lp}var Np,mE;function gE(){return mE||(mE=1,Np=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Np}var ji={},Mp={exports:{}},$p={exports:{}},jp,yE;function F$(){if(yE)return jp;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Vp={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)U?te:U}),s=K(function(te,U){return te0?1:0},d=K(function(te,U){return~~(te/U)}),v=K(function(te,U){return te%U}),m=K(function(te,U){return Math.floor(te/U)}),o=K(function(te,U){var ae;return(te%(ae=U)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,U){return Math.pow(te,U)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,U){return Math.atan2(te,U)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},V=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,U){var ae;for(te=Math.abs(te),U=Math.abs(U);U!==0;)ae=te%U,te=U,U=ae;return te}),W=K(function(te,U){return Math.abs(Math.floor(te/$(te,U)*U))}),Up={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:V,odd:Q,gcd:$,lcm:W};function K(te,U){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,zB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,zB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Gi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,ji.CallMethodStep=g,ji.ConfigCommentParser=v,ji.Directive=f,ji.TextSourceCodeBase=b,ji.VisitNodeStep=x,ji}var Yp,FE;function V$(){var j;if(FE)return Yp;FE=1;const{isCommentToken:c}=Kr(),s=P$(),u=zl(),p=tp(),a=nE(),{directivesPattern:d}=iE(),v=R$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=jc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,V){const Q=[];let $=0,W=0;for(;$=V.length||$=V.range[0]||V.range[0]<=G.range[0]&&V.range[1]>=G.range[0]}function F(G,V,Q,$){if(R(V,Q))return!1;const[W,K]=V.range[1]<=Q.range[0]?[V,Q]:[Q,V],te=G.getLastToken(W)||W,U=G.getFirstToken(K)||K;let ae=te;for(;ae!==U;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==U&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,V={},Q={}){for(const $ of new Set([...Object.keys(V),...Object.keys(Q)])){const W=V[$]===void 0?void 0:T(V[$]),te=Q[$]&&Q[$].value||W,U=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=U!==void 0,ae.eslintExplicitGlobalComments=U,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,V){Object.keys(V).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,U,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,U=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=U||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const U=this.scopeManager.acquire(te,K);if(U)return U.type==="function-expression-name"?($.set(Q,U.childScopes[0]),U.childScopes[0]):($.set(Q,U),U)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const U=te.variables.find(ae=>ae.name===Q);if(U)return U.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:U,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(U);if(!(te.type==="Line"&&!ue)){if(U==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${U} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(U){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=U.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(U=>{const{label:ae,value:z}=f.parseDirective(U.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:U.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(U),K[ue].value=ce):K[ue]={comments:[U],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:U.loc}):Q.push({ruleId:null,loc:U.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Gi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Yp=L,Yp}var Hp,_E;function BE(){return _E||(_E=1,Hp={SourceCode:V$()}),Hp}var Kp,LE;function Zl(){return LE||(LE=1,Kp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Kp}var Jp,NE;function U$(){if(NE)return Jp;NE=1;const c=Zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Jp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Jp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function eh(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W$(c){return function(s){if(Array.isArray(s))return th(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return th(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?th(c,s):void 0}}function th(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[V]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[V]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,V,Q,$,W,K,te;function U(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(V=$.length;(V-=1)>=0;)if($[V]){if(S(I,Q[G]))j=new g($[V],[te,V],"Property",new x($,V));else{if(!b($[V]))continue;j=new g($[V],[te,V],null,new x($,V))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||U(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)V.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(V),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var V;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),G$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=pr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,V=pr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=pr(["\\",'"'],!0,!1),U=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=pr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=pr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=pr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=pr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=pr(["/"],!0,!1),qt=Zt(":not(",!1),Vt=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ue=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Ut=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function pr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beUt&&(Ut=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ve(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ve())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(V))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(U)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Vt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ue)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&VE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&VE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function nh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Xl.VisitorKeys[p]?Xl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function sh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=eh(u,1)[0];if(!d)return!1;for(var v=nh(d,a),m=0;m0&&sh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return oh={getPlaceholderMatcher:c,interpolate:s},oh}var lh,YE;function Y$(){if(YE)return lh;YE=1;const c=Gl,{RuleFixer:s}=Z$(),{interpolate:u}=X$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return lh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},lh}function H$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uh,HE;function K$(){if(HE)return uh;HE=1;const c=$i()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),uh={LazyLoadingRuleMap:s},uh}var ch={exports:{}},xo={},fh={exports:{}},KE;function J$(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}fh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),fh.exports}var ph={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ph.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ph.exports}var hh={exports:{}},tC;function e3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}hh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),hh.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=J$(),xo.code=eC(),xo.keyword=e3()}()),xo}var dh,sC;function iC(){return sC||(sC=1,dh={LATEST_ECMA_VERSION:2025}),dh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=kl(),u=nC(),p=Pl(),a=Zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=zl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function V(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function U(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Vt(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ue(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Ut(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ue(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ue):ee.getFirstToken(X,Ue)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ve(ee.left,ee.operator),Ke=be&&ve&&Ve(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ve(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:U,isES5Constructor:G,getUpperFunction:V,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Ut,isDotToken:qt,isQuestionDotToken:Vt,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Vt),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ue),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ue,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=V(Ne);if(Ke===null||!U(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!U(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(U(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},mh}var gh,lC;function r3(){if(lC)return gh;lC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},gh}var yh,uC;function n3(){if(uC)return yh;uC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},yh}var bh,cC;function s3(){if(cC)return bh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return bh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},bh}var vh,fC;function i3(){if(fC)return vh;fC=1;const c=Ze();return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},vh}var xh,pC;function a3(){if(pC)return xh;pC=1;const c=Ze();return xh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},xh}var Oh,hC;function o3(){if(hC)return Oh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},Oh}var Sh,dC;function l3(){if(dC)return Sh;dC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Sh}var Eh,mC;function u3(){return mC||(mC=1,Eh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Eh}var Ch,gC;function c3(){if(gC)return Ch;gC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Ch}var wh,yC;function f3(){if(yC)return wh;yC=1;const c=Ze();return wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},wh}var kh,bC;function p3(){return bC||(bC=1,kh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),kh}var Ah,vC;function h3(){if(vC)return Ah;vC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},Ah}var Ph,xC;function d3(){if(xC)return Ph;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ph={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ph}var Th,OC;function m3(){if(OC)return Th;OC=1;const c=Ze();return Th={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Th}var Dh,SC;function g3(){if(SC)return Dh;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Dh}var Ih,EC;function y3(){if(EC)return Ih;EC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Ih}var Rh,CC;function b3(){if(CC)return Rh;CC=1;const c=Ze();return Rh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Rh}var Fh,wC;function Qi(){if(wC)return Fh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Fh={upperCaseFirst:u,getGraphemeCount:p},Fh}var _h,kC;function v3(){if(kC)return _h;kC=1;const c=Ze(),{upperCaseFirst:s}=Qi();return _h={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},_h}var Bh,AC;function x3(){if(AC)return Bh;AC=1;const c=Ze();return Bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Bh}var Lh,PC;function O3(){if(PC)return Lh;PC=1;const c=Ze(),{upperCaseFirst:s}=Qi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Lh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Lh}var Nh,TC;function S3(){return TC||(TC=1,Nh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Nh}var Mh,DC;function E3(){if(DC)return Mh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Mh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const V=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+V)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},$h}var jh,RC;function w3(){if(RC)return jh;RC=1;const c=/^no default$/iu;return jh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},jh}var qh,FC;function k3(){return FC||(FC=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),qh}var Qh,_C;function A3(){return _C||(_C=1,Qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),Qh}var Vh,BC;function P3(){if(BC)return Vh;BC=1;const c=Ze();return Vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Vh}var Uh,LC;function Wh(){return LC||(LC=1,Uh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Uh}var Gh,NC;function T3(){if(NC)return Gh;NC=1;const c=Ze(),s=Wh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Gh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Gh}var zh,MC;function D3(){return MC||(MC=1,zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),zh}var Zh,$C;function I3(){if($C)return Zh;$C=1;const c=Ze();return Zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Zh}var Xh,jC;function R3(){if(jC)return Xh;jC=1;const{getStaticValue:c}=Kr();return Xh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Xh}var Yh,qC;function F3(){if(qC)return Yh;qC=1;const c=Ze();return Yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Hh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Hh}var Kh,VC;function B3(){if(VC)return Kh;VC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Kh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Kh}var Jh,UC;function L3(){return UC||(UC=1,Jh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Jh}var ed,WC;function N3(){return WC||(WC=1,ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return sd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},sd}var id,YC;function Q3(){if(YC)return id;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},id}var ad,HC;function V3(){return HC||(HC=1,ad={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),ad}var od,KC;function U3(){return KC||(KC=1,od={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),od}var ld,JC;function W3(){if(JC)return ld;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ld={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ld}var ud,ew;function G3(){if(ew)return ud;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ud={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ud}var cd,tw;function z3(){if(tw)return cd;tw=1;const{getGraphemeCount:c}=Qi(),{getModuleExportName:s}=Ze();return cd={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},cd}var fd,rw;function Z3(){return rw||(rw=1,fd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),fd}var pd,nw;function X3(){if(nw)return pd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},pd}var hd,sw;function Y3(){if(sw)return hd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return hd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function V(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function U(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:U}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||U(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(U,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[U.range[1]-U.loc.end.column,U.range[1]-U.loc.end.column+z+ue]:[U.range[0]-U.loc.start.column,U.range[0]-U.loc.start.column+z+ue];s.report({node:U,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(U,ae){const z=ae?o.getLastToken(U):o.getFirstToken(U),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(U,ae){const z=ae===!0?o.getLastToken(U,1):o.getTokenBefore(U),ue=ae===!0?U.loc.end.line:U.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(U,ae){const z=g(U,!1);if(U.type!=="ArrayExpression"&&U.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab),U.type==="IfStatement"&&U.alternate){const ue=o.getTokenBefore(U.alternate);b(ue,ae),f(U.alternate)||b(U.alternate,ae)}if(U.type==="TryStatement"&&U.handler){const ue=o.getFirstToken(U.handler);b(ue,ae)}if(U.type==="TryStatement"&&U.finalizer){const ue=o.getTokenBefore(U.finalizer);b(ue,ae)}if(U.type==="DoWhileStatement"){const ue=o.getTokenAfter(U.body);b(ue,ae)}}function S(U,ae){U.forEach(z=>b(z,ae))}function E(U,ae){const z=o.getLastToken(U),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(U,!0)&&x(U,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(U,ae){const z=o.getLastToken(U,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(U,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(U,ae){const z=g(U,!1);(z.goodChar!==ae||z.badChar!==0)&&f(U)&&x(U,ae,z.space,z.tab,{line:U.loc.start.line,column:U.loc.start.column})}function T(U,ae,z){let ue=U.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(U){return T(U,"VariableDeclarator")}function F(U,ae){return ae&&ae.parent.loc.start.line===U.loc.start.line&&ae.parent.declarations.length>1}function P(U){const ae=U.parent;return ae.arguments.length>=2&&ae.arguments[1]===U?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(U){const ae=U.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==U)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(U){const ae=U.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(U.body,z),E(U,z-ue)}function L(U){const ae=o.getLastToken(U),z=U.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(U){if(L(U))return;let ae=U.type==="ArrayExpression"?U.elements:U.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(U);if(f(U)){const ce=U.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==U.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=U.parent.type==="ObjectExpression"?U.parent.properties:U.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(U)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(U,z)}else z=g(U).goodChar;m[U.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[U.type],F(U,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===U.loc.end.line)&&E(U,z+(F(U,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(U){return U.type==="BlockStatement"||U.type==="ClassBody"||U.body&&U.body.type==="BlockStatement"||U.consequent&&U.consequent.type==="BlockStatement"}function V(U){if(L(U))return;if(U.parent&&(U.parent.type==="FunctionExpression"||U.parent.type==="FunctionDeclaration"||U.parent.type==="ArrowFunctionExpression")){I(U);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];U.parent&&ue.includes(U.parent.type)&&G(U)?ae=g(U.parent).goodChar:U.parent&&U.parent.type==="CatchClause"?ae=g(U.parent.parent).goodChar:ae=g(U).goodChar,U.type==="IfStatement"&&U.consequent.type!=="BlockStatement"?z=[U.consequent]:Array.isArray(U.body)?z=U.body:z=[U.body],z.length>0&&S(z,ae+v),U.type==="BlockStatement"&&E(U,ae)}function Q(U){return U.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==U.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(U){const ae=Q(U),z=g(U).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[U.kind];if(S(ae,ne),o.getLastToken(U).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(U,g(ce).goodChar):E(U,ne-v)}function W(U){U.body.type!=="BlockStatement"&&V(U)}function K(U,ae){const z=U.type==="SwitchStatement"?U:U.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(U){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(U).replace(o.getText(U.argument),"");return ae.test(z)}return{Program(U){U.body.length>0&&S(U.body,g(U).goodChar)},ClassBody:V,BlockStatement:V,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(U){U.consequent.type!=="BlockStatement"&&U.consequent.loc.start.line>U.loc.start.line&&V(U)},VariableDeclaration(U){U.declarations.at(-1).loc.start.line>U.declarations[0].loc.start.line&&$(U)},ObjectExpression(U){j(U)},ArrayExpression(U){j(U)},MemberExpression(U){if(typeof m.MemberExpression>"u"||L(U)||T(U,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(U,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(U).goodChar+v*m.MemberExpression,z=[U.property],ue=o.getTokenBefore(U.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(U){const ae=g(U).goodChar,z=K(U,ae);S(U.cases,z),E(U,ae)},SwitchCase(U){if(L(U))return;const ae=K(U);S(U.consequent,ae+v)},FunctionDeclaration(U){L(U)||(m.FunctionDeclaration.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(U){L(U)||(m.FunctionExpression.parameters==="first"&&U.params.length?S(U.params.slice(1),U.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(U.params,g(U).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(U){if(L(U))return;const ae=g(U).goodChar;te(U)?k(U,ae):b(U,ae)},CallExpression(U){L(U)||(m.CallExpression.arguments==="first"&&U.arguments.length?S(U.arguments.slice(1),U.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(U.arguments,g(U).goodChar+v*m.CallExpression.arguments))}}}},dd}var md,aw;function K3(){if(aw)return md;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return md={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const U=W.length-K;if((U&&te==="strict"||U<0&&te==="minimum"||U>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=U>0,pe=Math.abs(U),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),U,ae,z;f&&$>1?(U=f.beforeColon,ae=f.afterColon,z=f.mode):(U=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?U:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,U,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):V(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},yd}var bd,uw;function t5(){if(uw)return bd;uw=1;const c=Ze(),s=Wh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:V,ExportNamedDeclaration:U,ExportDefaultDeclaration:U,ExportAllDeclaration:U,FunctionDeclaration:G,ImportDeclaration:U,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:V,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},bd}var vd,cw;function r5(){if(cw)return vd;cw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},vd}var xd,fw;function n5(){if(fw)return xd;fw=1;const c=Ze();return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},xd}var Od,pw;function s5(){if(pw)return Od;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function V($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const U=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&V($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(U<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(U)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},Od}var Sd,hw;function i5(){if(hw)return Sd;hw=1;const c=Ze();return Sd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Sd}var Ed,dw;function a5(){if(dw)return Ed;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Ed}var Cd,mw;function o5(){if(mw)return Cd;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Cd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),V=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||V)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield V.insertTextBefore(W,I.operator),yield V.removeRange([R.range[0],P.range[0]]),yield V.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield V.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Cd}var wd,gw;function l5(){return gw||(gw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),wd}var kd,yw;function u5(){return yw||(yw=1,kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),kd}var Ad,bw;function c5(){if(bw)return Ad;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return Ad={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(V,Q){let $=0;return V.replace(/\t/gu,(W,K)=>{const te=K+$,U=Q?te%Q:0,ae=Q-U;$+=ae-1}),Array.from(V).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(V,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===V.length)}function D(V,Q,$){const W=$.loc.start,K=$.loc.end,te=!V.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===V.length)}function T(V){if(!V||!V.parent||V.type!=="JSXEmptyExpression"||V.parent.type!=="JSXExpressionContainer")return!1;const Q=V.parent;return Q.loc.start.line===Q.loc.end.line}function R(V,Q){return V.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(V,Q,$){Array.isArray(V[Q])||(V[Q]=[]),V[Q].push($)}function P(){return a.ast.tokens.filter(V=>V.type==="String"||V.type==="JSXText"&&a.getNodeByRangeIndex(V.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(V=>V.type==="Template")}function I(){return a.ast.tokens.filter(V=>V.type==="RegularExpression")}function L(V){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?V.at(-1)!==$.parent&&V.push($.parent):V.push(Q)}),V}function G(V){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),U=N(),ae=L(U),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:V,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:V,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},Ad}var Pd,vw;function f5(){if(vw)return Pd;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Pd}var Td,xw;function p5(){if(xw)return Td;xw=1;const c=Ze(),{upperCaseFirst:s}=Qi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Td}var Dd,Ow;function h5(){return Ow||(Ow=1,Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Dd}var Id,Sw;function d5(){if(Sw)return Id;Sw=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Id}var Rd,Ew;function m5(){if(Ew)return Rd;Ew=1;const c=Ze(),{upperCaseFirst:s}=Qi();return Rd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Rd}var Fd,Cw;function g5(){if(Cw)return Fd;Cw=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Fd}var _d,ww;function y5(){if(ww)return _d;ww=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const V=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=V+K.length;return G.replaceTextRange([V,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=V+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const U=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=U.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([V,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},_d}var Bd,kw;function b5(){if(kw)return Bd;kw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Bd}var Ld,Aw;function v5(){if(Aw)return Ld;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Ld={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Ld}var Nd,Pw;function x5(){if(Pw)return Nd;Pw=1;const c=Ze();return Nd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Nd}var Md,Tw;function O5(){if(Tw)return Md;Tw=1;const c=Ze();return Md={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Md}var $d,Dw;function S5(){return Dw||(Dw=1,$d={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),$d}var jd,Iw;function E5(){if(Iw)return jd;Iw=1;const c=Ze();return jd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},jd}var qd,Rw;function C5(){if(Rw)return qd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return qd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},qd}var Qd,Fw;function w5(){if(Fw)return Qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return Qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},Qd}var Vd,_w;function k5(){return _w||(_w=1,Vd={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Vd}var Ud,Bw;function A5(){if(Bw)return Ud;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Ud={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Ud}var Wd,Lw;function P5(){if(Lw)return Wd;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Wd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Wd}var Gd,Nw;function T5(){return Nw||(Nw=1,Gd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Gd}var zd,Mw;function D5(){return Mw||(Mw=1,zd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),zd}var Zd,$w;function I5(){return $w||($w=1,Zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Zd}var Xd,jw;function R5(){if(jw)return Xd;jw=1;const c=Ze();return Xd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Xd}var Yd,qw;function F5(){if(qw)return Yd;qw=1;const c=Ze();return Yd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Yd}var Hd,Qw;function _5(){return Qw||(Qw=1,Hd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Hd}var Kd,Vw;function B5(){if(Vw)return Kd;Vw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Kd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Kd}var Jd,Uw;function L5(){if(Uw)return Jd;Uw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Jd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Jd}var em,Ww;function N5(){if(Ww)return em;Ww=1;const c=Ze();return em={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},em}var tm,Gw;function M5(){if(Gw)return tm;Gw=1;const c=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},tm}var rm,zw;function $5(){if(zw)return rm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return rm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},rm}var nm,Zw;function j5(){if(Zw)return nm;Zw=1;const{isConstant:c}=Ze();return nm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},nm}var sm,Xw;function q5(){return Xw||(Xw=1,sm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),sm}var im,Yw;function Q5(){return Yw||(Yw=1,im={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,V=33,Q=35,$=36,W=37,K=38,te=40,U=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Vt=66,tr=68,fe=70,Ue=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Ut=98,ir=99,Ot=100,Zt=102,pr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ve=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,U,be,ve,at,ht,dt]),Xn=new Set([K,V,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ii=new Set([te,U,be,ve,at,ht,pe,ne,Ee,dt]),ai=new Set([K,ne,V,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ii.has(nt)}function mn(nt){return ai.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Vi(nt){return ws(nt)||bt(nt)}class Ui{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===U&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==V)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(V))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(U)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==U&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ue)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ut))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ve)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Vi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:oi};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class li{constructor(H){this._state=new ba(H),this._validator=new Ui(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ui{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new li(H).parseLiteral(String(nt))}function Co(nt,H){new Ui(H).validateLiteral(nt)}function ci(nt,H){new ui(H).visit(nt)}return Es.AST=c,Es.RegExpParser=li,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Ui,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=ci,Es}var am,Kw;function V5(){if(Kw)return am;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return am={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},am}var om,Jw;function U5(){return Jw||(Jw=1,om={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,ek;function W5(){return ek||(ek=1,lm={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),lm}var um,tk;function G5(){return tk||(tk=1,um={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),um}var cm,rk;function z5(){return rk||(rk=1,cm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),cm}var fm,nk;function Z5(){if(nk)return fm;nk=1;const c=Ze();return fm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},fm}var pm,sk;function X5(){if(sk)return pm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return pm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},pm}var hm,ik;function Y5(){if(ik)return hm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},hm}var dm,ak;function H5(){if(ak)return dm;ak=1;const c=Ze();return dm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},dm}var mm,ok;function K5(){if(ok)return mm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return mm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},mm}var gm,lk;function Oo(){if(lk)return gm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return gm=s,gm}var ym,uk;function J5(){if(uk)return ym;uk=1;const c=Ze(),s=Oo();return ym={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),V=p.getTokenBefore(G);if(V.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===V.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},ym}var bm,ck;function ej(){if(ck)return bm;ck=1;const c=Ze();return bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},bm}var vm,fk;function tj(){if(fk)return vm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return vm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},vm}var xm,pk;function rj(){if(pk)return xm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return xm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},xm}var Om,hk;function nj(){if(hk)return Om;hk=1;const c=Ze();return Om={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},Om}var Sm,dk;function sj(){return dk||(dk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Sm}var Em,mk;function ij(){return mk||(mk=1,Em={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Em}var Cm,gk;function aj(){if(gk)return Cm;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Cm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Cm}var wm,yk;function oj(){if(yk)return wm;yk=1;const c=Ze();return wm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},wm}var km,bk;function lj(){if(bk)return km;bk=1;const c=Ze();return km={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},km}var Am,vk;function uj(){if(vk)return Am;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},Am}var Pm,xk;function cj(){if(xk)return Pm;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Pm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ue||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function V(fe){for(let Ue=fe;Ue;Ue=Ue.parent)if(Ue.type==="ReturnStatement"||Ue.type==="ArrowFunctionExpression"&&Ue.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ue=p.getLastToken(fe),mt=p.getTokenBefore(Ue);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ue)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ue.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ue.range[1],mt.range[0]);return Bt.replaceTextRange([Ue.range[0],mt.range[1]],(te(fe)?" ":"")+se+(U(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ue=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ue=Ue.object,mt=Ue.type;return mt==="CallExpression"}function Be(fe){const Ue=fe.callee;j(Ue,d(fe))&&(L(Ue)||!(ae(fe)||Ue.type==="NewExpression"&&!Q(Ue)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ue.type==="MemberExpression"&&pe(Ue)||!fe.optional&&Ue.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ue=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ue||mt===Ue&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ue||Pt===Ue&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ue=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ue,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ue)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ue){const mt=[fe];let Pt=fe;for(;Pt!==Ue;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ue){return Se(Ue,fe).reverse()}function Me(fe,Ue){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ue);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ue);case"MemberExpression":return fe.computed&&fe.property===Ue;case"ConditionalExpression":return fe.consequent===Ue;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ue,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ue),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ue=>Ue.node===fe)}function qt(fe){T.reports=T.reports.filter(Ue=>Ue.node!==fe)}function Vt(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Vt(fe.parent):!1}function tr({left:fe,operator:Ue,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ue)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ue=>Ue&&j(Ue,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ue=>z(Ue)&&I(Ue)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ue=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ue);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ue)&&a.add(Ue),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ue=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ue.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ue.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ue.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ue.value==="let"&&a.add(Ue)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ue=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ue.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ue,s.isNotClosingParenToken))&&a.add(Ue)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ue=>{const mt=we(fe,Ue);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ue=>Ue.value&&j(Ue.value,k)).forEach(Ue=>ne(Ue.value))},ObjectPattern(fe){fe.properties.filter(Ue=>{const mt=Ue.value;return z(mt)&&I(mt)}).forEach(Ue=>ne(Ue.value))},Property(fe){if(fe.computed){const{key:Ue}=fe;Ue&&j(Ue,k)&&ne(Ue)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ue=fe.argument;z(Ue)&&I(Ue)&&ne(Ue)},ReturnStatement(fe){const Ue=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ue,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ue=d(fe);fe.expressions.filter(mt=>j(mt,Ue)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ue=p.getFirstToken(fe);K(Ue,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ue}=fe,mt=p.getLastToken(fe);Ue.loc.end.line===mt.loc.start.line?ce(fe):L(Ue)&&ne(Ue)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ue=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ue,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ue=>Ue&&I(Ue)).forEach(ne)},AssignmentPattern(fe){const{left:Ue,right:mt}=fe;z(Ue)&&I(Ue)&&ne(Ue),mt&&j(mt,k)&&ne(mt)}}}},Dm}var Im,Ek;function hj(){if(Ek)return Im;Ek=1;const c=Oo(),s=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Im}var Rm,Ck;function dj(){if(Ck)return Rm;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Rm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Rm}var Fm,wk;function mj(){if(wk)return Fm;wk=1;const c=Ze();return Fm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Fm}var _m,kk;function gj(){if(kk)return _m;kk=1;const c=Ze();return _m={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},_m}var Bm,Ak;function yj(){return Ak||(Ak=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Bm}var Lm,Pk;function bj(){if(Pk)return Lm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Lm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Lm}var Nm,Tk;function vj(){return Tk||(Tk=1,Nm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Nm}var Mm,Dk;function xj(){if(Dk)return Mm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Mm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Mm}var $m,Ik;function Oj(){if(Ik)return $m;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return $m={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},$m}var jm,Rk;function Sj(){if(Rk)return jm;Rk=1;const c=Ze();return jm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},jm}var qm,Fk;function Ej(){if(Fk)return qm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return qm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},qm}var Qm,_k;function Cj(){if(_k)return Qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return Qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},Qm}var Vm,Bk;function wj(){if(Bk)return Vm;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Vm={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Vm}var Um,Lk;function kj(){if(Lk)return Um;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Um={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const V=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:V,column:Q.index},end:{line:V,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let V=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],V+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),V=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Um}var Wm,Nk;function Aj(){if(Nk)return Wm;Nk=1;const{getStaticPropertyName:c}=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Wm}var Gm,Mk;function Pj(){if(Mk)return Gm;Mk=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Gm}var zm,$k;function Tj(){if($k)return zm;$k=1;const c=Ze();return zm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},zm}var Zm,jk;function Dj(){return jk||(jk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Zm}var Xm,qk;function Ij(){return qk||(qk=1,Xm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Xm}var Ym,Qk;function Rj(){if(Qk)return Ym;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Ym={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Ym}var Hm,Vk;function Fj(){return Vk||(Vk=1,Hm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Hm}var Km,Uk;function _j(){if(Uk)return Km;Uk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Km={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),eg}var tg,zk;function Nj(){return zk||(zk=1,tg=function(s){return s>=127462&&s<=127487}),tg}var rg,Zk;function Mj(){return Zk||(Zk=1,rg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),rg}var ng,Xk;function $j(){if(Xk)return ng;Xk=1;const c=Bj(),s=Lj(),u=Nj(),p=Mj();return ng={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},ng}var sg,Yk;function ig(){if(Yk)return sg;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return sg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},sg}var ag,Hk;function jj(){if(Hk)return ag;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ag={parseStringLiteral:o,parseTemplateToken:y},ag}var og,Kk;function qj(){if(Kk)return og;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=$j(),x=Ze(),{isValidWithUnicodeFlag:g}=ig(),{parseStringLiteral:f,parseTemplateToken:b}=jj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,V=I[j].end,Q=N.slice(G,V);return R(P,Q)}return og={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var V;const N=(V=P.options[0])==null?void 0:V.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let U=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return U??(U=f(ce)),F(ne,ce,U)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return U??(U=b(ce)),F(ne,ce,U)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];U??(U=b(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];U??(U=f(ge)),oe=Re+U[pe].start,Z=Re+U[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,U;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),U=a(z,$);else{if(ue.regex)continue;te=String(ue.value),U=""}typeof U=="string"&&G(ae,te,U,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},og}var lg,Jk;function Qj(){if(Jk)return lg;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},lg}var ug,eA;function Vj(){return eA||(eA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),ug}var cg,tA;function Uj(){return tA||(tA=1,cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),cg}var fg,rA;function Wj(){return rA||(rA=1,fg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),fg}var pg,nA;function Gj(){if(nA)return pg;nA=1;const c=Ze();return pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},pg}var hg,sA;function zj(){if(sA)return hg;sA=1;const c=Ze();return hg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},hg}var dg,iA;function Zj(){return iA||(iA=1,dg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),dg}var mg,aA;function Xj(){return aA||(aA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),mg}var gg,oA;function Yj(){return oA||(oA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),gg}var yg,lA;function Hj(){return lA||(lA=1,yg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),yg}var bg,uA;function Kj(){return uA||(uA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),bg}var vg,cA;function Jj(){return cA||(cA=1,vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),vg}var xg,fA;function eq(){if(fA)return xg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return xg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},xg}var Og,pA;function tq(){if(pA)return Og;pA=1;const c=["Symbol","BigInt"];return Og={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},Og}var Sg,hA;function rq(){if(hA)return Sg;hA=1;const c=Ze();return Sg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Sg}var Eg,dA;function nq(){return dA||(dA=1,Eg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Eg}var Cg,mA;function sq(){return mA||(mA=1,Cg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Cg}var wg,gA;function iq(){if(gA)return wg;gA=1;const{getVariableByName:c}=Ze();return wg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},wg}var kg,yA;function aq(){if(yA)return kg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return kg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},kg}var Ag,bA;function oq(){if(bA)return Ag;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return Ag={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},Ag}var Pg,vA;function lq(){if(vA)return Pg;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Pg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Pg}var Tg,xA;function uq(){return xA||(xA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Tg}var Dg,OA;function cq(){return OA||(OA=1,Dg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Dg}var Ig,SA;function fq(){if(SA)return Ig;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Ig={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Ig}var Rg,EA;function pq(){return EA||(EA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Rg}var Fg,CA;function hq(){if(CA)return Fg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Fg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Fg}var _g,wA;function dq(){return wA||(wA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),_g}var Bg,kA;function mq(){return kA||(kA=1,Bg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Bg}var Lg,AA;function gq(){if(AA)return Lg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Lg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Lg}var Ng,PA;function yq(){if(PA)return Ng;PA=1;const{getStaticPropertyName:c}=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Ng}var Mg,TA;function bq(){if(TA)return Mg;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Mg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Mg}var $g,DA;function vq(){if(DA)return $g;DA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},$g}var jg,IA;function xq(){if(IA)return jg;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return jg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},jg}var qg,RA;function Oq(){if(RA)return qg;RA=1;const c=Ze();return qg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},qg}var Qg,FA;function Sq(){return FA||(FA=1,Qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),Qg}var Vg,_A;function BA(){if(_A)return Vg;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,U)=>Object.defineProperty(K,te,{value:U}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,U,ae)=>U.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,U)=>te+6{const ae=U.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,U,ae,z)=>te===p?`\\[${U}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(U)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let U=T[K];return U||(U=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=U),te?new RegExp(U,"i"):new RegExp(U)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,U,ae,z){this.origin=te,this.pattern=U,this.negative=ae,this.regex=z}}const L=(K,te)=>{const U=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(U,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,U)=>F(K)?K?G.isNotRelative(K)?U(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:U("path must not be empty",TypeError):U(`path must be a string, but got \`${te}\``,TypeError),V=K=>y.test(K);G.isNotRelative=V,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:U=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=U,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const U=L(te,this._ignoreCase);this._added=!0,this._rules.push(U)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,U){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!U)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,U,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,U,ae,z)}_t(te,U,ae,z){if(te in U)return U[te];if(z||(z=te.split(O)),z.pop(),!z.length)return U[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,U,ae,z);return U[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Vg=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=U=>/^\\\\\?\\/.test(U)||/["<>|\u0000-\u001F]+/u.test(U)?U:U.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=U=>te.test(U)||V(U)}return Vg}var Ug,LA;function Eq(){if(LA)return Ug;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Ug={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Ug}var Wg,NA;function Cq(){if(NA)return Wg;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Wg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Wg}var Gg,MA;function wq(){if(MA)return Gg;MA=1;const c=Ze();return Gg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Gg}var zg,$A;function kq(){return $A||($A=1,zg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),zg}var Zg,jA;function Aq(){if(jA)return Zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Zg}var Xg,qA;function Pq(){if(qA)return Xg;qA=1;const c=Ze();return Xg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Xg}var Yg,QA;function Tq(){if(QA)return Yg;QA=1;const c=Ze();return Yg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Yg}var Hg,VA;function Dq(){if(VA)return Hg;VA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Kg}var Jg,WA;function Rq(){if(WA)return Jg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Jg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Jg}var e0,GA;function Fq(){if(GA)return e0;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return e0={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},e0}var t0,zA;function _q(){if(zA)return t0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return t0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,V=>u.has(V.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},t0}var r0,ZA;function Bq(){if(ZA)return r0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return r0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},r0}var n0,XA;function Lq(){return XA||(XA=1,n0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},a0}var o0,JA;function jq(){return JA||(JA=1,o0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),o0}var l0,eP;function qq(){return eP||(eP=1,l0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),l0}var u0,tP;function Qq(){if(tP)return u0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return u0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},u0}var c0,rP;function Vq(){if(rP)return c0;rP=1;const c=Ze();return c0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},c0}var f0,nP;function Uq(){if(nP)return f0;nP=1;const c=Ze();return f0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&V{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},p0}var h0,iP;function Gq(){if(iP)return h0;iP=1;const c=Ze();return h0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},h0}var d0,aP;function zq(){return aP||(aP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),d0}var m0,oP;function Zq(){return oP||(oP=1,m0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let V=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(V.type);)V=V.parent;f(G)&&!S(G)&&!g(G)&&!(y&&V.type==="ArrayPattern")&&!(O&&V.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),m0}var g0,lP;function Xq(){if(lP)return g0;lP=1;const c=Ze();return g0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},g0}var y0,uP;function Yq(){if(uP)return y0;uP=1;const c=tp(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},y0}var b0,cP;function Hq(){if(cP)return b0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return b0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return v0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},v0}var x0,pP;function Jq(){if(pP)return x0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return x0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},x0}var O0,hP;function e6(){if(hP)return O0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return O0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},O0}var S0,dP;function t6(){if(dP)return S0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return S0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},S0}var E0,mP;function r6(){if(mP)return E0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return E0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},E0}var C0,gP;function n6(){if(gP)return C0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return C0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},w0}var k0,bP;function i6(){return bP||(bP=1,k0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),k0}var A0,vP;function a6(){if(vP)return A0;vP=1;const c=Ze();return A0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(V){if(a.destructuredArrayIgnorePattern&&V.name.parent.type==="ArrayPattern")return"array-destructure";switch(V.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(V){let Q,$;switch(V){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${V}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"defined",additional:$}}function y(V){const Q=V.defs&&V.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:V.name,action:"assigned a value",additional:$}}function O(V,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:V.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(V){const Q=V.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(V){return V.type==="Property"&&V.parent.type==="ObjectPattern"&&p.test(V.parent.properties.at(-1).type)}function b(V){if(a.ignoreRestSiblings){const Q=V.defs.some(W=>f(W.name.parent)),$=V.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(V){return V.isRead()}function E(V,Q){let $=V.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(V){const Q=[];return V.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(V,Q){return V.range[0]>=Q.range[0]&&V.range[1]<=Q.range[1]}function T(V){const Q=V.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===V?T(Q):!0:!1}function R(V,Q){const $=V.identifier,W=$.parent,K=V.from.variableScope,te=V.resolved.scope.variableScope,U=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!U?W.right:null}function F(V,Q){let $=V,W=V.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(V,Q){const $=c.getUpperFunction(V);return $&&D($,Q)&&F($,Q)}function N(V,Q){const $=V.identifier,W=$.parent;return V.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(V){let Q=V.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(V){if(V.eslintUsed)return!0;const Q=k(V),$=Q.length>0;let W=null;return V.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(V){const Q=V.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(V)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(V,Q){const $=V.variables,W=V.childScopes;let K,te;if(V.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(U))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(U)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(U,"variable")});continue}}!L(U)&&!g(U)&&!b(U)&&Q.push(U)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let U;te.length>0&&(U=te.at(-1)),s.report({node:U?U.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:V,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},A0}var P0,xP;function o6(){if(xP)return P0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return P0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},T0}var D0,SP;function u6(){if(SP)return D0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return D0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const V=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=V.length-1;do Q--,$--;while(T[Q]===V[$]);const W=$+1,K=V.slice(0,W),te=V.slice(W),U=te.find(o),ae=U&&U.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},D0}var I0,EP;function c6(){if(EP)return I0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},I0}var R0,CP;function f6(){return CP||(CP=1,R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),R0}var F0,wP;function p6(){if(wP)return F0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},F0}var _0,kP;function h6(){if(kP)return _0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},_0}var B0,AP;function d6(){if(AP)return B0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return L0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const V=P[0];if(I==="^"&&V.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!V.negate||V.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},N0}var M0,DP;function y6(){if(DP)return M0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return M0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},M0}var $0,IP;function b6(){if(IP)return $0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return $0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},$0}var j0,RP;function v6(){return RP||(RP=1,j0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),j0}var q0,FP;function x6(){if(FP)return q0;FP=1;const c=Zl(),s=Ze(),u=40;return q0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},q0}var Q0,_P;function O6(){if(_P)return Q0;_P=1;const c=Ze();return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},Q0}var V0,BP;function S6(){return BP||(BP=1,V0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),V0}var U0,LP;function E6(){if(LP)return U0;LP=1;const c={enum:["beside","below","any"]};return U0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},U0}var W0,NP;function C6(){if(NP)return W0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},W0}var G0,MP;function w6(){if(MP)return G0;MP=1;const c=Ze();return G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},G0}var z0,$P;function k6(){return $P||($P=1,z0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+U;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),U=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${U}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function V(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":V,"FunctionDeclaration:exit":V,"FunctionExpression:exit":V,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},Z0}var X0,qP;function P6(){if(qP)return X0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return X0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!V||G.required&&V?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(V=>V.range[0]===I.parent.range[0]),G=L[j-1];return V=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(V.replaceText($,",")):W.push(V.insertTextAfter($,",")),W.push(V.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const V=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(V.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(V.loc.start.line>G.loc.end.line||V.type==="Line"||V.type==="Block"){let $=V;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),V=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&V&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},X0}var Y0,QP;function T6(){return QP||(QP=1,Y0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Y0}var H0,VP;function D6(){if(VP)return H0;VP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return H0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},H0}var K0,UP;function I6(){if(UP)return K0;UP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},K0}var J0,WP;function R6(){if(WP)return J0;WP=1;const c=Ze();return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},J0}var ey,GP;function F6(){if(GP)return ey;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),U=j(K,Q);te.verify(D,K,Q,U)}F.prevNode=Q}function V(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:V,"SwitchCase:exit":N}}},ey}var ty,zP;function _6(){if(zP)return ty;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ty={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ty}var ry,ZP;function B6(){if(ZP)return ry;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EV.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const V=L.declarations[0];if(V.init){const Q=V.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(V=>V.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let V=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?V+=Q.id.properties.length:Q.id.type==="ArrayPattern"?V+=Q.id.elements.length:V+=1}),G=G&&T===V}I.forEach(V=>{f.report({node:V,messageId:"useConst",data:V,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ry}var ny,XP;function L6(){if(XP)return ny;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ny={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ny}var sy,YP;function N6(){if(YP)return sy;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return sy={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},sy}var iy,HP;function M6(){if(HP)return iy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return iy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},iy}var ay,KP;function $6(){if(KP)return ay;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return ay={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},ay}var oy,JP;function j6(){if(JP)return oy;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return oy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},oy}var ly,eT;function q6(){if(eT)return ly;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const V=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),V[1]),L.range[1]];yield T.removeRange(V),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ly={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ly}var uy,tT;function Q6(){if(tT)return uy;tT=1;const c=Ze();return uy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},uy}var cy,rT;function V6(){return rT||(rT=1,cy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),cy}var fy,nT;function U6(){if(nT)return fy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ig();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return fy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function V($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:U}of K.iterateGlobalReferences(te))if(b&&F(U)){const ae=U.arguments[0];if(U.arguments.length===2){const z=[],ue=D(U.arguments[1])||"";V(U,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&V(U,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:U,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(U,Q(U,`/${Be}/${pe}`))}}))})}else{const z=[];V(U,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:U,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(U,Q(U,ue))}}))})}}else if(R(U)){let ae=D(U.arguments[0]),z=!1,ue;if(U.arguments[1]&&(ue=D(U.arguments[1])),V(U,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},dy}var my,oT;function Z6(){if(oT)return my;oT=1;const c=Pl(),s=Ze(),u=Wh();return my={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},my}var gy,lT;function X6(){if(lT)return gy;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},gy}var yy,uT;function Y6(){if(uT)return yy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return yy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},yy}var by,cT;function H6(){if(cT)return by;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return by={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},by}var vy,fT;function K6(){if(fT)return vy;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return vy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},vy}var xy,pT;function J6(){if(pT)return xy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ig();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return xy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},xy}var Oy,hT;function e8(){return hT||(hT=1,Oy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),Oy}var Sy,dT;function t8(){return dT||(dT=1,Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Sy}var Ey,mT;function r8(){if(mT)return Ey;mT=1;const c=Oo(),s=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,V,Q;L?(G="extraSemi",Q=j.loc,V=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},V=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:V})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),V=j||G;L&&V?g(I,!0):!L&&!V&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Ey}var Cy,gT;function n8(){if(gT)return Cy;gT=1;const c=Ze();return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Cy}var wy,yT;function s8(){if(yT)return wy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},wy}var ky,bT;function i8(){return bT||(bT=1,ky={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),ky}var Ay={exports:{}},vT;function a8(){if(vT)return Ay.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ty}var Dy,ST;function u8(){if(ST)return Dy;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Dy}var Iy,ET;function c8(){if(ET)return Iy;ET=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Iy}var Ry,CT;function f8(){if(CT)return Ry;CT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Ry}var Fy,wT;function p8(){if(wT)return Fy;wT=1;const{isEqToken:c}=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Fy}var _y,kT;function h8(){if(kT)return _y;kT=1;const c=Ze();return _y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},_y}var By,AT;function d8(){if(AT)return By;AT=1;const c=Zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return By={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},By}var Ly,PT;function m8(){if(PT)return Ly;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},Ly}var Ny,TT;function g8(){if(TT)return Ny;TT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ny}var My,DT;function y8(){if(DT)return My;DT=1;const c=Ze();return My={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},My}var $y,IT;function b8(){if(IT)return $y;IT=1;const c=Ze();return $y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},$y}var jy,RT;function v8(){return RT||(RT=1,jy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),jy}var qy,FT;function x8(){return FT||(FT=1,qy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),qy}var Qy,_T;function O8(){if(_T)return Qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return Qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},Qy}var Vy,BT;function S8(){if(BT)return Vy;BT=1;const c=Ze();return Vy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Vy}var Uy,LT;function E8(){return LT||(LT=1,Uy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Gy}var zy,$T;function k8(){return $T||($T=1,zy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),zy}var Zy,jT;function A8(){if(jT)return Zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,V=>V.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Zy}var Xy,qT;function QT(){if(qT)return Xy;qT=1;const{LazyLoadingRuleMap:c}=K$();return Xy=new c(Object.entries({"accessor-pairs":()=>t3(),"array-bracket-newline":()=>r3(),"array-bracket-spacing":()=>n3(),"array-callback-return":()=>s3(),"array-element-newline":()=>i3(),"arrow-body-style":()=>a3(),"arrow-parens":()=>o3(),"arrow-spacing":()=>l3(),"block-scoped-var":()=>u3(),"block-spacing":()=>c3(),"brace-style":()=>f3(),"callback-return":()=>p3(),camelcase:()=>h3(),"capitalized-comments":()=>d3(),"class-methods-use-this":()=>m3(),"comma-dangle":()=>g3(),"comma-spacing":()=>y3(),"comma-style":()=>b3(),complexity:()=>v3(),"computed-property-spacing":()=>x3(),"consistent-return":()=>O3(),"consistent-this":()=>S3(),"constructor-super":()=>E3(),curly:()=>C3(),"default-case":()=>w3(),"default-case-last":()=>k3(),"default-param-last":()=>A3(),"dot-location":()=>P3(),"dot-notation":()=>T3(),"eol-last":()=>D3(),eqeqeq:()=>I3(),"for-direction":()=>R3(),"func-call-spacing":()=>F3(),"func-name-matching":()=>_3(),"func-names":()=>B3(),"func-style":()=>L3(),"function-call-argument-newline":()=>N3(),"function-paren-newline":()=>M3(),"generator-star-spacing":()=>$3(),"getter-return":()=>j3(),"global-require":()=>q3(),"grouped-accessor-pairs":()=>Q3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>U3(),"id-blacklist":()=>W3(),"id-denylist":()=>G3(),"id-length":()=>z3(),"id-match":()=>Z3(),"implicit-arrow-linebreak":()=>X3(),indent:()=>Y3(),"indent-legacy":()=>H3(),"init-declarations":()=>K3(),"jsx-quotes":()=>J3(),"key-spacing":()=>e5(),"keyword-spacing":()=>t5(),"line-comment-position":()=>r5(),"linebreak-style":()=>n5(),"lines-around-comment":()=>s5(),"lines-around-directive":()=>i5(),"lines-between-class-members":()=>a5(),"logical-assignment-operators":()=>o5(),"max-classes-per-file":()=>l5(),"max-depth":()=>u5(),"max-len":()=>c5(),"max-lines":()=>f5(),"max-lines-per-function":()=>p5(),"max-nested-callbacks":()=>h5(),"max-params":()=>d5(),"max-statements":()=>m5(),"max-statements-per-line":()=>g5(),"multiline-comment-style":()=>y5(),"multiline-ternary":()=>b5(),"new-cap":()=>v5(),"new-parens":()=>x5(),"newline-after-var":()=>O5(),"newline-before-return":()=>S5(),"newline-per-chained-call":()=>E5(),"no-alert":()=>C5(),"no-array-constructor":()=>w5(),"no-async-promise-executor":()=>k5(),"no-await-in-loop":()=>A5(),"no-bitwise":()=>P5(),"no-buffer-constructor":()=>T5(),"no-caller":()=>D5(),"no-case-declarations":()=>I5(),"no-catch-shadow":()=>R5(),"no-class-assign":()=>F5(),"no-compare-neg-zero":()=>_5(),"no-cond-assign":()=>B5(),"no-confusing-arrow":()=>L5(),"no-console":()=>N5(),"no-const-assign":()=>M5(),"no-constant-binary-expression":()=>$5(),"no-constant-condition":()=>j5(),"no-constructor-return":()=>q5(),"no-continue":()=>Q5(),"no-control-regex":()=>V5(),"no-debugger":()=>U5(),"no-delete-var":()=>W5(),"no-div-regex":()=>G5(),"no-dupe-args":()=>z5(),"no-dupe-class-members":()=>Z5(),"no-dupe-else-if":()=>X5(),"no-dupe-keys":()=>Y5(),"no-duplicate-case":()=>H5(),"no-duplicate-imports":()=>K5(),"no-else-return":()=>J5(),"no-empty":()=>ej(),"no-empty-character-class":()=>tj(),"no-empty-function":()=>rj(),"no-empty-pattern":()=>nj(),"no-empty-static-block":()=>sj(),"no-eq-null":()=>ij(),"no-eval":()=>aj(),"no-ex-assign":()=>oj(),"no-extend-native":()=>lj(),"no-extra-bind":()=>uj(),"no-extra-boolean-cast":()=>cj(),"no-extra-label":()=>fj(),"no-extra-parens":()=>pj(),"no-extra-semi":()=>hj(),"no-fallthrough":()=>dj(),"no-floating-decimal":()=>mj(),"no-func-assign":()=>gj(),"no-global-assign":()=>yj(),"no-implicit-coercion":()=>bj(),"no-implicit-globals":()=>vj(),"no-implied-eval":()=>xj(),"no-import-assign":()=>Oj(),"no-inline-comments":()=>Sj(),"no-inner-declarations":()=>Ej(),"no-invalid-regexp":()=>Cj(),"no-invalid-this":()=>wj(),"no-irregular-whitespace":()=>kj(),"no-iterator":()=>Aj(),"no-label-var":()=>Pj(),"no-labels":()=>Tj(),"no-lone-blocks":()=>Dj(),"no-lonely-if":()=>Ij(),"no-loop-func":()=>Rj(),"no-loss-of-precision":()=>Fj(),"no-magic-numbers":()=>_j(),"no-misleading-character-class":()=>qj(),"no-mixed-operators":()=>Qj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Uj(),"no-multi-assign":()=>Wj(),"no-multi-spaces":()=>Gj(),"no-multi-str":()=>zj(),"no-multiple-empty-lines":()=>Zj(),"no-native-reassign":()=>Xj(),"no-negated-condition":()=>Yj(),"no-negated-in-lhs":()=>Hj(),"no-nested-ternary":()=>Kj(),"no-new":()=>Jj(),"no-new-func":()=>eq(),"no-new-native-nonconstructor":()=>tq(),"no-new-object":()=>rq(),"no-new-require":()=>nq(),"no-new-symbol":()=>sq(),"no-new-wrappers":()=>iq(),"no-nonoctal-decimal-escape":()=>aq(),"no-obj-calls":()=>oq(),"no-object-constructor":()=>lq(),"no-octal":()=>uq(),"no-octal-escape":()=>cq(),"no-param-reassign":()=>fq(),"no-path-concat":()=>pq(),"no-plusplus":()=>hq(),"no-process-env":()=>dq(),"no-process-exit":()=>mq(),"no-promise-executor-return":()=>gq(),"no-proto":()=>yq(),"no-prototype-builtins":()=>bq(),"no-redeclare":()=>vq(),"no-regex-spaces":()=>xq(),"no-restricted-exports":()=>Oq(),"no-restricted-globals":()=>Sq(),"no-restricted-imports":()=>Eq(),"no-restricted-modules":()=>Cq(),"no-restricted-properties":()=>wq(),"no-restricted-syntax":()=>kq(),"no-return-assign":()=>Aq(),"no-return-await":()=>Pq(),"no-script-url":()=>Tq(),"no-self-assign":()=>Dq(),"no-self-compare":()=>Iq(),"no-sequences":()=>Rq(),"no-setter-return":()=>Fq(),"no-shadow":()=>_q(),"no-shadow-restricted-names":()=>Bq(),"no-spaced-func":()=>Lq(),"no-sparse-arrays":()=>Nq(),"no-sync":()=>Mq(),"no-tabs":()=>$q(),"no-template-curly-in-string":()=>jq(),"no-ternary":()=>qq(),"no-this-before-super":()=>Qq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Uq(),"no-undef":()=>Wq(),"no-undef-init":()=>Gq(),"no-undefined":()=>zq(),"no-underscore-dangle":()=>Zq(),"no-unexpected-multiline":()=>Xq(),"no-unmodified-loop-condition":()=>Yq(),"no-unneeded-ternary":()=>Hq(),"no-unreachable":()=>Kq(),"no-unreachable-loop":()=>Jq(),"no-unsafe-finally":()=>e6(),"no-unsafe-negation":()=>t6(),"no-unsafe-optional-chaining":()=>r6(),"no-unused-expressions":()=>n6(),"no-unused-labels":()=>s6(),"no-unused-private-class-members":()=>i6(),"no-unused-vars":()=>a6(),"no-use-before-define":()=>o6(),"no-useless-assignment":()=>l6(),"no-useless-backreference":()=>u6(),"no-useless-call":()=>c6(),"no-useless-catch":()=>f6(),"no-useless-computed-key":()=>p6(),"no-useless-concat":()=>h6(),"no-useless-constructor":()=>d6(),"no-useless-escape":()=>m6(),"no-useless-rename":()=>g6(),"no-useless-return":()=>y6(),"no-var":()=>b6(),"no-void":()=>v6(),"no-warning-comments":()=>x6(),"no-whitespace-before-property":()=>O6(),"no-with":()=>S6(),"nonblock-statement-body-position":()=>E6(),"object-curly-newline":()=>C6(),"object-curly-spacing":()=>w6(),"object-property-newline":()=>k6(),"object-shorthand":()=>A6(),"one-var":()=>P6(),"one-var-declaration-per-line":()=>T6(),"operator-assignment":()=>D6(),"operator-linebreak":()=>I6(),"padded-blocks":()=>R6(),"padding-line-between-statements":()=>F6(),"prefer-arrow-callback":()=>_6(),"prefer-const":()=>B6(),"prefer-destructuring":()=>L6(),"prefer-exponentiation-operator":()=>N6(),"prefer-named-capture-group":()=>M6(),"prefer-numeric-literals":()=>$6(),"prefer-object-has-own":()=>j6(),"prefer-object-spread":()=>q6(),"prefer-promise-reject-errors":()=>Q6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>U6(),"prefer-rest-params":()=>W6(),"prefer-spread":()=>G6(),"prefer-template":()=>z6(),"quote-props":()=>Z6(),quotes:()=>X6(),radix:()=>Y6(),"require-atomic-updates":()=>H6(),"require-await":()=>K6(),"require-unicode-regexp":()=>J6(),"require-yield":()=>e8(),"rest-spread-spacing":()=>t8(),semi:()=>r8(),"semi-spacing":()=>n8(),"semi-style":()=>s8(),"sort-imports":()=>i8(),"sort-keys":()=>o8(),"sort-vars":()=>l8(),"space-before-blocks":()=>u8(),"space-before-function-paren":()=>c8(),"space-in-parens":()=>f8(),"space-infix-ops":()=>p8(),"space-unary-ops":()=>h8(),"spaced-comment":()=>d8(),strict:()=>m8(),"switch-colon-spacing":()=>g8(),"symbol-description":()=>y8(),"template-curly-spacing":()=>b8(),"template-tag-spacing":()=>v8(),"unicode-bom":()=>x8(),"use-isnan":()=>O8(),"valid-typeof":()=>S8(),"vars-on-top":()=>E8(),"wrap-iife":()=>C8(),"wrap-regex":()=>w8(),"yield-star-spacing":()=>k8(),yoda:()=>A8()})),Xy}var Yy,VT;function P8(){if(VT)return Yy;VT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,H$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Yy=s,Yy}var Hy,UT;function T8(){if(UT)return Hy;UT=1;const c=$i()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Hy=a,Hy}var Ky,WT;function GT(){if(WT)return Ky;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Ky={startTime:c,endTime:s},Ky}var Jy,zT;function D8(){if(zT)return Jy;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Jy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Jy}var I8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:I8},eb,XT;function YT(){if(XT)return eb;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return eb={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},eb}var tb={},rb={},nb,HT;function R8(){if(HT)return nb;HT=1,nb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return sb}var ib,JT;function _8(){if(JT)return ib;JT=1;var c=R8(),s=F8();ib=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],V;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,U=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}V.push(ue)}}else V=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var V="",Q=!!G.nocase,$=!1,W=[],K=[],te,U=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":V+=d,Q=!0;break;case"?":V+=a,Q=!0;break;default:V+="\\"+te;break}ne.debug("clearStateChar %j %j",te,V),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=V.slice(0,pt.reStart),qt=V.slice(pt.reStart,pt.reEnd-8),Vt=V.slice(pt.reEnd-8,pt.reEnd),tr=V.slice(pt.reEnd);Vt+=tr;var fe=kt.split("(").length-1,Ue=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var V=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=U===te,this.debug("string match",te,U,ne)):(ne=U.match(te),this.debug("pattern match",te,U,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ab}var So={},tD;function L8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=B8(),p=$i(),a=L8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function V(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function U(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,U(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await V(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(rb)),rb}var ob,sD;function iD(){if(sD)return ob;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ob={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ob}var lb,aD;function ub(){if(aD)return lb;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(V){return typeof V=="object"&&V!==null}function p(V){return u(V)&&!Array.isArray(V)}function a(V){return typeof V>"u"}function d(V,Q,$=new Map){let W=$.get(V);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(V,W);const K={...V,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(V,te))continue;const U=V[te],ae=Q[te];p(U)&&p(ae)?K[te]=d(U,ae,$):a(ae)&&(K[te]=U)}return K}function v(V){const Q=Array.isArray(V)?V.slice(0):[V];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(V){for(const Q of Object.keys(V))if(typeof V[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(V,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(V,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(V,Q){if(typeof s.get(Q)>"u")throw new O(V,Q)}function g(V){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(V))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${V}".`)}function f(V){if(!u(V))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(V,Q){const $=Q===void 0?V:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(V){if(!(k.has(V)||typeof V=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(V={},Q={}){return d(V,Q)},validate:"object"},R={merge(V={},Q={}){const $=d(V,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??V[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(V={},Q={}){const $=new Set([...Object.keys(V),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in V&&K in Q&&V[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||V[K]}return W},validate(V){if(V===null||typeof V!="object")throw new TypeError("Expected an object.");if(Array.isArray(V))throw new S(V);for(const Q of Object.keys(V))if(Q!=="__proto__"&&(V[Q]===null||typeof V[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(V){if(typeof V=="string")g(V);else if(V&&typeof V=="object"){if(typeof V.preprocess!="function"||typeof V.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(V={},Q={}){const $={...V,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in V)||!(W in Q))continue;const K=v(V[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(V){f(V);for(const Q of Object.keys(V)){if(Q==="__proto__")continue;const $=V[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(V){return{merge:"replace",validate(){throw new b(V)}}}return lb={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(V=>[V,L(V)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},lb}var cb={},fb,oD;function N8(){if(oD)return fb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return fb={validateLanguageOptions:o},fb}var pb,lD;function uD(){if(lD)return pb;lD=1;const{SourceCode:c}=BE(),s=$i(),u=zl(),p=jc(),a=kl(),{validateLanguageOptions:d}=N8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return pb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},pb}var cD;function M8(){if(cD)return cb;cD=1;const c=QT();return cb.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Pl(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],cb}var hb={},$8="http://json-schema.org/draft-04/schema#",j8="http://json-schema.org/draft-04/schema#",q8="Core schema meta-schema",Q8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",U8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},W8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},G8={id:$8,$schema:j8,description:q8,definitions:Q8,type:V8,properties:U8,dependencies:W8,default:{}},db,fD;function z8(){if(fD)return db;fD=1;const c=f1(),s=G8;return db=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},db}var pD;function hD(){if(pD)return hb;pD=1;const s=z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return hb.RuleValidator=o,hb}var mb,dD;function Z8(){var x,g;if(dD)return mb;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=ub(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Gi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Gi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Gi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,mb={Config:O},mb}var mD;function X8(){if(mD)return tb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=ub(),{defaultConfig:p}=M8(),{Config:a}=Z8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return tb.FlatConfigArray=O,tb}var gb,gD;function Y8(){return gD||(gD=1,gb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),gb}var yb,yD;function bD(){if(yD)return yb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return yb={VFile:u},yb}var bb,vD;function H8(){if(vD)return bb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return bb={ParserService:c},bb}var vb={},xD;function K8(){if(xD)return vb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return vb.FileContext=c,vb}var xb,OD;function J8(){if(OD)return xb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return xb={ProcessorService:u},xb}var Ob,SD;function e9(){var Ve,Sx,Oe,Ex;if(SD)return Ob;SD=1;const c=ao,s=jc(),u=kl(),p=Pl(),a=vL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=tp(),{SourceCode:O}=BE(),x=U$(),{ConfigCommentParser:g}=RE(),f=z$(),b=Y$(),S=P8(),E=gE(),k=T8(),D=D8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=X8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=ub(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:V,inactiveFlags:Q}=Y8(),$=$i()("eslint:linter"),W=10,K="espree",te=5,U=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=H8(),{FileContext:pe}=K8(),{ProcessorService:Be}=J8(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(U.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=U.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,U.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(U.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=U.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Vt(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},U.parseListConfig(U.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ue(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ue(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Vt(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Ut(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Ut(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function pr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ve);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!V.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ve,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ue(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ue(Ee),Ne=X.physicalFilename||ve,Ke=pr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ve,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Vt(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},Ob={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},Ob}function t9(){return e9().Linter}var r9=l.Linter=t9();t.Linter=r9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(mH,dc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=vl.define(t);return[r,E_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const yH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class UI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",...Array.isArray(e.class)?e.class:[e.class]]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[OX,gl.of([Fz]),gY(),xX(),pX(xY(new dc.Linter,{languageOptions:{globals:{...dH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),yH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class bH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class vH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(bH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Eu="workshop-data-light@0.3.0__";function Zi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Eu+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Eu+e,t(l.current)),l.persist=h=>localStorage.setItem(Eu+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Eu+e),l}class xH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Lo,{class:"confirm-modal__toolbar"},zt(Hs,{icon:((r=e.cancel)==null?void 0:r.icon)??Y9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Hs,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??e4,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const OH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(xH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var pl,na,Ma;class SH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:Zi(_D.toString(),"code"),data:Zi("export default {}","data"),title:Zi("Sans titre","title"),author:Zi("Inconnu","author"),description:Zi("","description"),frames:Zi(300,"frames"),frameRate:Zi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new yV);or(this,"__module",Ds);An(this,pl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=C9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:s4}),zt("span",null,document.title)),zt("a",{innerHTML:t4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(UI,{class:["editor-code",{"is-active":_9(this.state.dataMode)}],ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(UI,{class:["editor-data",{"is-active":this.state.dataMode}],ref:this.ref("data"),content:this.store.data}),zt(vH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Lo,null,zt(Hs,{class:"data-code-toggler",icon:Cu(this.state.dataMode,t=>t?n4:r4),label:Cu(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Lo,null,zt(Lo,{compact:!0},zt(Hs,{icon:Cu(this.state.running,t=>t?J9:K9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames,active:this.state.running})),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30}))),zt(Lo,null,zt(Hs,{icon:H9,title:"Commencer un nouveau programme","event-click":t=>OH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})}),zt(Hs,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,pl)),Cr(this,pl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"})),zt("footer",null,zt(Hs,{icon:FD,label:"exporter","event-click":async()=>{await SV({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${mv(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}pl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(SH,null)); diff --git a/assets/index-d1749d0e.js b/assets/index-d1749d0e.js new file mode 100644 index 0000000..0238fc4 --- /dev/null +++ b/assets/index-d1749d0e.js @@ -0,0 +1,89 @@ +var iO=Object.defineProperty;var nO=(n,e,t)=>e in n?iO(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var qt=(n,e,t)=>(nO(n,typeof e!="symbol"?e+"":e,t),t),sO=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var ct=(n,e,t)=>(sO(n,e,"read from private field"),t?t.call(n):e.get(n)),us=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)};(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();function D(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}D.f=n=>n.children;function za(n,e){for(const t in e)n[t]=e[t];return n}function de(){}function rO(n,e,t,i){if(i)return{log:de,warn:de,error:de};const s=[];n=n.toUpperCase(),s.push(`%c ${n} `);let r="font-weight:bold;";return e&&(r+=`color:${e};`),t&&(r+=`background-color:${t}`),s.push(r),{log:console.log.bind(console,...s),warn:console.warn.bind(console,...s),error:console.error.bind(console,...s)}}const Ba=["nodes","components","refs","domEvents","storeEvents"];let sn=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let Wr;const hi=(n,e)=>n.substr(0,e.length)===e,Va=n=>(e,t)=>t.classList.toggle(n,e||!1),Gr=(n="textContent",e)=>(t,i)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))i.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){i.removeAttribute(n);return}Wr=t??"",e||(i[n]=Wr),(e||oO.has(n)||hi(n,"data-"))&&i.setAttribute(n,Wr)}};function lO(n,e,t,i,s){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let r=0;r{r.startsWith("--")?n.style.setProperty(r,l):n.style[r]=l};Fr((t??[])[r])?i.append({storeEvents:[{store:t[r],init:!0,fn:o,el:n}]}):o(t[r])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!s&&e in n)try{Gr(e,s)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Gr(e,s)(t,n)}}function aO(n){return Array.isArray(n)?n:[n]}function es(n,e){if(Array.isArray(n))return hO(n,e);if(n instanceof window.Element)return uO(n);if(n===null||typeof n!="object"||!n.vnode)return cO(n);const t=za(za({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return fO(n,t,e);if(n.isInstance)return Na(n,t,e,!0);if(n.isStateless)return dO(n,t,e);if(n.isComponent)return Na(n,t,e)}function hO(n,e){n=aO(n);const t=new sn;for(let i=0;i1?l:l[0];for(const a in s.data)a!=="nodes"&&(r._collector[a]||(r._collector[a]=[]),r._collector[a]=r._collector[a].concat(s.data[a]));s.set({components:[r],refs:[],domEvents:[],storeEvents:[]});for(let a=0;ae.startsWith("data-")).reduce((e,[t,i])=>({...e,[t]:i}),{})}storeSubscribe(e,t,i,s=!0){e.subscribe(t,i),this._storeListeners.push([e,t,i]),s&&t.call(i,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(i){t.refs[e]=i}}refArray(e,t=!1){const i=this.refs[e]||(this.refs[e]=[]);let s=i.length,r,o;return t&&(r=this.refs.__pools||(this.refs.__pools={}),o=r[e]||(r[e]=[]),o.length&&(s=o.pop())),i[s]=null,function(l){i[s]=l,t&&o.push(s)}}refMap(e,t){const i=this.refs[t]||(this.refs[t]=new Map);return function(s){s?i.set(e,s):i.delete(e)}}render(e,t){return Bl(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const i=this._collector.domEvents[e];i.el.removeEventListener(i.evt,i.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const i=this._collector.storeEvents[e];i.store.unsubscribe(i.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const i=this._storeListeners[e];i[0].unsubscribe(i[1],i[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const i=this._parent._collector.components.indexOf(this);~i&&this._parent._collector.components.splice(i,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(r=xO(r),r in Ia)return;Ia[r]=!0;const o=r.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let c=s.length-1;c>=0;c--){const f=s[c];if(f.href===r&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":wO,o||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),o)return new Promise((c,f)=>{h.addEventListener("load",c),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e())};var ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo={},kO={get exports(){return qo},set exports(n){qo=n}};(function(n){(function(e){let t;function i(c,f){const u=c.charCodeAt(f);if(isNaN(u))throw new RangeError("Index "+f+' out of range for string "'+c+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(u<55296||u>57343)return[c.charAt(f),f];if(u>=55296&&u<=56319){if(c.length<=f+1)return[" ",f];const O=c.charCodeAt(f+1);return O<56320||O>57343?[" ",f]:[c.charAt(f)+c.charAt(f+1),f+1]}if(f===0)return[" ",f];const p=c.charCodeAt(f-1);if(p<55296||p>56319)return[" ",f];throw new Error('String "'+c+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(c){return btoa(unescape(encodeURIComponent(c)))}:t=function(c){const f=unescape(encodeURIComponent(c+""));let u="";for(let p,O,g=0,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.charAt(g|0)||(m="=",g%1);u+=m.charAt(63&p>>8-g%1*8)){if(O=f.charCodeAt(g+=3/4),O>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|O}return u}:t=function(c){return Buffer.from(c).toString("base64")};function s(c,f){let u=l(c,f);if((f&&f.fallback!==void 0?f.fallback:s.defaults.fallback)===!0&&u===""){let O="";for(let g=0;g1?u[f[O]]=c[f[O]]:p[f[O]]=c[f[O]];Object.assign(s.charmap,p),Object.assign(s.multicharmap,u)},s.setLocale=function(c){o=r[c]||{}},n.exports?n.exports=s:e.slug=s})(ci)})(kO);function vO(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,i=0,s=0;return function(r){i-=r,s+=r,i<=0&&(e(s),s=0,i=t+i%t)}}var Zr=typeof window>"u"?global:window,di=[],Ii=[],Fi=[],Ft=null,pi=null,An=!1,Vl=!1,Nl,Xt;function Ks(n){n===void 0&&(n=0),pi===null&&(pi=n),Xt=n-pi,Nl+=Xt,pi=n,Ft=An?null:Zr.requestAnimationFrame(Ks),An&&(An=!1);var e;if(Vl){for(e=0;e0||Fi.length>0}function Il(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Fl(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function QO(n,e){Il(Fi,n,e)&&Mr()}function PO(n,e){Il(Ii,n,e)&&Mr()}function $O(n,e){Il(di,n,e)&&of()}function CO(n){Fl(Fi,n)&&Mr()}function AO(n,e){Fl(Ii,n)&&Mr()}function ZO(n){Fl(di,n)&&Wl()}function of(n){An=!1,!Ft&&(n=!!n,pi=null,n?Ks():Ft=Zr.requestAnimationFrame(Ks))}function MO(){Ft||(An=!0,pi=null,Ft=Zr.requestAnimationFrame(Ks))}function Wl(){Ft&&(Zr.cancelAnimationFrame(Ft),Ft=null)}function RO(){Wl(),di.length=0,Ii.length=0,Fi.length=0,Vl=!1,pi=null,Nl=0,Xt=0}const Fa={add:$O,addAfter:PO,addBefore:QO,remove:ZO,removeAfter:AO,removeBefore:CO,start:of,stop:Wl,time:Nl,dt:Xt,requestOnce:MO,dispose:RO};function Wa(n,e,t,i){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!i}function Ur(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let lf=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,i,s,r){let o=this._first;for(;o;)o.fn.call(o.ctx,e,t,i,s,r),o.once&&this.unsubscribe(o),o=o.next}subscribe(e,t,i){const s=new Wa(this,e,t,i);return this._first?(this._last.next=s,s.prev=this._last,this._last=s):(this._first=s,this._last=s),s}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof Wa)return Ur(this,e);t||(t=null);let i=this._first;for(;i;)i.fn===e&&i.ctx===t&&Ur(this,i),i=i.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Ur(this,e),e=e.next}},TO=class extends lf{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},af=class extends TO{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let i=this._first;for(;i;)i.fn.call(i.ctx,this.current,this.previous),i.once&&this.unsubscribe(i),i=i.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const i=e(this.current);this.set(i!==void 0?i:this.current,t)}};function z(n){return new af(n)}function Hr(n,e){const t=new af,i=t.set.bind(t);delete t.set;const s=Array.isArray(n);let r=s?new Array(n.length):null;if(s)for(let l=0,a=n.length;l(...e)=>{for(const t of e){if(t instanceof lf)return t;if(t!==void 0)return n(t)}return n(null)},EO="ui-backdrop-1l3kn107",LO={backdrop:EO,"loader-spin":"ui-loader-spin-1l3kn1"};class DO extends vt{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:F(z)(e["store-locked"],e.locked)}}template(e,t){return D("div",{...this.dataProps,id:e.id,class:[LO.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":i=>(e["event-click"]??de)(i,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??de)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||de)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const _O="ui-button-1urez107",qO="ui-button__label-1urez161",XO="ui-button__icon-1urez171",Kr={button:_O,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:qO,"is-active":"is-active","is-waiting":"is-waiting",button__icon:XO,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Zt extends vt{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:F(z)(e["store-label"],e.label),title:F(z)(e["store-title"],e.title),icon:F(z)(e["store-icon"],e.icon),active:F(z)(e["store-active"],e.active),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden),waiting:F(z)(e["store-waiting"],e.waiting)}}template(e,t){return D("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Kr.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("span",{ref:this.ref("icon"),class:Kr.button__icon,"store-innerHTML":t.icon}),D("label",{class:Kr.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const jO="ui-input-ada4i107",YO="ui-input__icon-ada4i150",dn={input:jO,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:YO,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class pn extends vt{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:F(z)(e["store-value"],e.value),files:F(z)(e["store-files"],e.files),placeholder:F(z)(e["store-placeholder"],e.placeholder),title:F(z)(e["store-title"],e.title),label:F(z)(e["store-label"],e.label),before:F(z)(e["store-before"],e.before),after:F(z)(e["store-after"],e.after),icon:F(z)(e["store-icon"],e.icon),accept:F(z)(e["store-accept"],e.accept??"*"),multiple:F(z)(e["store-multiple"],e.multiple??"*"),min:F(z)(e["store-min"],e.min),max:F(z)(e["store-max"],e.max),step:F(z)(e["store-step"],e.step),active:F(z)(e["store-active"],e.active),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden),waiting:F(z)(e["store-waiting"],e.waiting)}}template(e,t){return D("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[dn.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("span",{ref:this.ref("icon"),class:dn.input__icon,"store-innerHTML":t.icon}),D("label",{class:dn.input__label,"store-innerHTML":t.label}),D("label",{class:dn.input__before,"store-innerHTML":t.before}),D("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":i=>i.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":i=>(e["event-blur"]??de)(i,this)}),D("label",{class:dn.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??de)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??de)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??de)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??de)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const zO="ui-modal-1ng3s107",BO="ui-modal__header-1ng3s119",VO="ui-modal__title-1ng3s125",NO="ui-modal__content-1ng3s129",On={modal:zO,modal__header:BO,modal__title:VO,modal__content:NO,"loader-spin":"ui-loader-spin-1ng3s1"},IO=` + + +`;class hf extends vt{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:F(z)(e["store-title"],e.title),tabs:F(z)(e["store-tabs"],e.tabs),locked:F(z)(e["store-locked"],e.locked)}}template(e,t){return D(DO,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},D("div",{...this.dataProps,id:e.id,class:[On.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},D("header",{class:On.modal__header},D(Zt,{class:On.modal__title,icon:e.icon,"store-label":t.title}),D(Zt,{class:On.modal__close,icon:IO,"store-hidden":t.locked,"event-click":this.handleClose})),D("div",{class:On.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const FO="ui-toolbar-1r0eh107",WO={toolbar:FO,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Ys extends vt{beforeRender(e){this.state={compact:F(z)(e["store-compact"],e.compact),disabled:F(z)(e["store-disabled"],e.disabled),hidden:F(z)(e["store-hidden"],e.hidden)}}template(e,t){return D("div",{...this.dataProps,id:e.id,class:[WO.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":i=>(e["event-mouseenter"]??de)(i,this),"event-mouseleave":i=>(e["event-mouseleave"]??de)(i,this)},e.children)}}function Ga(n,e,t){var i,s,r,o,l;e==null&&(e=100);function a(){var c=Date.now()-o;c=0?i=setTimeout(a,e-c):(i=null,t||(l=n.apply(r,s),r=s=null))}var h=function(){r=this,s=arguments,o=Date.now();var c=t&&!i;return i||(i=setTimeout(a,e)),c&&(l=n.apply(r,s),r=s=null),l};return h.clear=function(){i&&(clearTimeout(i),i=null)},h.flush=function(){i&&(l=n.apply(r,s),r=s=null,clearTimeout(i),i=null)},h}Ga.debounce=Ga;const GO=` + + +`,UO=` + + + +`,HO=` + + + +`,KO=` + + + +`,JO=` + + +`,eg=` + + + + + + +`,Ua=` + + + + +`,tg=` + + + + +`,ig=` + + + + +`,Ha=`export function setup () { + console.log('setup'); +} + +export function draw () { + console.log(frameCount); +} +`,ng=` + + +`;function cf(n,e,t){return Math.max(e,Math.min(n,t))}function ff(n,e,t){return n>t?n%t:ndg(pg(e,n),t),Gl=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=yi(n[e],0,255)):e===3&&(n[e]=yi(n[e],0,1));return n},pf={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])pf[`[object ${n}]`]=n.toLowerCase();function N(n){return pf[Object.prototype.toString.call(n)]||"object"}const Y=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):N(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),rn=n=>{if(n.length<2)return null;const e=n.length-1;return N(n[e])=="string"?n[e].toLowerCase():null},{PI:Rr,min:Of,max:gf}=Math,Ke=n=>Math.round(n*100)/100,jo=n=>Math.round(n*100)/100,Ct=Rr*2,Jr=Rr/3,Og=Rr/180,gg=180/Rr;function mf(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const j={format:{},autodetect:[]};class ${constructor(...e){const t=this;if(N(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let i=rn(e),s=!1;if(!i){s=!0,j.sorted||(j.autodetect=j.autodetect.sort((r,o)=>o.p-r.p),j.sorted=!0);for(let r of j.autodetect)if(i=r.test(...e),i)break}if(j.format[i]){const r=j.format[i].apply(null,s?e:e.slice(0,-1));t._rgb=Gl(r)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return N(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const mg="3.1.2",V=(...n)=>new $(...n);V.version=mg;const Wi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},bg=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,yg=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,bf=n=>{if(n.match(bg)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,i=e>>8&255,s=e&255;return[t,i,s,1]}if(n.match(yg)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,i=e>>16&255,s=e>>8&255,r=Math.round((e&255)/255*100)/100;return[t,i,s,r]}throw new Error(`unknown hex color: ${n}`)},{round:ps}=Math,yf=(...n)=>{let[e,t,i,s]=Y(n,"rgba"),r=rn(n)||"auto";s===void 0&&(s=1),r==="auto"&&(r=s<1?"rgba":"rgb"),e=ps(e),t=ps(t),i=ps(i);let l="000000"+(e<<16|t<<8|i).toString(16);l=l.substr(l.length-6);let a="0"+ps(s*255).toString(16);switch(a=a.substr(a.length-2),r.toLowerCase()){case"rgba":return`#${l}${a}`;case"argb":return`#${a}${l}`;default:return`#${l}`}};$.prototype.name=function(){const n=yf(this._rgb,"rgb");for(let e of Object.keys(Wi))if(Wi[e]===n)return e.toLowerCase();return n};j.format.named=n=>{if(n=n.toLowerCase(),Wi[n])return bf(Wi[n]);throw new Error("unknown color name: "+n)};j.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&Wi[n.toLowerCase()])return"named"}});$.prototype.alpha=function(n,e=!1){return n!==void 0&&N(n)==="number"?e?(this._rgb[3]=n,this):new $([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};$.prototype.clipped=function(){return this._rgb._clipped||!1};const xt={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},wg=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Mt(n){const e=wg.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);xt.labWhitePoint=n,xt.Xn=e[0],xt.Zn=e[1]}function Ln(){return xt.labWhitePoint}const Ul=(...n)=>{n=Y(n,"lab");const[e,t,i]=n,[s,r,o]=xg(e,t,i),[l,a,h]=wf(s,r,o);return[l,a,h,n.length>3?n[3]:1]},xg=(n,e,t)=>{const{kE:i,kK:s,kKE:r,Xn:o,Yn:l,Zn:a}=xt,h=(n+16)/116,c=.002*e+h,f=h-.005*t,u=c*c*c,p=f*f*f,O=u>i?u:(116*c-16)/s,g=n>r?Math.pow((n+16)/116,3):n/s,m=p>i?p:(116*f-16)/s,b=O*o,w=g*l,S=m*a;return[b,w,S]},eo=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},wf=(n,e,t)=>{const{MtxAdaptMa:i,MtxAdaptMaI:s,MtxXYZ2RGB:r,RefWhiteRGB:o,Xn:l,Yn:a,Zn:h}=xt,c=l*i.m00+a*i.m10+h*i.m20,f=l*i.m01+a*i.m11+h*i.m21,u=l*i.m02+a*i.m12+h*i.m22,p=o.X*i.m00+o.Y*i.m10+o.Z*i.m20,O=o.X*i.m01+o.Y*i.m11+o.Z*i.m21,g=o.X*i.m02+o.Y*i.m12+o.Z*i.m22,m=(n*i.m00+e*i.m10+t*i.m20)*(p/c),b=(n*i.m01+e*i.m11+t*i.m21)*(O/f),w=(n*i.m02+e*i.m12+t*i.m22)*(g/u),S=m*s.m00+b*s.m10+w*s.m20,Q=m*s.m01+b*s.m11+w*s.m21,k=m*s.m02+b*s.m12+w*s.m22,x=eo(S*r.m00+Q*r.m10+k*r.m20),y=eo(S*r.m01+Q*r.m11+k*r.m21),P=eo(S*r.m02+Q*r.m12+k*r.m22);return[x*255,y*255,P*255]},Hl=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=xf(e,t,i),[a,h,c]=Sg(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function Sg(n,e,t){const{Xn:i,Yn:s,Zn:r,kE:o,kK:l}=xt,a=n/i,h=e/s,c=t/r,f=a>o?Math.pow(a,1/3):(l*a+16)/116,u=h>o?Math.pow(h,1/3):(l*h+16)/116,p=c>o?Math.pow(c,1/3):(l*c+16)/116;return[116*u-16,500*(f-u),200*(u-p)]}function to(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const xf=(n,e,t)=>{n=to(n/255),e=to(e/255),t=to(t/255);const{MtxRGB2XYZ:i,MtxAdaptMa:s,MtxAdaptMaI:r,Xn:o,Yn:l,Zn:a,As:h,Bs:c,Cs:f}=xt;let u=n*i.m00+e*i.m10+t*i.m20,p=n*i.m01+e*i.m11+t*i.m21,O=n*i.m02+e*i.m12+t*i.m22;const g=o*s.m00+l*s.m10+a*s.m20,m=o*s.m01+l*s.m11+a*s.m21,b=o*s.m02+l*s.m12+a*s.m22;let w=u*s.m00+p*s.m10+O*s.m20,S=u*s.m01+p*s.m11+O*s.m21,Q=u*s.m02+p*s.m12+O*s.m22;return w*=g/h,S*=m/c,Q*=b/f,u=w*r.m00+S*r.m10+Q*r.m20,p=w*r.m01+S*r.m11+Q*r.m21,O=w*r.m02+S*r.m12+Q*r.m22,[u,p,O]};$.prototype.lab=function(){return Hl(this._rgb)};const kg=(...n)=>new $(...n,"lab");Object.assign(V,{lab:kg,getLabWhitePoint:Ln,setLabWhitePoint:Mt});j.format.lab=Ul;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"lab"),N(n)==="array"&&n.length===3)return"lab"}});$.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=xt.Kn*n,new $(t,"lab").alpha(e.alpha(),!0)};$.prototype.brighten=function(n=1){return this.darken(-n)};$.prototype.darker=$.prototype.darken;$.prototype.brighter=$.prototype.brighten;$.prototype.get=function(n){const[e,t]=n.split("."),i=this[e]();if(t){const s=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(s>-1)return i[s];throw new Error(`unknown channel ${t} in mode ${e}`)}else return i};const{pow:vg}=Math,Qg=1e-7,Pg=20;$.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&N(n)==="number"){if(n===0)return new $([0,0,0,this._rgb[3]],"rgb");if(n===1)return new $([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),i=Pg;const s=(o,l)=>{const a=o.interpolate(l,.5,e),h=a.luminance();return Math.abs(n-h)n?s(o,a):s(a,l)},r=(t>n?s(new $([0,0,0]),this):s(this,new $([255,255,255]))).rgb();return new $([...r,this._rgb[3]])}return $g(...this._rgb.slice(0,3))};const $g=(n,e,t)=>(n=io(n),e=io(e),t=io(t),.2126*n+.7152*e+.0722*t),io=n=>(n/=255,n<=.03928?n/12.92:vg((n+.055)/1.055,2.4)),$e={},Gi=(n,e,t=.5,...i)=>{let s=i[0]||"lrgb";if(!$e[s]&&!i.length&&(s=Object.keys($e)[0]),!$e[s])throw new Error(`interpolation mode ${s} is not defined`);return N(n)!=="object"&&(n=new $(n)),N(e)!=="object"&&(e=new $(e)),$e[s](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};$.prototype.mix=$.prototype.interpolate=function(n,e=.5,...t){return Gi(this,n,e,...t)};$.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new $([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:Cg,cos:Ag}=Math,Sf=(...n)=>{let[e,t,i]=Y(n,"lch");return isNaN(i)&&(i=0),i=i*Og,[e,Ag(i)*t,Cg(i)*t]},Kl=(...n)=>{n=Y(n,"lch");const[e,t,i]=n,[s,r,o]=Sf(e,t,i),[l,a,h]=Ul(s,r,o);return[l,a,h,n.length>3?n[3]:1]},Zg=(...n)=>{const e=mf(Y(n,"hcl"));return Kl(...e)},{sqrt:Mg,atan2:Rg,round:Tg}=Math,kf=(...n)=>{const[e,t,i]=Y(n,"lab"),s=Mg(t*t+i*i);let r=(Rg(i,t)*gg+360)%360;return Tg(s*1e4)===0&&(r=Number.NaN),[e,s,r]},Jl=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=Hl(e,t,i),[a,h,c]=kf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};$.prototype.lch=function(){return Jl(this._rgb)};$.prototype.hcl=function(){return mf(Jl(this._rgb))};const Eg=(...n)=>new $(...n,"lch"),Lg=(...n)=>new $(...n,"hcl");Object.assign(V,{lch:Eg,hcl:Lg});j.format.lch=Kl;j.format.hcl=Zg;["lch","hcl"].forEach(n=>j.autodetect.push({p:2,test:(...e)=>{if(e=Y(e,n),N(e)==="array"&&e.length===3)return n}}));$.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=xt.Kn*n,t[1]<0&&(t[1]=0),new $(t,"lch").alpha(e.alpha(),!0)};$.prototype.desaturate=function(n=1){return this.saturate(-n)};$.prototype.set=function(n,e,t=!1){const[i,s]=n.split("."),r=this[i]();if(s){const o=i.indexOf(s)-(i.substr(0,2)==="ok"?2:0);if(o>-1){if(N(e)=="string")switch(e.charAt(0)){case"+":r[o]+=+e;break;case"-":r[o]+=+e;break;case"*":r[o]*=+e.substr(1);break;case"/":r[o]/=+e.substr(1);break;default:r[o]=+e}else if(N(e)==="number")r[o]=e;else throw new Error("unsupported value for Color.set");const l=new $(r,i);return t?(this._rgb=l._rgb,this):l}throw new Error(`unknown channel ${s} in mode ${i}`)}else return r};$.prototype.tint=function(n=.5,...e){return Gi(this,"white",n,...e)};$.prototype.shade=function(n=.5,...e){return Gi(this,"black",n,...e)};const Dg=(n,e,t)=>{const i=n._rgb,s=e._rgb;return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"rgb")};$e.rgb=Dg;const{sqrt:no,pow:Ci}=Math,_g=(n,e,t)=>{const[i,s,r]=n._rgb,[o,l,a]=e._rgb;return new $(no(Ci(i,2)*(1-t)+Ci(o,2)*t),no(Ci(s,2)*(1-t)+Ci(l,2)*t),no(Ci(r,2)*(1-t)+Ci(a,2)*t),"rgb")};$e.lrgb=_g;const qg=(n,e,t)=>{const i=n.lab(),s=e.lab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"lab")};$e.lab=qg;const on=(n,e,t,i)=>{let s,r;i==="hsl"?(s=n.hsl(),r=e.hsl()):i==="hsv"?(s=n.hsv(),r=e.hsv()):i==="hcg"?(s=n.hcg(),r=e.hcg()):i==="hsi"?(s=n.hsi(),r=e.hsi()):i==="lch"||i==="hcl"?(i="hcl",s=n.hcl(),r=e.hcl()):i==="oklch"&&(s=n.oklch().reverse(),r=e.oklch().reverse());let o,l,a,h,c,f;(i.substr(0,1)==="h"||i==="oklch")&&([o,a,c]=s,[l,h,f]=r);let u,p,O,g;return!isNaN(o)&&!isNaN(l)?(l>o&&l-o>180?g=l-(o+360):l180?g=l+360-o:g=l-o,p=o+t*g):isNaN(o)?isNaN(l)?p=Number.NaN:(p=l,(c==1||c==0)&&i!="hsv"&&(u=h)):(p=o,(f==1||f==0)&&i!="hsv"&&(u=a)),u===void 0&&(u=a+t*(h-a)),O=c+t*(f-c),i==="oklch"?new $([O,u,p],i):new $([p,u,O],i)},vf=(n,e,t)=>on(n,e,t,"lch");$e.lch=vf;$e.hcl=vf;const Xg=n=>{if(N(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,i=n&255;return[e,t,i,1]}throw new Error("unknown num color: "+n)},jg=(...n)=>{const[e,t,i]=Y(n,"rgb");return(e<<16)+(t<<8)+i};$.prototype.num=function(){return jg(this._rgb)};const Yg=(...n)=>new $(...n,"num");Object.assign(V,{num:Yg});j.format.num=Xg;j.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&N(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const zg=(n,e,t)=>{const i=n.num(),s=e.num();return new $(i+t*(s-i),"num")};$e.num=zg;const{floor:Bg}=Math,Vg=(...n)=>{n=Y(n,"hcg");let[e,t,i]=n,s,r,o;i=i*255;const l=t*255;if(t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const a=Bg(e),h=e-a,c=i*(1-t),f=c+l*(1-h),u=c+l*h,p=c+l;switch(a){case 0:[s,r,o]=[p,u,c];break;case 1:[s,r,o]=[f,p,c];break;case 2:[s,r,o]=[c,p,u];break;case 3:[s,r,o]=[c,f,p];break;case 4:[s,r,o]=[u,c,p];break;case 5:[s,r,o]=[p,c,f];break}}return[s,r,o,n.length>3?n[3]:1]},Ng=(...n)=>{const[e,t,i]=Y(n,"rgb"),s=Of(e,t,i),r=gf(e,t,i),o=r-s,l=o*100/255,a=s/(255-o)*100;let h;return o===0?h=Number.NaN:(e===r&&(h=(t-i)/o),t===r&&(h=2+(i-e)/o),i===r&&(h=4+(e-t)/o),h*=60,h<0&&(h+=360)),[h,l,a]};$.prototype.hcg=function(){return Ng(this._rgb)};const Ig=(...n)=>new $(...n,"hcg");V.hcg=Ig;j.format.hcg=Vg;j.autodetect.push({p:1,test:(...n)=>{if(n=Y(n,"hcg"),N(n)==="array"&&n.length===3)return"hcg"}});const Fg=(n,e,t)=>on(n,e,t,"hcg");$e.hcg=Fg;const{cos:Ai}=Math,Wg=(...n)=>{n=Y(n,"hsi");let[e,t,i]=n,s,r,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,s=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,r=1-(o+s)):e<2/3?(e-=1/3,s=(1-t)/3,r=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,o=1-(s+r)):(e-=2/3,r=(1-t)/3,o=(1+t*Ai(Ct*e)/Ai(Jr-Ct*e))/3,s=1-(r+o)),s=yi(i*s*3),r=yi(i*r*3),o=yi(i*o*3),[s*255,r*255,o*255,n.length>3?n[3]:1]},{min:Gg,sqrt:Ug,acos:Hg}=Math,Kg=(...n)=>{let[e,t,i]=Y(n,"rgb");e/=255,t/=255,i/=255;let s;const r=Gg(e,t,i),o=(e+t+i)/3,l=o>0?1-r/o:0;return l===0?s=NaN:(s=(e-t+(e-i))/2,s/=Ug((e-t)*(e-t)+(e-i)*(t-i)),s=Hg(s),i>t&&(s=Ct-s),s/=Ct),[s*360,l,o]};$.prototype.hsi=function(){return Kg(this._rgb)};const Jg=(...n)=>new $(...n,"hsi");V.hsi=Jg;j.format.hsi=Wg;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsi"),N(n)==="array"&&n.length===3)return"hsi"}});const em=(n,e,t)=>on(n,e,t,"hsi");$e.hsi=em;const Yo=(...n)=>{n=Y(n,"hsl");const[e,t,i]=n;let s,r,o;if(t===0)s=r=o=i*255;else{const l=[0,0,0],a=[0,0,0],h=i<.5?i*(1+t):i+t-i*t,c=2*i-h,f=e/360;l[0]=f+1/3,l[1]=f,l[2]=f-1/3;for(let u=0;u<3;u++)l[u]<0&&(l[u]+=1),l[u]>1&&(l[u]-=1),6*l[u]<1?a[u]=c+(h-c)*6*l[u]:2*l[u]<1?a[u]=h:3*l[u]<2?a[u]=c+(h-c)*(2/3-l[u])*6:a[u]=c;[s,r,o]=[a[0]*255,a[1]*255,a[2]*255]}return n.length>3?[s,r,o,n[3]]:[s,r,o,1]},Qf=(...n)=>{n=Y(n,"rgba");let[e,t,i]=n;e/=255,t/=255,i/=255;const s=Of(e,t,i),r=gf(e,t,i),o=(r+s)/2;let l,a;return r===s?(l=0,a=Number.NaN):l=o<.5?(r-s)/(r+s):(r-s)/(2-r-s),e==r?a=(t-i)/(r-s):t==r?a=2+(i-e)/(r-s):i==r&&(a=4+(e-t)/(r-s)),a*=60,a<0&&(a+=360),n.length>3&&n[3]!==void 0?[a,l,o,n[3]]:[a,l,o]};$.prototype.hsl=function(){return Qf(this._rgb)};const tm=(...n)=>new $(...n,"hsl");V.hsl=tm;j.format.hsl=Yo;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsl"),N(n)==="array"&&n.length===3)return"hsl"}});const im=(n,e,t)=>on(n,e,t,"hsl");$e.hsl=im;const{floor:nm}=Math,sm=(...n)=>{n=Y(n,"hsv");let[e,t,i]=n,s,r,o;if(i*=255,t===0)s=r=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=nm(e),a=e-l,h=i*(1-t),c=i*(1-t*a),f=i*(1-t*(1-a));switch(l){case 0:[s,r,o]=[i,f,h];break;case 1:[s,r,o]=[c,i,h];break;case 2:[s,r,o]=[h,i,f];break;case 3:[s,r,o]=[h,c,i];break;case 4:[s,r,o]=[f,h,i];break;case 5:[s,r,o]=[i,h,c];break}}return[s,r,o,n.length>3?n[3]:1]},{min:rm,max:om}=Math,lm=(...n)=>{n=Y(n,"rgb");let[e,t,i]=n;const s=rm(e,t,i),r=om(e,t,i),o=r-s;let l,a,h;return h=r/255,r===0?(l=Number.NaN,a=0):(a=o/r,e===r&&(l=(t-i)/o),t===r&&(l=2+(i-e)/o),i===r&&(l=4+(e-t)/o),l*=60,l<0&&(l+=360)),[l,a,h]};$.prototype.hsv=function(){return lm(this._rgb)};const am=(...n)=>new $(...n,"hsv");V.hsv=am;j.format.hsv=sm;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"hsv"),N(n)==="array"&&n.length===3)return"hsv"}});const hm=(n,e,t)=>on(n,e,t,"hsv");$e.hsv=hm;function Js(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(o=>[o]));let i=e[0].length,s=e[0].map((o,l)=>e.map(a=>a[l])),r=n.map(o=>s.map(l=>Array.isArray(o)?o.reduce((a,h,c)=>a+h*(l[c]||0),0):l.reduce((a,h)=>a+h*o,0)));return t===1&&(r=r[0]),i===1?r.map(o=>o[0]):r}const ea=(...n)=>{n=Y(n,"lab");const[e,t,i,...s]=n,[r,o,l]=cm([e,t,i]),[a,h,c]=wf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]};function cm(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],i=Js(t,n);return Js(e,i.map(s=>s**3))}const ta=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),r=xf(e,t,i);return[...fm(r),...s.length>0&&s[0]<1?[s[0]]:[]]};function fm(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],i=Js(e,n);return Js(t,i.map(s=>Math.cbrt(s)))}$.prototype.oklab=function(){return ta(this._rgb)};const um=(...n)=>new $(...n,"oklab");Object.assign(V,{oklab:um});j.format.oklab=ea;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklab"),N(n)==="array"&&n.length===3)return"oklab"}});const dm=(n,e,t)=>{const i=n.oklab(),s=e.oklab();return new $(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"oklab")};$e.oklab=dm;const pm=(n,e,t)=>on(n,e,t,"oklch");$e.oklch=pm;const{pow:so,sqrt:ro,PI:oo,cos:Ka,sin:Ja,atan2:Om}=Math,gm=(n,e="lrgb",t=null)=>{const i=n.length;t||(t=Array.from(new Array(i)).map(()=>1));const s=i/t.reduce(function(f,u){return f+u});if(t.forEach((f,u)=>{t[u]*=s}),n=n.map(f=>new $(f)),e==="lrgb")return mm(n,t);const r=n.shift(),o=r.get(e),l=[];let a=0,h=0;for(let f=0;f{const p=f.get(e);c+=f.alpha()*t[u+1];for(let O=0;O=360;)u-=360;o[f]=u}else o[f]=o[f]/l[f];return c/=i,new $(o,e).alpha(c>.99999?1:c,!0)},mm=(n,e)=>{const t=n.length,i=[0,0,0,0];for(let s=0;s.9999999&&(i[3]=1),new $(Gl(i))},{pow:bm}=Math;function er(n){let e="rgb",t=V("#ccc"),i=0,s=[0,1],r=[],o=[0,0],l=!1,a=[],h=!1,c=0,f=1,u=!1,p={},O=!0,g=1;const m=function(y){if(y=y||["#fff","#000"],y&&N(y)==="string"&&V.brewer&&V.brewer[y.toLowerCase()]&&(y=V.brewer[y.toLowerCase()]),N(y)==="array"){y.length===1&&(y=[y[0],y[0]]),y=y.slice(0);for(let P=0;P=l[A];)A++;return A-1}return 0};let w=y=>y,S=y=>y;const Q=function(y,P){let A,M;if(P==null&&(P=!1),isNaN(y)||y===null)return t;P?M=y:l&&l.length>2?M=b(y)/(l.length-2):f!==c?M=(y-c)/(f-c):M=1,M=S(M),P||(M=w(M)),g!==1&&(M=bm(M,g)),M=o[0]+M*(1-o[0]-o[1]),M=yi(M,0,1);const T=Math.floor(M*1e4);if(O&&p[T])A=p[T];else{if(N(a)==="array")for(let C=0;C=q&&C===r.length-1){A=a[C];break}if(M>q&&Mp={};m(n);const x=function(y){const P=V(Q(y));return h&&P[h]?P[h]():P};return x.classes=function(y){if(y!=null){if(N(y)==="array")l=y,s=[y[0],y[y.length-1]];else{const P=V.analyze(s);y===0?l=[P.min,P.max]:l=V.limits(P,"e",y)}return x}return l},x.domain=function(y){if(!arguments.length)return s;c=y[0],f=y[y.length-1],r=[];const P=a.length;if(y.length===P&&c!==f)for(let A of Array.from(y))r.push((A-c)/(f-c));else{for(let A=0;A2){const A=y.map((T,C)=>C/(y.length-1)),M=y.map(T=>(T-c)/(f-c));M.every((T,C)=>A[C]===T)||(S=T=>{if(T<=0||T>=1)return T;let C=0;for(;T>=M[C+1];)C++;const q=(T-M[C])/(M[C+1]-M[C]);return A[C]+q*(A[C+1]-A[C])})}}return s=[c,f],x},x.mode=function(y){return arguments.length?(e=y,k(),x):e},x.range=function(y,P){return m(y),x},x.out=function(y){return h=y,x},x.spread=function(y){return arguments.length?(i=y,x):i},x.correctLightness=function(y){return y==null&&(y=!0),u=y,k(),u?w=function(P){const A=Q(0,!0).lab()[0],M=Q(1,!0).lab()[0],T=A>M;let C=Q(P,!0).lab()[0];const q=A+(M-A)*P;let B=C-q,U=0,re=1,me=20;for(;Math.abs(B)>.01&&me-- >0;)(function(){return T&&(B*=-1),B<0?(U=P,P+=(re-P)*.5):(re=P,P+=(U-P)*.5),C=Q(P,!0).lab()[0],B=C-q})();return P}:w=P=>P,x},x.padding=function(y){return y!=null?(N(y)==="number"&&(y=[y,y]),o=y,x):o},x.colors=function(y,P){arguments.length<2&&(P="hex");let A=[];if(arguments.length===0)A=a.slice(0);else if(y===1)A=[x(.5)];else if(y>1){const M=s[0],T=s[1]-M;A=ym(0,y,!1).map(C=>x(M+C/(y-1)*T))}else{n=[];let M=[];if(l&&l.length>2)for(let T=1,C=l.length,q=1<=C;q?TC;q?T++:T--)M.push((l[T-1]+l[T])*.5);else M=s;A=M.map(T=>x(T))}return V[P]&&(A=A.map(M=>M[P]())),A},x.cache=function(y){return y!=null?(O=y,x):O},x.gamma=function(y){return y!=null?(g=y,x):g},x.nodata=function(y){return y!=null?(t=V(y),x):t},x}function ym(n,e,t){let i=[],s=nr;s?o++:o--)i.push(o);return i}const wm=function(n){let e=[1,1];for(let t=1;tnew $(r)),n.length===2)[t,i]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>t[l]+r*(i[l]-t[l]));return new $(o,"lab")};else if(n.length===3)[t,i,s]=n.map(r=>r.lab()),e=function(r){const o=[0,1,2].map(l=>(1-r)*(1-r)*t[l]+2*(1-r)*r*i[l]+r*r*s[l]);return new $(o,"lab")};else if(n.length===4){let r;[t,i,s,r]=n.map(o=>o.lab()),e=function(o){const l=[0,1,2].map(a=>(1-o)*(1-o)*(1-o)*t[a]+3*(1-o)*(1-o)*o*i[a]+3*(1-o)*o*o*s[a]+o*o*o*r[a]);return new $(l,"lab")}}else if(n.length>=5){let r,o,l;r=n.map(a=>a.lab()),l=n.length-1,o=wm(l),e=function(a){const h=1-a,c=[0,1,2].map(f=>r.reduce((u,p,O)=>u+o[O]*h**(l-O)*a**O*p[f],0));return new $(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},Sm=n=>{const e=xm(n);return e.scale=()=>er(e),e},{round:Pf}=Math;$.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Pf)};$.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:Pf(e):e)};const km=(...n)=>new $(...n,"rgb");Object.assign(V,{rgb:km});j.format.rgb=(...n)=>{const e=Y(n,"rgba");return e[3]===void 0&&(e[3]=1),e};j.autodetect.push({p:3,test:(...n)=>{if(n=Y(n,"rgba"),N(n)==="array"&&(n.length===3||n.length===4&&N(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ot=(n,e,t)=>{if(!ot[t])throw new Error("unknown blend mode "+t);return ot[t](n,e)},ii=n=>(e,t)=>{const i=V(t).rgb(),s=V(e).rgb();return V.rgb(n(i,s))},ni=n=>(e,t)=>{const i=[];return i[0]=n(e[0],t[0]),i[1]=n(e[1],t[1]),i[2]=n(e[2],t[2]),i},vm=n=>n,Qm=(n,e)=>n*e/255,Pm=(n,e)=>n>e?e:n,$m=(n,e)=>n>e?n:e,Cm=(n,e)=>255*(1-(1-n/255)*(1-e/255)),Am=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),Zm=(n,e)=>255*(1-(1-e/255)/(n/255)),Mm=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ot.normal=ii(ni(vm));ot.multiply=ii(ni(Qm));ot.screen=ii(ni(Cm));ot.overlay=ii(ni(Am));ot.darken=ii(ni(Pm));ot.lighten=ii(ni($m));ot.dodge=ii(ni(Mm));ot.burn=ii(ni(Zm));const{pow:Rm,sin:Tm,cos:Em}=Math;function Lm(n=300,e=-1.5,t=1,i=1,s=[0,1]){let r=0,o;N(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);const l=function(a){const h=Ct*((n+120)/360+e*a),c=Rm(s[0]+o*a,i),u=(r!==0?t[0]+a*r:t)*c*(1-c)/2,p=Em(h),O=Tm(h),g=c+u*(-.14861*p+1.78277*O),m=c+u*(-.29227*p-.90649*O),b=c+u*(1.97294*p);return V(Gl([g*255,m*255,b*255,1]))};return l.start=function(a){return a==null?n:(n=a,l)},l.rotations=function(a){return a==null?e:(e=a,l)},l.gamma=function(a){return a==null?i:(i=a,l)},l.hue=function(a){return a==null?t:(t=a,N(t)==="array"?(r=t[1]-t[0],r===0&&(t=t[1])):r=0,l)},l.lightness=function(a){return a==null?s:(N(a)==="array"?(s=a,o=a[1]-a[0]):(s=[a,a],o=0),l)},l.scale=()=>V.scale(l),l.hue(t),l}const Dm="0123456789abcdef",{floor:_m,random:qm}=Math,Xm=()=>{let n="#";for(let e=0;e<6;e++)n+=Dm.charAt(_m(qm()*16));return new $(n,"hex")},{log:eh,pow:jm,floor:Ym,abs:zm}=Math;function $f(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return N(n)==="object"&&(n=Object.values(n)),n.forEach(i=>{e&&N(i)==="object"&&(i=i[e]),i!=null&&!isNaN(i)&&(t.values.push(i),t.sum+=i,it.max&&(t.max=i),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(i,s)=>Cf(t,i,s),t}function Cf(n,e="equal",t=7){N(n)=="array"&&(n=$f(n));const{min:i,max:s}=n,r=n.values.sort((l,a)=>l-a);if(t===1)return[i,s];const o=[];if(e.substr(0,1)==="c"&&(o.push(i),o.push(s)),e.substr(0,1)==="e"){o.push(i);for(let l=1;l 0");const l=Math.LOG10E*eh(i),a=Math.LOG10E*eh(s);o.push(i);for(let h=1;h200&&(f=!1)}const O={};for(let m=0;mm-b),o.push(g[0]);for(let m=1;m{n=new $(n),e=new $(e);const t=n.luminance(),i=e.luminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const th=.027,Vm=5e-4,Nm=.1,ih=1.14,Os=.022,nh=1.414,Im=(n,e)=>{n=new $(n),e=new $(e),n.alpha()<1&&(n=Gi(e,n,n.alpha(),"rgb"));const t=sh(...n.rgb()),i=sh(...e.rgb()),s=t>=Os?t:t+Math.pow(Os-t,nh),r=i>=Os?i:i+Math.pow(Os-i,nh),o=Math.pow(r,.56)-Math.pow(s,.57),l=Math.pow(r,.65)-Math.pow(s,.62),a=Math.abs(r-s)0?a-th:a+th)*100};function sh(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:$t,pow:oe,min:Fm,max:Wm,atan2:rh,abs:oh,cos:gs,sin:lh,exp:Gm,PI:ah}=Math;function Um(n,e,t=1,i=1,s=1){var r=function(Ee){return 360*Ee/(2*ah)},o=function(Ee){return 2*ah*Ee/360};n=new $(n),e=new $(e);const[l,a,h]=Array.from(n.lab()),[c,f,u]=Array.from(e.lab()),p=(l+c)/2,O=$t(oe(a,2)+oe(h,2)),g=$t(oe(f,2)+oe(u,2)),m=(O+g)/2,b=.5*(1-$t(oe(m,7)/(oe(m,7)+oe(25,7)))),w=a*(1+b),S=f*(1+b),Q=$t(oe(w,2)+oe(h,2)),k=$t(oe(S,2)+oe(u,2)),x=(Q+k)/2,y=r(rh(h,w)),P=r(rh(u,S)),A=y>=0?y:y+360,M=P>=0?P:P+360,T=oh(A-M)>180?(A+M+360)/2:(A+M)/2,C=1-.17*gs(o(T-30))+.24*gs(o(2*T))+.32*gs(o(3*T+6))-.2*gs(o(4*T-63));let q=M-A;q=oh(q)<=180?q:M<=A?q+360:q-360,q=2*$t(Q*k)*lh(o(q)/2);const B=c-l,U=k-Q,re=1+.015*oe(p-50,2)/$t(20+oe(p-50,2)),me=1+.045*x,ze=1+.015*x*C,ue=30*Gm(-oe((T-275)/25,2)),nt=-(2*$t(oe(x,7)/(oe(x,7)+oe(25,7))))*lh(2*o(ue)),Te=$t(oe(B/(t*re),2)+oe(U/(i*me),2)+oe(q/(s*ze),2)+nt*(U/(i*me))*(q/(s*ze)));return Wm(0,Fm(100,Te))}function Hm(n,e,t="lab"){n=new $(n),e=new $(e);const i=n.get(t),s=e.get(t);let r=0;for(let o in i){const l=(i[o]||0)-(s[o]||0);r+=l*l}return Math.sqrt(r)}const Km=(...n)=>{try{return new $(...n),!0}catch{return!1}},Jm={cool(){return er([V.hsl(180,1,.9),V.hsl(250,.7,.4)])},hot(){return er(["#000","#f00","#ff0","#fff"]).mode("rgb")}},zo={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Af=Object.keys(zo),hh=new Map(Af.map(n=>[n.toLowerCase(),n])),e0=typeof Proxy=="function"?new Proxy(zo,{get(n,e){const t=e.toLowerCase();if(hh.has(t))return n[hh.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Af)}}):zo,t0=(...n)=>{n=Y(n,"cmyk");const[e,t,i,s]=n,r=n.length>4?n[4]:1;return s===1?[0,0,0,r]:[e>=1?0:255*(1-e)*(1-s),t>=1?0:255*(1-t)*(1-s),i>=1?0:255*(1-i)*(1-s),r]},{max:ch}=Math,i0=(...n)=>{let[e,t,i]=Y(n,"rgb");e=e/255,t=t/255,i=i/255;const s=1-ch(e,ch(t,i)),r=s<1?1/(1-s):0,o=(1-e-s)*r,l=(1-t-s)*r,a=(1-i-s)*r;return[o,l,a,s]};$.prototype.cmyk=function(){return i0(this._rgb)};const n0=(...n)=>new $(...n,"cmyk");Object.assign(V,{cmyk:n0});j.format.cmyk=t0;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"cmyk"),N(n)==="array"&&n.length===4)return"cmyk"}});const s0=(...n)=>{const e=Y(n,"hsla");let t=rn(n)||"lsa";return e[0]=Ke(e[0]||0)+"deg",e[1]=Ke(e[1]*100)+"%",e[2]=Ke(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},r0=(...n)=>{const e=Y(n,"lab");let t=rn(n)||"lab";return e[0]=Ke(e[0])+"%",e[1]=Ke(e[1]),e[2]=Ke(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},o0=(...n)=>{const e=Y(n,"lch");let t=rn(n)||"lab";return e[0]=Ke(e[0])+"%",e[1]=Ke(e[1]),e[2]=isNaN(e[2])?"none":Ke(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},l0=(...n)=>{const e=Y(n,"lab");return e[0]=Ke(e[0]*100)+"%",e[1]=jo(e[1]),e[2]=jo(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},Zf=(...n)=>{const[e,t,i,...s]=Y(n,"rgb"),[r,o,l]=ta(e,t,i),[a,h,c]=kf(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},a0=(...n)=>{const e=Y(n,"lch");return e[0]=Ke(e[0]*100)+"%",e[1]=jo(e[1]),e[2]=isNaN(e[2])?"none":Ke(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:lo}=Math,h0=(...n)=>{const e=Y(n,"rgba");let t=rn(n)||"rgb";if(t.substr(0,3)==="hsl")return s0(Qf(e),t);if(t.substr(0,3)==="lab"){const i=Ln();Mt("d50");const s=r0(Hl(e),t);return Mt(i),s}if(t.substr(0,3)==="lch"){const i=Ln();Mt("d50");const s=o0(Jl(e),t);return Mt(i),s}return t.substr(0,5)==="oklab"?l0(ta(e)):t.substr(0,5)==="oklch"?a0(Zf(e)):(e[0]=lo(e[0]),e[1]=lo(e[1]),e[2]=lo(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},Mf=(...n)=>{n=Y(n,"lch");const[e,t,i,...s]=n,[r,o,l]=Sf(e,t,i),[a,h,c]=ea(r,o,l);return[a,h,c,...s.length>0&&s[0]<1?[s[0]]:[]]},Rt=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,rt=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,tr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,et=/\s*/.source,ln=/\s+/.source,ia=/\s*,\s*/.source,Tr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,an=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,Rf=new RegExp("^rgba?\\("+et+[Rt,Rt,Rt].join(ln)+an+"\\)$"),Tf=new RegExp("^rgb\\("+et+[Rt,Rt,Rt].join(ia)+et+"\\)$"),Ef=new RegExp("^rgba\\("+et+[Rt,Rt,Rt,rt].join(ia)+et+"\\)$"),Lf=new RegExp("^hsla?\\("+et+[Tr,tr,tr].join(ln)+an+"\\)$"),Df=new RegExp("^hsl?\\("+et+[Tr,tr,tr].join(ia)+et+"\\)$"),_f=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,qf=new RegExp("^lab\\("+et+[rt,rt,rt].join(ln)+an+"\\)$"),Xf=new RegExp("^lch\\("+et+[rt,rt,Tr].join(ln)+an+"\\)$"),jf=new RegExp("^oklab\\("+et+[rt,rt,rt].join(ln)+an+"\\)$"),Yf=new RegExp("^oklch\\("+et+[rt,rt,Tr].join(ln)+an+"\\)$"),{round:zf}=Math,Zi=n=>n.map((e,t)=>t<=2?yi(zf(e),0,255):e),le=(n,e=0,t=100,i=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,i?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Ze=(n,e)=>n==="none"?e:n,na=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(j.format.named)try{return j.format.named(n)}catch{}if((e=n.match(Rf))||(e=n.match(Tf))){let t=e.slice(1,4);for(let s=0;s<3;s++)t[s]=+le(Ze(t[s],0),0,255);t=Zi(t);const i=e[4]!==void 0?+le(e[4],0,1):1;return t[3]=i,t}if(e=n.match(Ef)){const t=e.slice(1,5);for(let i=0;i<4;i++)t[i]=+le(t[i],0,255);return t}if((e=n.match(Lf))||(e=n.match(Df))){const t=e.slice(1,4);t[0]=+Ze(t[0].replace("deg",""),0),t[1]=+le(Ze(t[1],0),0,100)*.01,t[2]=+le(Ze(t[2],0),0,100)*.01;const i=Zi(Yo(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}if(e=n.match(_f)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const i=Yo(t);for(let s=0;s<3;s++)i[s]=zf(i[s]);return i[3]=+e[4],i}if(e=n.match(qf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,100),t[1]=le(Ze(t[1],0),-125,125,!0),t[2]=le(Ze(t[2],0),-125,125,!0);const i=Ln();Mt("d50");const s=Zi(Ul(t));Mt(i);const r=e[4]!==void 0?+le(e[4],0,1):1;return s[3]=r,s}if(e=n.match(Xf)){const t=e.slice(1,4);t[0]=le(t[0],0,100),t[1]=le(Ze(t[1],0),0,150,!1),t[2]=+Ze(t[2].replace("deg",""),0);const i=Ln();Mt("d50");const s=Zi(Kl(t));Mt(i);const r=e[4]!==void 0?+le(e[4],0,1):1;return s[3]=r,s}if(e=n.match(jf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,1),t[1]=le(Ze(t[1],0),-.4,.4,!0),t[2]=le(Ze(t[2],0),-.4,.4,!0);const i=Zi(ea(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}if(e=n.match(Yf)){const t=e.slice(1,4);t[0]=le(Ze(t[0],0),0,1),t[1]=le(Ze(t[1],0),0,.4,!1),t[2]=+Ze(t[2].replace("deg",""),0);const i=Zi(Mf(t)),s=e[4]!==void 0?+le(e[4],0,1):1;return i[3]=s,i}};na.test=n=>Rf.test(n)||Lf.test(n)||qf.test(n)||Xf.test(n)||jf.test(n)||Yf.test(n)||Tf.test(n)||Ef.test(n)||Df.test(n)||_f.test(n)||n==="transparent";$.prototype.css=function(n){return h0(this._rgb,n)};const c0=(...n)=>new $(...n,"css");V.css=c0;j.format.css=na;j.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&na.test(n))return"css"}});j.format.gl=(...n)=>{const e=Y(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const f0=(...n)=>new $(...n,"gl");V.gl=f0;$.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};$.prototype.hex=function(n){return yf(this._rgb,n)};const u0=(...n)=>new $(...n,"hex");V.hex=u0;j.format.hex=bf;j.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&N(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:ms}=Math,Bf=n=>{const e=n/100;let t,i,s;return e<66?(t=255,i=e<6?0:-155.25485562709179-.44596950469579133*(i=e-2)+104.49216199393888*ms(i),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*ms(s)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*ms(t),i=325.4494125711974+.07943456536662342*(i=e-50)-28.0852963507957*ms(i),s=255),[t,i,s,1]},{round:d0}=Math,p0=(...n)=>{const e=Y(n,"rgb"),t=e[0],i=e[2];let s=1e3,r=4e4;const o=.4;let l;for(;r-s>o;){l=(r+s)*.5;const a=Bf(l);a[2]/a[0]>=i/t?r=l:s=l}return d0(l)};$.prototype.temp=$.prototype.kelvin=$.prototype.temperature=function(){return p0(this._rgb)};const ao=(...n)=>new $(...n,"temp");Object.assign(V,{temp:ao,kelvin:ao,temperature:ao});j.format.temp=j.format.kelvin=j.format.temperature=Bf;$.prototype.oklch=function(){return Zf(this._rgb)};const O0=(...n)=>new $(...n,"oklch");Object.assign(V,{oklch:O0});j.format.oklch=Mf;j.autodetect.push({p:2,test:(...n)=>{if(n=Y(n,"oklch"),N(n)==="array"&&n.length===3)return"oklch"}});Object.assign(V,{analyze:$f,average:gm,bezier:Sm,blend:ot,brewer:e0,Color:$,colors:Wi,contrast:Bm,contrastAPCA:Im,cubehelix:Lm,deltaE:Um,distance:Hm,input:j,interpolate:Gi,limits:Cf,mix:Gi,random:Xm,scale:er,scales:Jm,valid:Km});class g0{constructor(){qt(this,"PROPERTIES",{...ug,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:V,rgb:(e=0,t=e,i=t=e)=>V.rgb(e,t,i),hsl:(e=360,t=1,i=1)=>V.hsl(e,t,i),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");this.leds[Math.round(e)]=t._rgb},line:(e,t,i)=>{for(let s=Math.round(e);s{this.line(0,this.ledCount,e)},gradient:(e,t,i,s)=>{}});for(const[e,t]of Object.entries(this.PROPERTIES))m0(e,t,this);this.reset()}reset(){this.frameCount=0,this.clear()}render(e,t=0){for(let i=0;i"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function i(h,c,f){var u=new XMLHttpRequest;u.open("GET",h),u.responseType="blob",u.onload=function(){a(u.response,c,f)},u.onerror=function(){console.error("could not download file")},u.send()}function s(h){var c=new XMLHttpRequest;c.open("HEAD",h,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function r(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ci=="object"&&ci.global===ci?ci:void 0,l=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(h,c,f){var u=o.URL||o.webkitURL,p=document.createElement("a");c=c||h.name||"download",p.download=c,p.rel="noopener",typeof h=="string"?(p.href=h,p.origin===location.origin?r(p):s(p.href)?i(h,c,f):r(p,p.target="_blank")):(p.href=u.createObjectURL(h),setTimeout(function(){u.revokeObjectURL(p.href)},4e4),setTimeout(function(){r(p)},0))}:"msSaveOrOpenBlob"in navigator?function(h,c,f){if(c=c||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(t(h,f),c);else if(s(h))i(h,c,f);else{var u=document.createElement("a");u.href=h,u.target="_blank",setTimeout(function(){r(u)})}}:function(h,c,f,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof h=="string")return i(h,c,f);var p=h.type==="application/octet-stream",O=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||p&&O||l)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var S=m.result;S=g?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=S:location=S,u=null},m.readAsDataURL(h)}else{var b=o.URL||o.webkitURL,w=b.createObjectURL(h);u?u.location=w:location.href=w,u=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});o.saveAs=a.saveAs=a,n.exports=a})})(b0);const y0=Bo;var Oi={},w0={get exports(){return Oi},set exports(n){Oi=n}};(function(n,e){(function(t,i){i(e)})(ci,function(t){function i(f){const u=new ArrayBuffer(4),p=new DataView(u);return p.setUint32(0,f),new Uint8Array(p.buffer)}function s(f,u=0,p=f.byteLength){let O="";const g=Math.min(p,f.byteLength-u);for(let m=0;mO+g.byteLength,0),p=new Uint8Array(u);for(let O=0,g=0;O79)throw new TypeError("Invalid length for key");const O=r("tEXt"),g=r(`${u}\0${p}`),m=i(function(S){if(h.length===0)for(let k=0;k<256;k++){let x=k;for(let y=0;y<8;y++)1&x?x=3988292384^x>>>1:x>>>=1;h[k]=x}const Q=4294967295;return(((k,x,y)=>{let P=k;for(let A=0;A>>8;return P})(Q,S,S.byteLength)^Q)>>>0}(o([O,g]))),b=o([i(g.byteLength),O,g,m]),w=16+l(f).getUint32(8)+4;return o([f.subarray(0,w),b,f.subarray(w)])}t.addMetadata=c,t.addMetadataFromBase64DataURI=function(f,u,p){const O="data:image/png;base64,";if(typeof f!="string"||f.substring(0,O.length)!==O)throw new TypeError("Invalid PNG as Base64 Data URI");const g=atob(f.substring(O.length)),m=new Uint8Array(g.length);for(let w=0;w{n.reset();const l=document.createElement("canvas");l.width=n.frames,l.height=n.ledCount;const a=l.getContext("2d");e();for(let c=0;cthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Ui(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),gt.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ui(this,e,t);let i=[];return this.decompose(e,t,i,0),gt.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zn(this),r=new Zn(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zn(this,e)}iterRange(e,t=this.length){return new Vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Nf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?G.empty:e.length<=32?new se(e):gt.from(se.split(e,[]))}}class se extends G{constructor(e,t=k0(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new v0(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new se(fh(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=zs(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new se(l,o.length+r.length));else{let a=l.length>>1;i.push(new se(l.slice(0,a)),new se(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof se))return super.replace(e,t,i);[e,t]=Ui(this,e,t);let s=zs(this.text,zs(i.text,fh(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new se(s,r):gt.from(se.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){[e,t]=Ui(this,e,t);let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new se(i,s)),i=[],s=-1);return s>-1&&t.push(new se(i,s)),t}}class gt extends G{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Ui(this,e,t),i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>5-1&&a.lines>h>>5+1){let c=this.children.slice();return c[s]=a,new gt(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){[e,t]=Ui(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof gt))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let O of e)O.flatten(p);return new se(p,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(p){let O;if(p.lines>r&&p instanceof gt)for(let g of p.children)f(g);else p.lines>o&&(a>o||!a)?(u(),l.push(p)):p instanceof se&&a&&(O=c[c.length-1])instanceof se&&p.lines+O.lines<=32?(a+=p.lines,h+=p.length+1,c[c.length-1]=new se(O.text.concat(p.text),O.length+1+p.length)):(a+p.lines>s&&u(),a+=p.lines,h+=p.length+1,c.push(p))}function u(){a!=0&&(l.push(c.length==1?c[0]:gt.from(c,h)),h=-1,a=c.length=0)}for(let p of e)f(p);return u(),l.length==1?l[0]:new gt(l,t)}}G.empty=new se([""],0);function k0(n){let e=-1;for(let t of n)e+=t.length+1;return e}function zs(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof se?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof se?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof se){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof se?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Vf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Nf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=function(){return this.iter()},Zn.prototype[Symbol.iterator]=Vf.prototype[Symbol.iterator]=Nf.prototype[Symbol.iterator]=function(){return this});class v0{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function Ui(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let _i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<_i.length;n++)_i[n]+=_i[n-1];function Q0(n){for(let e=1;e<_i.length;e+=2)if(_i[e]>n)return _i[e-1]<=n;return!1}function uh(n){return n>=127462&&n<=127487}const dh=8205;function ve(n,e,t=!0,i=!0){return(t?If:P0)(n,e,i)}function If(n,e,t){if(e==n.length)return e;e&&Ff(n.charCodeAt(e))&&Wf(n.charCodeAt(e-1))&&e--;let i=we(n,e);for(e+=Ue(i);e=0&&uh(we(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function P0(n,e,t){for(;e>0;){let i=If(n,e-2,t);if(i=56320&&n<57344}function Wf(n){return n>=55296&&n<56320}function we(n,e){let t=n.charCodeAt(e);if(!Wf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ff(i)?(t-55296<<10)+(i-56320)+65536:t}function sa(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ue(n){return n<65536?1:2}const Vo=/\r\n?|\n/;var Se=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Se||(Se={}));class St{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=Se.Simple&&h>=e&&(i==Se.TrackDel&&se||i==Se.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new St(e)}static create(e){return new St(e)}}class pe extends St{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return No(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Io(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&Vt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=p?typeof p=="string"?G.of(p.split(i||Vo)):p:G.empty,g=O.length;if(f==u&&g==0)return;fo&&Qe(s,f-o,-1),Qe(s,u-f,g),Vt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new pe(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Vt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function Io(n,e,t,i=!1){let s=[],r=i?[]:null,o=new Dn(n),l=new Dn(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Qe(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Dn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?G.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?G.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gi{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new gi(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return v.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return v.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return v.range(e.anchor,e.head)}static create(e,t,i){return new gi(e,t,i)}}class v{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:v.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new v(e.ranges.map(t=>gi.fromJSON(t)),e.main)}static single(e,t=e){return new v([v.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?v.range(a,l):v.range(l,a))}}return new v(e,t)}}function Uf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let ra=0;class E{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=ra++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new E(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:oa),!!e.static,e.enables)}of(e){return new Bs([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bs(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bs(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function oa(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Bs{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=ra++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Fo(f,c)){let p=i(f);if(l?!ph(p,f.values[o],s):!s(p,f.values[o]))return f.values[o]=p,1}return 0},reconfigure:(f,u)=>{let p,O=u.config.address[r];if(O!=null){let g=nr(u,O);if(this.dependencies.every(m=>m instanceof E?u.facet(m)===f.facet(m):m instanceof be?u.field(m,!1)==f.field(m,!1):!0)||(l?ph(p=i(f),g,s):s(p=i(f),g)))return f.values[o]=g,0}else p=i(f);return f.values[o]=p,1}}}}function ph(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Oh).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Oh.of({field:this,create:e})]}get extension(){return this}}const fi={lowest:4,low:3,default:2,high:1,highest:0};function gn(n){return e=>new Hf(e,n)}const si={highest:gn(fi.highest),high:gn(fi.high),default:gn(fi.default),low:gn(fi.low),lowest:gn(fi.lowest)};class Hf{constructor(e,t){this.inner=e,this.prec=t}}class Er{of(e){return new Wo(this,e)}reconfigure(e){return Er.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Wo{constructor(e,t){this.compartment=e,this.inner=t}}class ir{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of C0(e,t,o))u instanceof be?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(p=>u.slot(p));let c=i==null?void 0:i.config.facets;for(let u in r){let p=r[u],O=p[0].facet,g=c&&c[u]||[];if(p.every(m=>m.type==0))if(l[O.id]=a.length<<1|1,oa(g,p))a.push(i.facet(O));else{let m=O.combine(p.map(b=>b.value));a.push(i&&O.compare(m,i.facet(O))?i.facet(O):m)}else{for(let m of p)m.type==0?(l[m.id]=a.length<<1|1,a.push(m.value)):(l[m.id]=h.length<<1,h.push(b=>m.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(m=>$0(m,O,p))}}let f=h.map(u=>u(l));return new ir(e,o,f,l,a,r)}}function C0(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Wo&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Wo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof Hf)r(o.inner,o.prec);else if(o instanceof be)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Bs)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,fi.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,fi.default),i.reduce((o,l)=>o.concat(l))}function Mn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function nr(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Kf=E.define(),Go=E.define({combine:n=>n.some(e=>e),static:!0}),Jf=E.define({combine:n=>n.length?n[0]:void 0,static:!0}),eu=E.define(),tu=E.define(),iu=E.define(),nu=E.define({combine:n=>n.length?n[0]:!1});class Dt{constructor(e,t){this.type=e,this.value=t}static define(){return new A0}}class A0{of(e){return new Dt(this,e)}}class Z0{constructor(e){this.map=e}of(e){return new X(this,e)}}class X{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new X(this.type,t)}is(e){return this.type==e}static define(e={}){return new Z0(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}X.reconfigure=X.define();X.appendConfig=X.define();class he{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Uf(i,t.newLength),r.some(l=>l.type==he.time)||(this.annotations=r.concat(he.time.of(Date.now())))}static create(e,t,i,s,r,o){return new he(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(he.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}he.time=Dt.define();he.userEvent=Dt.define();he.addToHistory=Dt.define();he.remote=Dt.define();function M0(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof he?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof he?n=r[0]:n=ru(e,qi(r),!1)}return n}function T0(n){let e=n.startState,t=e.facet(iu),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=su(i,Uo(e,r,n.changes.newLength),!0))}return i==n?n:he.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const E0=[];function qi(n){return n==null?E0:Array.isArray(n)?n:[n]}var ne=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ne||(ne={}));const L0=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ho;try{Ho=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function D0(n){if(Ho)return Ho.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||L0.test(t)))return!0}return!1}function _0(n){return e=>{if(!/\S/.test(e))return ne.Space;if(D0(e))return ne.Word;for(let t=0;t-1)return ne.Word;return ne.Other}}class H{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(X.reconfigure)?(t=null,i=l.value):l.is(X.appendConfig)&&(t=null,i=qi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=ir.resolve(i,s,this),r=new H(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Go)?e.newSelection:e.newSelection.asSingle();new H(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:v.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=qi(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return H.create({doc:e.doc,selection:v.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=ir.resolve(e.extensions||[],new Map),i=e.doc instanceof G?e.doc:G.of((e.doc||"").split(t.staticFacet(H.lineSeparator)||Vo)),s=e.selection?e.selection instanceof v?e.selection:v.single(e.selection.anchor,e.selection.head):v.single(0);return Uf(s,i.length),t.staticFacet(Go)||(s=s.asSingle()),new H(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(H.tabSize)}get lineBreak(){return this.facet(H.lineSeparator)||` +`}get readOnly(){return this.facet(nu)}phrase(e,...t){for(let i of this.facet(H.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(Kf))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return _0(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=ve(t,o,!1);if(r(t.slice(a,o))!=ne.Word)break;o=a}for(;ln.length?n[0]:4});H.lineSeparator=Jf;H.readOnly=nu;H.phrases=E.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});H.languageData=Kf;H.changeFilter=eu;H.transactionFilter=tu;H.transactionExtender=iu;Er.reconfigure=X.define();function Qt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Si{eq(e){return this==e}range(e,t=e){return Ko.create(e,t,this)}}Si.prototype.startSide=Si.prototype.endSide=0;Si.prototype.point=!1;Si.prototype.mapMode=Se.TrackDel;let Ko=class ou{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ou(e,t,i)}};function Jo(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class la{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rp||u==p&&h.startSide>0&&h.endSide<=0)continue;(p-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,p-u)),i.push(h),s.push(u-o),r.push(p-o))}return{mapped:i.length?new la(s,r,i,l):null,pos:o}}}class W{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new W(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Jo)),this.isEmpty)return t.length?W.of(t):this;let l=new lu(this,null,-1).goto(0),a=0,h=[],c=new Ut;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return _n.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _n.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=gh(o,l,i),h=new mn(o,a,r),c=new mn(l,a,r);i.iterGaps((f,u,p)=>mh(h,f,c,u,p,s)),i.empty&&i.length==0&&mh(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=gh(r,o),a=new mn(r,l,0).goto(i),h=new mn(o,l,0).goto(i);for(;;){if(a.to!=h.to||!el(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new mn(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new Ut;for(let s of e instanceof Ko?[e]:t?q0(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return W.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=W.empty;s=s.nextLayer)t=new W(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}W.empty=new W([],[],null,-1);function q0(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Jo);e=i}return n}W.empty.nextLayer=W.empty;class Ut{finishChunk(e){this.chunks.push(new la(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Ut)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(W.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=W.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function gh(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new lu(o,t,i,r));return s.length==1?s[0]:new _n(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)ho(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)ho(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ho(this.heap,0)}}}function ho(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class mn{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=_n.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){bs(this.active,e),bs(this.activeTo,e),bs(this.activeRank,e),this.minActive=bh(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;ys(this.active,t,i),ys(this.activeTo,t,s),ys(this.activeRank,t,r),e&&ys(e,t,this.cursor.from),this.minActive=bh(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&bs(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function mh(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&el(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!el(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function el(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function bh(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=ve(n,s)}return i===!0?-1:n.length}const il="ͼ",yh=typeof Symbol>"u"?"__"+il:Symbol.for(il),nl=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),wh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ht{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let p in l){let O=l[p];if(/&/.test(p))r(p.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),O,a);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");r(s(p),O,c,u)}else O!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+O+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=wh[yh]||1;return wh[yh]=e+1,il+e.toString(36)}static mount(e,t,i){let s=e[nl],r=i&&i.nonce;s?r&&s.setNonce(r):s=new X0(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let xh=new Map;class X0{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=xh.get(i);if(r)return e[nl]=r;this.sheet=new s.CSSStyleSheet,xh.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[nl]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},j0=typeof navigator<"u"&&/Mac/.test(navigator.platform),Y0=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var xe=0;xe<10;xe++)Kt[48+xe]=Kt[96+xe]=String(xe);for(var xe=1;xe<=24;xe++)Kt[xe+111]="F"+xe;for(var xe=65;xe<=90;xe++)Kt[xe]=String.fromCharCode(xe+32),qn[xe]=String.fromCharCode(xe);for(var co in Kt)qn.hasOwnProperty(co)||(qn[co]=Kt[co]);function z0(n){var e=j0&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Y0&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?qn:Kt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Xn(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function sl(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Vs(n,e){if(!e.anchorNode)return!1;try{return sl(n,e.anchorNode)}catch{return!1}}function jn(n){return n.nodeType==3?vi(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Rn(n,e,t,i){return t?Sh(n,e,t,i,-1)||Sh(n,e,t,i,1):!1}function ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function sr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Sh(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:kt(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=ki(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?kt(n):0}else return!1}}function kt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Lr(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function B0(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function au(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function V0(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,p=c==a.body,O=1,g=1;if(p)u=B0(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:O,scaleY:g}=au(c,w)),u={left:w.left,right:w.left+c.clientWidth*O,top:w.top,bottom:w.top+c.clientHeight*g}}let m=0,b=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+b+o)):e.bottom>u.bottom&&(b=e.bottom-u.bottom+o,t<0&&e.top-b0&&e.right>u.right+m&&(m=e.right-u.right+m+r)):e.right>u.right&&(m=e.right-u.right+r,t<0&&e.lefts.clientHeight&&(i=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:i}}class I0{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?kt(t):0),i,Math.min(e.focusOffset,i?kt(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Mi=null;function hu(n){if(n.setActive)return n.setActive();if(Mi)return n.focus(Mi);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Mi==null?{get preventScroll(){return Mi={preventScroll:!0},!0}}:void 0),!Mi){Mi=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function uu(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=kt(t)}else if(t.parentNode&&!sr(t))i=ki(t),t=t.parentNode;else return null}}function du(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=aa){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ou(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var L={mac:$h||/Mac/.test(De.platform),windows:/Win/.test(De.platform),linux:/Linux|X11/.test(De.platform),ie:Dr,ie_version:mu?rl.documentMode||6:ll?+ll[1]:ol?+ol[1]:0,gecko:Qh,gecko_version:Qh?+(/Firefox\/(\d+)/.exec(De.userAgent)||[0,0])[1]:0,chrome:!!fo,chrome_version:fo?+fo[1]:0,ios:$h,android:/Android\b/.test(De.userAgent),webkit:Ph,safari:bu,webkit_version:Ph?+(/\bAppleWebKit\/(\d+)/.exec(De.userAgent)||[0,0])[1]:0,tabSize:rl.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const G0=256;class lt extends J{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof lt)||this.length-(t-e)+i.length>G0||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new lt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Pe(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return U0(this.dom,e,t)}}class Et extends J{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(cu(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Et&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Et(this.mark,t,o)}domAtPos(e){return yu(this,e)}coordsAt(e,t){return xu(this,e,t)}}function U0(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?L.chrome||L.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return L.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Lr(a,o<0):a||null}class Nt extends J{static create(e,t,i){return new Nt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Nt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof Nt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?Pe.before(this.dom):Pe.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?Pe.before(this.dom):Pe.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return G.empty}get isHidden(){return!0}}lt.prototype.children=Nt.prototype.children=Hi.prototype.children=aa;function yu(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Et&&s.length&&(i=s[s.length-1])instanceof Et&&i.mark.eq(e.mark)?wu(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function xu(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(p.children.length?l(p,c-u):(!r||r.isHidden&&t>0)&&(O>c||u==O&&p.getSide()>0)?(r=p,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function hl(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function K0(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Jt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Su(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Jt(e,i,s,t,e.widget||null,!0)}static line(e){return new is(e)}static set(e,t=!1){return W.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}_.none=W.empty;class ts extends _{constructor(e){let{start:t,end:i}=Su(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof ts&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&rr(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ts.prototype.point=!1;class is extends _{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof is&&this.spec.class==e.spec.class&&rr(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}is.prototype.mapMode=Se.TrackBefore;is.prototype.point=!0;class Jt extends _{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Se.TrackBefore:Se.TrackAfter:Se.TrackDel}get type(){return this.startSide!=this.endSide?Me.WidgetRange:this.startSide<=0?Me.WidgetBefore:Me.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Jt&&J0(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Jt.prototype.point=!0;function Su(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function J0(n,e){return n==e||!!(n&&e&&n.compare(e))}function cl(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class ae extends J{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof ae))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),gu(this,e,t,i?i.children.slice():[],r,o),!0}split(e){let t=new ae;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){rr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){wu(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=al(t,this.attrs||{})),i&&(this.attrs=al({class:i},this.attrs||{}))}domAtPos(e){return yu(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(cu(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(hl(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&J.get(s)instanceof Et;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=J.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!L.ios||!this.children.some(r=>r instanceof lt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof lt)||/[^ -~]/.test(i.text))return null;let s=jn(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=xu(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof ae)return r;if(o>t)break}s=o+r.breakAfter}return null}}class Tt extends J{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof Tt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class fl extends _t{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Tn{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Tt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ae),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ws(new Hi(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Tt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(ws(new lt(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Jt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof Jt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Tt(i.widget||Ki.block,l,i));else{let a=Nt.create(i.widget||Ki.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(ws(new Hi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(ws(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Tn(e,t,i,r);return o.openEnd=W.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function ws(n,e){for(let t of e)n=new Et(t,[n],n.length);return n}class Ki extends _t{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ki.inline=new Ki("span");Ki.block=new Ki("div");var ie=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(ie||(ie={}));const Qi=ie.LTR,ha=ie.RTL;function ku(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Qu(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(ft[g+1]==-p){let m=ft[g+2],b=m&2?s:m&4?m&1?r:s:0;b&&(K[f]=K[ft[g]]=b),l=g;break}}else{if(ft.length==189)break;ft[l++]=f,ft[l++]=u,ft[l++]=a}else if((O=K[f])==2||O==1){let g=O==s;a=g?0:1;for(let m=l-3;m>=0;m-=3){let b=ft[m+2];if(b&2)break;if(g)ft[m+2]|=2;else{if(b&4)break;ft[m+2]|=4}}}}}function r1(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)O==m&&(O=t[--g].from,m=g?t[g-1].to:n),K[--O]=p;a=c}else r=h,a++}}}function dl(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new It(a,g.from,p));let m=g.direction==Qi!=!(p%2);pl(n,m?i+1:i,s,g.inner,g.from,g.to,o),a=g.to}O=g.to}else{if(O==t||(c?K[O]!=l:K[O]==l))break;O++}u?dl(n,a,O,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let g=K[a-1];g!=l&&(c=!1,f=g==16)}let u=!c&&l==1?[]:null,p=c?i:i+1,O=a;e:for(;;)if(h&&O==r[h-1].to){if(f)break e;let g=r[--h];if(!c)for(let m=g.from,b=h;;){if(m==e)break e;if(b&&r[b-1].to==m)m=r[--b].from;else{if(K[m-1]==l)break e;break}}if(u)u.push(g);else{g.toK.length;)K[K.length]=256;let i=[],s=e==Qi?0:1;return pl(n,s,s,t,0,n.length,i),i}function Pu(n){return[new It(0,n,0)]}let $u="";function l1(n,e,t,i,s){var r;let o=i.head-n.from,l=It.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=ve(n.text,o,a.forward(s,t));(ca.to)&&(c=h),$u=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),Lu=E.define({combine:n=>n.some(e=>e)}),Du=E.define();class ji{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new ji(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ji(v.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const xs=X.define({map:(n,e)=>n.map(e)}),_u=X.define();function qe(n,e,t){let i=n.facet(Mu);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const zt=E.define({combine:n=>n.length?n[0]:!0});let h1=0;const kn=E.define();class fe{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new fe(h1++,e,i,s,l=>{let a=[kn.of(l)];return o&&a.push(Yn.of(h=>{let c=h.plugin(l);return c?o(c):_.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return fe.define(i=>new e(i),t)}}class uo{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(qe(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){qe(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){qe(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const qu=E.define(),ua=E.define(),Yn=E.define(),Xu=E.define(),da=E.define(),ju=E.define();function Ah(n,e){let t=n.state.facet(ju);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return W.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let p=l[u].spec.bidiIsolate,O;if(p==null&&(p=a1(e.text,h,c)),a>0&&f.length&&(O=f[f.length-1]).to==h&&O.direction==p)O.to=c,f=O.inner;else{let g={from:h,to:c,direction:p,inner:[]};f.push(g),f=g.inner}}}}),s}const Yu=E.define();function zu(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(Yu)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const vn=E.define();class Je{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Je(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new Je(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class or{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=pe.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Je(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new or(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Zh extends J{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=_.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ae],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Je(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!g1(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?f1(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new Je(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(L.ie||L.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=p1(o,l,e.changes);return i=Je.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=L.chrome||L.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,p,O,g;if(i&&i.range.fromBc){let Q=Tn.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=Tn.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);p=Q.breakAtStart,O=Q.openStart,g=k.openEnd;let x=this.compositionView(i);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),Q.content.length&&x.merge(0,0,Q.content[Q.content.length-1],!0,0,Q.openEnd)&&Q.content.pop(),u=Q.content.concat(x).concat(k.content)}else({content:u,breakAtStart:p,openStart:O,openEnd:g}=Tn.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:m,off:b}=r.findPos(h,1),{i:w,off:S}=r.findPos(a,-1);Ou(this,w,S,m,b,u,p,O,g)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(_u)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new lt(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Et(s,[t],t.length);let i=new ae;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=J.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&Vs(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(L.gecko&&l.empty&&!this.hasComposition&&c1(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new Pe(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!Rn(a.node,a.offset,c.anchorNode,c.anchorOffset)||!Rn(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{L.android&&L.chrome&&this.dom.contains(c.focusNode)&&O1(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Xn(this.view.root);if(f)if(l.empty){if(L.gecko){let u=u1(a.node,a.offset);if(u&&u!=3){let p=(u==1?uu:du)(a.node,a.offset);p&&(a=new Pe(p.node,p.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new Pe(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new Pe(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Rn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Xn(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=ae.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=J.get(t.childNodes[s]);r instanceof ae&&(i=r.domAtPos(r.length))}return i?new Pe(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=J.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof ae&&!(i instanceof ae&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof Tt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof ae))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof lt))return null;let r=ve(s.text,i);if(r==i)return null;let o=vi(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==ie.LTR;for(let h=0,c=0;cs)break;if(h>=i){let p=f.dom.getBoundingClientRect();if(t.push(p.height),o){let O=f.dom.lastChild,g=O?jn(O):[];if(g.length){let m=g[g.length-1],b=a?m.right-p.left:p.right-m.left;b>l&&(l=b,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?ie.RTL:ie.LTR}measureTextSize(){for(let r of this.children)if(r instanceof ae){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=jn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new pu(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(_.replace({widget:new fl(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return _.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Yn).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Xu).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(W.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=zu(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;V0(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function m1(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return v.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=ve(s.text,r,!1):l=ve(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=ve(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function y1(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function po(n,e){return n.tope.top+1}function Mh(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function gl(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let O=n.firstChild;O;O=O.nextSibling){let g=jn(O);for(let m=0;mS||o==S&&r>w){i=O,s=b,r=w,o=S;let Q=S?t0?m0)}w==0?t>b.bottom&&(!c||c.bottomb.top)&&(h=O,f=b):c&&po(c,b)?c=Rh(c,b.bottom):f&&po(f,b)&&(f=Mh(f,b.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Th(i,u,t);if(l&&i.contentEditable!="false")return gl(i,u,t);let p=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:p}}function Th(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,p=u;if((L.chrome||L.gecko)&&vi(n,l).getBoundingClientRect().left==c.right&&(p=!u),f<=0)return{node:n,offset:l+(p?1:0)};s=l+(p?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function Vu(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let Q=n.viewState.heightOracle.textHeight/2,k=!1;a=n.elementAtHeight(u),a.type!=Me.Text;)for(;u=i>0?a.bottom+Q:a.top-Q,!(u>=0&&u<=h);){if(k)return t?null:0;k=!0,i=-i}f=l+u;let p=a.from;if(pn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Eh(n,o,a,c,f);let O=n.dom.ownerDocument,g=n.root.elementFromPoint?n.root:O,m=g.elementFromPoint(c,f);m&&!n.contentDOM.contains(m)&&(m=null),m||(c=Math.max(o.left+1,Math.min(o.right-1,c)),m=g.elementFromPoint(c,f),m&&!n.contentDOM.contains(m)&&(m=null));let b,w=-1;if(m&&((s=n.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(O.caretPositionFromPoint){let Q=O.caretPositionFromPoint(c,f);Q&&({offsetNode:b,offset:w}=Q)}else if(O.caretRangeFromPoint){let Q=O.caretRangeFromPoint(c,f);Q&&({startContainer:b,startOffset:w}=Q,(!n.contentDOM.contains(b)||L.safari&&w1(b,w,c)||L.chrome&&x1(b,w,c))&&(b=void 0))}b&&(w=Math.min(kt(b),w))}if(!b||!n.docView.dom.contains(b)){let Q=ae.find(n.docView,p);if(!Q)return u>a.top+a.height/2?a.to:a.from;({node:b,offset:w}=gl(Q.dom,c,f))}let S=n.docView.nearest(b);if(!S)return null;if(S.isWidget&&((r=S.dom)===null||r===void 0?void 0:r.nodeType)==1){let Q=S.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+tl(o,r,n.state.tabSize)}function w1(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return vi(n,i-1,i).getBoundingClientRect().left>t}function x1(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():vi(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function ml(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Me.Text))return i}return t}function S1(n,e,t,i){let s=ml(n,e.head),r=!i||s.type!=Me.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==ie.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return v.cursor(a,t?-1:1)}return v.cursor(t?s.to:s.from,t?-1:1)}function Lh(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=l1(s,r,o,l,t),c=$u;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function k1(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ne.Space&&(s=o),s==o}}function v1(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return v.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let p=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-p.from))),l=(r<0?p.top:p.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let O=l+(u+p)*r,g=Vu(n,{x:f,y:O},!1,r);if(Oa.bottom||(r<0?gs)){let m=n.docView.coordsForChar(g),b=!m||O{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:v.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=J.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(P1(e,i.node,i.offset)?t:0))}}function P1(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:Z1(e),a=new Q1(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=M1(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!sl(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!sl(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((L.ios||L.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||L.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(L.mac||L.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=v.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:G.of([" "])}):L.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=v.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:G.of([" "])}),t)return pa(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function pa(n,e,t,i=-1){if(L.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(L.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Xi(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&Xi(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Xi(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=C1(n,e,t));return n.state.facet(Ru).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function C1(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&Bu(n,t.main.head);if(f){let O=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-O}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,p=r.to-r.from;i=s.changeByRange(O=>{if(O.from==r.from&&O.to==r.to)return{changes:l,range:a||O.map(l)};let g=O.to-u,m=g-h.length;if(O.to-O.from!=p||n.state.sliceDoc(m,g)!=h||O.to>=c.from&&O.from<=c.to)return{range:O};let b=s.changes({from:m,to:g,insert:e.insert}),w=O.to-r.to;return{changes:b,range:a?v.range(Math.max(0,a.anchor+w),Math.max(0,a.head+w)):O.map(b)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function A1(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Z1(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Dh(t,i)),(s!=t||r!=i)&&e.push(new Dh(s,r))),e}function M1(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?v.single(t+e,i+e):null}class R1{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,L.safari&&e.contentDOM.addEventListener("input",()=>null),L.gecko&&W1(e.contentDOM.ownerDocument)}handleEvent(e){!j1(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=T1(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Fu.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),L.android&&L.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return L.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Iu.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||E1.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:L.safari&&!L.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function _h(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){qe(t.state,s)}}}function T1(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(_h(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(_h(i.value,o))}}for(let i in at)t(i).handlers.push(at[i]);for(let i in tt)t(i).observers.push(tt[i]);return e}const Iu=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],E1="dthko",Fu=[16,17,18,20,91,92,224,225],Ss=6;function ks(n){return Math.max(0,n)*.7+8}function L1(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class D1{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=N0(e.contentDOM),this.atoms=e.state.facet(da).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(H.allowMultipleSelections)&&_1(e,t),this.dragging=X1(e,t)&&Uu(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&L1(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,s=0,r=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=zu(this.view);e.clientX-a.left<=s+Ss?t=-ks(s-e.clientX):e.clientX+a.right>=o-Ss&&(t=ks(e.clientX-o)),e.clientY-a.top<=r+Ss?i=-ks(r-e.clientY):e.clientY+a.bottom>=l-Ss&&(i=ks(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function _1(n,e){let t=n.state.facet(Cu);return t.length?t[0](e):L.mac?e.metaKey:e.ctrlKey}function q1(n,e){let t=n.state.facet(Au);return t.length?t[0](e):L.mac?!e.altKey:!e.ctrlKey}function X1(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Xn(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function j1(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=J.get(t))&&i.ignoreEvent(e))return!1;return!0}const at=Object.create(null),tt=Object.create(null),Wu=L.ie&&L.ie_version<15||L.ios&&L.webkit_version<604;function Y1(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Gu(n,t.value)},50)}function _r(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function Gu(n,e){e=_r(n.state,ca,e);let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(bl!=null&&t.selection.ranges.every(a=>a.empty)&&bl==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:v.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:v.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}tt.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};at.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);tt.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};tt.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};at.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(Zu))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=V1(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new D1(n,e,t,i)),i&&n.observer.ignore(()=>{hu(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function qh(n,e,t,i){if(i==1)return v.cursor(e,t);if(i==2)return m1(n.state,e,t);{let s=ae.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return le>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function z1(n,e,t,i){let s=ae.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Xh(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Xh(t,i,l)?1:o&&o.bottom>=i?-1:1}function jh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:z1(n,t,e.clientX,e.clientY)}}const B1=L.ie&&L.ie_version<=11;let Yh=null,zh=0,Bh=0;function Uu(n){if(!B1)return n.detail;let e=Yh,t=Bh;return Yh=n,Bh=Date.now(),zh=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(zh+1)%3:1}function V1(n,e){let t=jh(n,e),i=Uu(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=jh(n,r),h,c=qh(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=qh(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),p=Math.max(f.to,c.to);c=u1&&(h=N1(s,a.pos))?h:l?s.addRange(c):v.create([c])}}}function N1(n,e){for(let t=0;t=e)return v.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}at.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=v.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",_r(n.state,fa,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};at.dragend=n=>(n.inputState.draggedContent=null,!1);function Vh(n,e,t,i){if(t=_r(n.state,ca,t),!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&q1(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}at.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&Vh(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Vh(n,e,i,!0),!0}return!1};at.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Wu?null:e.clipboardData;return t?(Gu(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(Y1(n),!1)};function I1(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function F1(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:_r(n,fa,e.join(n.lineBreak)),ranges:t,linewise:i}}let bl=null;at.copy=at.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=F1(n.state);if(!t&&!s)return!1;bl=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=Wu?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(I1(n,t),!1)};const Hu=Dt.define();function Ku(n,e){let t=[];for(let i of n.facet(Tu)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:Hu.of(!0)}):null}function Ju(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=Ku(n.state,e);t?n.dispatch(t):n.update([])}},10)}tt.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Ju(n)};tt.blur=n=>{n.observer.clearSelectionRange(),Ju(n)};tt.compositionstart=tt.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};tt.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,L.chrome&&L.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};tt.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};at.beforeinput=(n,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let l=o[0],a=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return pa(n,{from:a,to:h,insert:n.state.toText(r)},null),!0}}let s;if(L.chrome&&L.android&&(s=Iu.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return L.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),L.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>tt.compositionend(n,e),20),!1};const Nh=new Set;function W1(n){Nh.has(n)||(Nh.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ih=["pre-wrap","normal","pre-line","break-spaces"];let Ji=!1;function Fh(){Ji=!1}class G1{constructor(e){this.lineWrapping=e,this.doc=G.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Ih.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Is&&(Ji=!0),this.height=e)}replace(e,t,i){return Re.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,te.ByPosNoHeight,i.setDoc(t),0,0),p=u.to>=h?u:r.lineAt(h,te.ByPosNoHeight,i,0,0);for(f+=p.to-h,h=p.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ie extends ed{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new mt(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Ie||s instanceof ye&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ye?s=new Ie(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):Re.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ye extends Re{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof ye?i[i.length-1]=new ye(r.length+s):i.push(null,new ye(s-1))}if(e>0){let r=i[0];r instanceof ye?i[0]=new ye(e+r.length):i.unshift(new ye(e-1),null)}return Re.of(i)}decomposeLeft(e,t){t.push(new ye(e-1),null)}decomposeRight(e,t){t.push(null,new ye(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new ye(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=Is&&(a=-2);let u=new Ie(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ye(r-l).updateHeight(e,l));let h=Re.of(o);return(a<0||Math.abs(h.height-this.height)>=Is||Math.abs(a-this.heightMetrics(e,t).perLine)>=Is)&&(Ji=!0),lr(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class H1 extends Re{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==te.ByPosNoHeight?te.ByPosNoHeight:te.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,te.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Wh(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?Re.of(this.break?[e,null,t]:[e,t]):(this.left=lr(this.left,e),this.right=lr(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Wh(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ye&&(i=n[e+1])instanceof ye&&n.splice(e-1,3,new ye(t.length+1+i.length))}const K1=5;class Oa{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ie?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ie(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=K1)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ie(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ye(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ie)return e;let t=new Ie(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ie)&&!this.isCovered?this.nodes.push(new Ie(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=Math.min(h==n.parentNode?s.innerHeight:a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function ib(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class go{constructor(e,t,i,s){this.from=e,this.to=t,this.size=i,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new G1(t),this.stateDeco=e.facet(Yn).filter(i=>typeof i!="function"),this.heightMap=Re.empty().applyChanges(this.stateDeco,G.empty,this.heightOracle.setDoc(e.doc),[new Je(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=_.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new vs(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Uh:new ga(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Pn(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Yn).filter(c=>typeof c!="function");let s=e.changedRanges,r=Je.extendWithRanges(s,J1(i,this.stateDeco,e?e.changes:pe.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Fh(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Ji)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Lu)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ie.RTL:ie.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:Q,scaleY:k}=au(t,l);(Q>.005&&Math.abs(this.scaleX-Q)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=Q,this.scaleY=k,h|=8,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=fu(e.scrollDOM);let O=(this.printing?ib:tb)(t,this.paddingTop),g=O.top-this.pixelViewport.top,m=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let w=l.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),a){let Q=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(Q)&&(o=!0),o||s.lineWrapping&&Math.abs(w-this.contentDOMWidth)>s.charWidth){let{lineHeight:k,charWidth:x,textHeight:y}=e.docView.measureTextSize();o=k>0&&s.refresh(r,k,x,y,w/x,Q),o&&(e.docView.minWidth=0,h|=8)}g>0&&m>0?c=Math.max(g,m):g<0&&m<0&&(c=Math.min(g,m)),Fh();for(let k of this.viewports){let x=k.from==this.viewport.from?Q:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?Re.empty().applyChanges(this.stateDeco,G.empty,this.heightOracle,[new Je(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new U1(k.from,x))}Ji&&(h|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new vs(s.lineAt(o-i*1e3,te.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,te.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,te.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=ie.LTR&&!i)return[];let l=[],a=(c,f,u,p)=>{if(f-cc&&bb.from>=u.from&&b.to<=u.to&&Math.abs(b.from-c)b.fromw));if(!m){if(fS.from<=f&&S.to>=f)){let S=t.moveToLineBoundary(v.cursor(f),!1,!0).head;S>c&&(f=S)}let b=this.gapSize(u,c,f,p),w=i||b<2e6?b:2e6;m=new go(c,f,b,w)}l.push(m)},h=c=>{if(c.length2e6)for(let x of e)x.from>=c.from&&x.fromc.from&&a(c.from,p,c,f),Ot.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];W.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Pn(this.heightMap.lineAt(e,te.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Pn(this.heightMap.lineAt(this.scaler.fromDOM(e),te.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Pn(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class vs{constructor(e,t){this.from=e,this.to=t}}function sb(n,e,t){let i=[],s=n,r=0;return W.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Ps(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function rb(n,e){for(let t of n)if(e(t))return t}const Uh={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class ga{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,te.ByPos,e,0,0).top,c=t.lineAt(a,te.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function Pn(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new mt(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>Pn(s,e)):n._content)}const $s=E.define({combine:n=>n.join(" ")}),yl=E.define({combine:n=>n.indexOf(!0)>-1}),wl=Ht.newName(),td=Ht.newName(),id=Ht.newName(),nd={"&light":"."+td,"&dark":"."+id};function xl(n,e,t){return new Ht(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const ob=xl("."+wl,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},nd),lb={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mo=L.ie&&L.ie_version<=11;class ab{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new I0,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(L.ie&&L.ie_version<=11||L.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(L.chrome&&L.chrome_version<126)&&(this.editContext=new cb(e),e.state.facet(zt)&&(e.contentDOM.editContext=this.editContext.editContext)),mo&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(zt)?i.root.activeElement!=this.dom:!Vs(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(L.ie&&L.ie_version<=11||L.android&&L.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Rn(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Xn(e.root);if(!t)return!1;let i=L.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&hb(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Vs(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Xi(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Vs(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new $1(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,s=Nu(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Hh(t,e.previousSibling||e.target.previousSibling,-1),s=Hh(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(zt)!=e.state.facet(zt)&&(e.view.contentDOM.editContext=e.state.facet(zt)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Hh(n,e,t){for(;e;){let i=J.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Kh(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return Rn(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function hb(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return Kh(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?Kh(n,t):null}class cb{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:s}=e.state.selection.main,r={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:G.of(i.text.split(` +`))};r.from==this.from&&sthis.to&&(r.to=s),!(r.from==r.to&&!r.insert.length)&&(this.pendingContextChange=r,e.state.readOnly||pa(e,r,v.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(_.mark({attributes:{style:a}}).range(this.toEditorPos(r.rangeStart),this.toEditorPos(r.rangeEnd)))}}e.dispatch({effects:_u.of(_.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Xn(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class R{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||F0(e.parent)||document,this.viewState=new Gh(e.state||H.create(e)),e.scrollTo&&e.scrollTo.is(xs)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(kn).map(s=>new uo(s));for(let s of this.plugins)s.update(this);this.observer=new ab(this),this.inputState=new R1(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Zh(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof he?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(Hu))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Ku(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(H.phrases)!=this.state.facet(H.phrases))return this.setState(r);s=or.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:p}=u.state.selection;f=new ji(p.empty?p:v.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of u.effects)p.is(xs)&&(f=p.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=ar.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(vn)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet($s)!=s.state.facet($s)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(Ol))try{u(s)}catch(p){qe(this.state,p,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Nu(this,c)&&h.force&&Xi(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Gh(e),this.plugins=e.facet(kn).map(i=>new uo(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Zh(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(kn),i=e.state.facet(kn);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new uo(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(fu(i))r=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(s);r=p.from,o=p.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(p=>{try{return p.read(this)}catch(O){return qe(this.state,O),Jh}}),f=or.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let p=0;p1||O<-1){s=s+O,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Ol))l(t)}get themeClasses(){return wl+" "+(this.state.facet(yl)?id:td)+" "+this.state.facet($s)}updateAttrs(){let e=ec(this,qu,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(zt)?"true":"false",class:"cm-content",style:`${L.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),ec(this,ua,t);let i=this.observer.ignore(()=>{let s=hl(this.contentDOM,this.contentAttrs,t),r=hl(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(R.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(vn);let e=this.state.facet(R.cspNonce);Ht.mount(this.root,this.styleModules.concat(ob).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Oo(this,e,Lh(this,e,t,i))}moveByGroup(e,t){return Oo(this,e,Lh(this,e,t,i=>k1(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return v.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return S1(this,e,t,i)}moveVertically(e,t,i){return Oo(this,e,v1(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Vu(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[It.find(r,e-s.from,-1,t)];return Lr(i,o.dir==ie.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Eu)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>fb)return Pu(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Qu(r.isolates,i=Ah(this,e))))return r.order;i||(i=Ah(this,e));let s=o1(e.text,t,i);return this.bidiCache.push(new ar(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||L.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{hu(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return xs.of(new ji(typeof e=="number"?v.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return xs.of(new ji(v.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return fe.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return fe.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Ht.newName(),s=[$s.of(i),vn.of(xl(`.${i}`,e))];return t&&t.dark&&s.push(yl.of(!0)),s}static baseTheme(e){return si.lowest(vn.of(xl("."+wl,e,nd)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&J.get(i)||J.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}R.styleModule=vn;R.inputHandler=Ru;R.clipboardInputFilter=ca;R.clipboardOutputFilter=fa;R.scrollHandler=Du;R.focusChangeEffect=Tu;R.perLineTextDirection=Eu;R.exceptionSink=Mu;R.updateListener=Ol;R.editable=zt;R.mouseSelectionStyle=Zu;R.dragMovesSelection=Au;R.clickAddsSelectionRange=Cu;R.decorations=Yn;R.outerDecorations=Xu;R.atomicRanges=da;R.bidiIsolatedRanges=ju;R.scrollMargins=Yu;R.darkTheme=yl;R.cspNonce=E.define({combine:n=>n.length?n[0]:""});R.contentAttributes=ua;R.editorAttributes=qu;R.lineWrapping=R.contentAttributes.of({class:"cm-lineWrapping"});R.announce=X.define();const fb=4096,Jh={};class ar{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:ie.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&al(o,t)}return t}const ub=L.mac?"mac":L.windows?"win":L.linux?"linux":"key";function db(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Ob(n,e,t){return rd(sd(n.state),e,n,t)}let Bt=null;const gb=4e3;function mb(n,e=ub){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let p=t[o]||(t[o]=Object.create(null)),O=l.split(/ (?!$)/).map(b=>db(b,e));for(let b=1;b{let Q=Bt={view:S,prefix:w,scope:o};return setTimeout(()=>{Bt==Q&&(Bt=null)},gb),!0}]})}let g=O.join(" ");s(g,!1);let m=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((u=(f=p._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&m.run.push(a),h&&(m.preventDefault=!0),c&&(m.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(p=>f(p,Sl))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let Sl=null;function rd(n,e,t,i){Sl=e;let s=z0(e),r=we(s,0),o=Ue(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;Bt&&Bt.view==t&&Bt.scope==i&&(l=Bt.prefix+" ",Fu.indexOf(e.keyCode)<0&&(h=!0,Bt=null));let f=new Set,u=m=>{if(m){for(let b of m.run)if(!f.has(b)&&(f.add(b),b(t)))return m.stopPropagation&&(c=!0),!0;m.preventDefault&&(m.stopPropagation&&(c=!0),h=!0)}return!1},p=n[i],O,g;return p&&(u(p[l+Cs(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(L.windows&&e.ctrlKey&&e.altKey)&&(O=Kt[e.keyCode])&&O!=s?(u(p[l+Cs(O,e,!0)])||e.shiftKey&&(g=qn[e.keyCode])!=s&&g!=O&&u(p[l+Cs(g,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(p[l+Cs(s,e,!0)])&&(a=!0),!a&&u(p._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),Sl=null,a}class ss{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=od(e);return[new ss(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return bb(e,t,i)}}function od(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==ie.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function ic(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function bb(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==ie.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=od(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),p=ml(n,i),O=ml(n,s),g=p.type==Me.Text?p:null,m=O.type==Me.Text?O:null;if(g&&(n.lineWrapping||p.widgetLineBreaks)&&(g=ic(n,i,1,g)),m&&(n.lineWrapping||O.widgetLineBreaks)&&(m=ic(n,s,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return w(S(t.from,t.to,g));{let k=g?S(t.from,null,g):Q(p,!1),x=m?S(null,t.to,m):Q(O,!0),y=[];return(g||p).to<(m||O).from-(g&&m?1:0)||p.widgetLineBreaks>1&&k.bottom+n.defaultLineHeight/2C&&B.from=re)break;Be>U&&T(Math.max(ue,U),k==null&&ue<=C,Math.min(Be,re),x==null&&Be>=q,ze.dir)}if(U=me.to+1,U>=re)break}return M.length==0&&T(C,k==null,q,x==null,n.textDirection),{top:P,bottom:A,horizontal:M}}function Q(k,x){let y=l.top+(x?k.top:k.bottom);return{top:y,bottom:y,horizontal:[]}}}function yb(n,e){return n.constructor==e.constructor&&n.eq(e)}class wb{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Fs)!=e.state.facet(Fs)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Fs);for(;t!yb(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Fs=E.define();function ld(n){return[fe.define(e=>new wb(e,n)),Fs.of(n)]}const ad=!L.ios,zn=E.define({combine(n){return Qt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function xb(n={}){return[zn.of(n),Sb,kb,vb,Lu.of(!0)]}function hd(n){return n.startState.facet(zn)!=n.state.facet(zn)}const Sb=ld({above:!0,markers(n){let{state:e}=n,t=e.facet(zn),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||ad:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:v.cursor(s.head,s.head>s.anchor?-1:1);for(let a of ss.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=hd(n);return t&&nc(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){nc(e.state,n)},class:"cm-cursorLayer"});function nc(n,e){e.style.animationDuration=n.facet(zn).cursorBlinkRate+"ms"}const kb=ld({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:ss.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||hd(n)},class:"cm-selectionLayer"}),kl={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};ad&&(kl[".cm-line"].caretColor=kl[".cm-content"].caretColor="transparent !important");const vb=si.highest(R.theme(kl)),cd=X.define({map(n,e){return n==null?null:e.mapPos(n)}}),$n=be.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(cd)?i.value:t,n)}}),Qb=fe.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field($n);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field($n)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field($n),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field($n)!=n&&this.view.dispatch({effects:cd.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Pb(){return[$n,Qb]}function sc(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function $b(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Cb{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Ut,i=t.add.bind(t);for(let{from:s,to:r}of $b(e,this.maxLength))sc(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(b.range(g,m));if(a==h)for(this.regexp.lastIndex=c-a.from;(p=this.regexp.exec(a.text))&&p.indexthis.addMatch(m,e,g,O));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const vl=/x/.unicode!=null?"gu":"g",Ab=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,vl),Zb={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let bo=null;function Mb(){var n;if(bo==null&&typeof document<"u"&&document.body){let e=document.body.style;bo=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return bo||!1}const Ws=E.define({combine(n){let e=Qt(n,{render:null,specialChars:Ab,addSpecialChars:null});return(e.replaceTabs=!Mb())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,vl)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,vl)),e}});function Rb(n={}){return[Ws.of(n),Tb()]}let rc=null;function Tb(){return rc||(rc=fe.fromClass(class{constructor(n){this.view=n,this.decorations=_.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Ws)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Cb({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=we(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=hn(o.text,l,i-o.from);return _.replace({widget:new _b((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=_.replace({widget:new Db(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Ws);n.startState.facet(Ws)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Eb="•";function Lb(n){return n>=32?Eb:n==10?"␤":String.fromCharCode(9216+n)}class Db extends _t{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Lb(this.code),i=e.state.phrase("Control character")+" "+(Zb[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class _b extends _t{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function qb(){return jb}const Xb=_.line({class:"cm-activeLine"}),jb=fe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(Xb.range(s.from)),e=s.from)}return _.set(t)}},{decorations:n=>n.decorations}),Ql=2e3;function Yb(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ql||t.off>Ql||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(v.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=tl(h.text,o,n.tabSize,!0);if(c<0)r.push(v.cursor(h.to));else{let f=tl(h.text,l,n.tabSize);r.push(v.range(h.from+c,h.from+f))}}}return r}function zb(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oc(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Ql?-1:s==i.length?zb(n,e.clientX):hn(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Bb(n,e){let t=oc(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oc(n,s);if(!l)return i;let a=Yb(n.state,t,l);return a.length?o?v.create(a.concat(i.ranges)):v.create(a):i}}:null}function Vb(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return R.mouseSelectionStyle.of((t,i)=>e(i)?Bb(t,i):null)}const Nb={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},Ib={style:"cursor: crosshair"};function Fb(n={}){let[e,t]=Nb[n.key||"Alt"],i=fe.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,R.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?Ib:null})]}const bn="-10000px";class fd{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function Wb(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const yo=E.define({combine:n=>{var e,t,i;return{position:L.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Wb}}}),lc=new WeakMap,ma=fe.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(yo);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new fd(n,ba,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(yo);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=bn,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(L.gecko)i=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==bn&&s.style.left=="0px"){let r=s.getBoundingClientRect();i=Math.abs(r.top+1e4)>1||Math.abs(r.left)>1}}if(i||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((s,r)=>{let o=this.manager.tooltipViews[r];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(yo).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1){c.style.top=bn;continue}let p=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=p?7:0,g=u.right-u.left,m=(e=lc.get(h))!==null&&e!==void 0?e:u.bottom-u.top,b=h.offset||Ub,w=this.view.textDirection==ie.LTR,S=u.width>i.right-i.left?w?i.left:i.right-u.width:w?Math.max(i.left,Math.min(f.left-(p?14:0)+b.x,i.right-g)):Math.min(Math.max(i.left,f.left-g+(p?14:0)-b.x),i.right-g),Q=this.above[l];!a.strictSide&&(Q?f.top-(u.bottom-u.top)-b.yi.bottom)&&Q==i.bottom-f.bottom>f.top-i.top&&(Q=this.above[l]=!Q);let k=(Q?f.top-i.top:i.bottom-f.bottom)-O;if(kS&&P.topx&&(x=Q?P.top-m-2-O:P.bottom+O+2);if(this.position=="absolute"?(c.style.top=(x-n.parent.top)/r+"px",c.style.left=(S-n.parent.left)/s+"px"):(c.style.top=x/r+"px",c.style.left=S/s+"px"),p){let P=f.left+(w?b.x:-b.x)-(S+14-7);p.style.left=P/s+"px"}h.overlap!==!0&&o.push({left:S,top:x,right:y,bottom:x+m}),c.classList.toggle("cm-tooltip-above",Q),c.classList.toggle("cm-tooltip-below",!Q),h.positioned&&h.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=bn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Gb=R.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ub={x:0,y:0},ba=E.define({enables:[ma,Gb]}),hr=E.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class qr{static create(e){return new qr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new fd(e,hr,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Hb=ba.compute([hr],n=>{let e=n.facet(hr);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:qr.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Kb{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==ie.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>qe(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(ma),t=e?e.manager.tooltips.findIndex(i=>i.create==qr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!Jb(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!ey(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const As=4;function Jb(n,e){let{left:t,right:i,top:s,bottom:r}=n.getBoundingClientRect(),o;if(o=n.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();s=Math.min(l.top,s),r=Math.max(l.bottom,r)}return e.clientX>=t-As&&e.clientX<=i+As&&e.clientY>=s-As&&e.clientY<=r+As}function ey(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function ty(n,e={}){let t=X.define(),i=be.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,Se.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(iy)&&(s=[]);return s},provide:s=>hr.from(s)});return{active:i,extension:[i,fe.define(s=>new Kb(s,n,i,t,e.hoverTime||300)),Hb]}}function ud(n,e){let t=n.plugin(ma);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const iy=X.define(),ac=E.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Bn(n,e){let t=n.plugin(dd),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const dd=fe.fromClass(class{constructor(n){this.input=n.state.facet(Vn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ac);this.top=new Zs(n,!0,e.topContainer),this.bottom=new Zs(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ac);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Zs(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Zs(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Vn);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>R.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Zs{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hc(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hc(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function hc(n){let e=n.nextSibling;return n.remove(),e}const Vn=E.define({enables:dd});class Lt extends Si{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Lt.prototype.elementClass="";Lt.prototype.toDOM=void 0;Lt.prototype.mapMode=Se.TrackBefore;Lt.prototype.startSide=Lt.prototype.endSide=-1;Lt.prototype.point=!0;const Gs=E.define(),ny=E.define(),sy={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>W.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},En=E.define();function ry(n){return[pd(),En.of(Object.assign(Object.assign({},sy),n))]}const Pl=E.define({combine:n=>n.some(e=>e)});function pd(n){let e=[oy];return n&&n.fixed===!1&&e.push(Pl.of(!0)),e}const oy=fe.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(En).map(e=>new fc(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(Pl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Pl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=W.iter(this.view.state.facet(Gs),this.view.viewport.from),i=[],s=this.gutters.map(r=>new ly(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==Me.Text&&o){$l(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==Me.Text){$l(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(En),t=n.state.facet(En),i=n.docChanged||n.heightChanged||n.viewportChanged||!W.eq(n.startState.facet(Gs),n.state.facet(Gs),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new fc(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>R.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==ie.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function cc(n){return Array.isArray(n)?n:[n]}function $l(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class ly{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=W.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new Od(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];$l(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),s=i?[i]:null;for(let r of e.state.facet(ny)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fc{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=cc(t.markers(e)),t.initialSpacer&&(this.spacer=new Od(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=cc(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!W.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Od{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),ay(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class wo extends Lt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function xo(n,e){return n.state.facet(Ei).formatNumber(e,n.state)}const fy=En.compute([Ei],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(hy)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new wo(xo(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,i)=>{for(let s of e.state.facet(cy)){let r=s(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Ei)!=e.state.facet(Ei),initialSpacer(e){return new wo(xo(e,uc(e.state.doc.lines)))},updateSpacer(e,t){let i=xo(t.view,uc(t.view.state.doc.lines));return i==e.number?e:new wo(i)},domEventHandlers:n.facet(Ei).domEventHandlers}));function uy(n={}){return[Ei.of(n),pd(),fy]}function uc(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(dy.range(s)))}return W.of(e)});function Oy(){return py}const gd=1024;let gy=0;class So{constructor(e,t){this.from=e,this.to=t}}class I{constructor(e={}){this.id=gy++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ye.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}I.closedBy=new I({deserialize:n=>n.split(" ")});I.openedBy=new I({deserialize:n=>n.split(" ")});I.group=new I({deserialize:n=>n.split(" ")});I.isolate=new I({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});I.contextHash=new I({perNode:!0});I.lookAhead=new I({perNode:!0});I.mounted=new I({perNode:!0});class cr{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[I.mounted.id]}}const my=Object.create(null);class Ye{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):my,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Ye(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(I.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(I.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}Ye.none=new Ye("",Object.create(null),0,8);class ya{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|Oe.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Sa(Ye.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new ce(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new ce(Ye.none,t,i,s)))}static build(e){return xy(e)}}ce.empty=new ce(Ye.none,[],[],0);class wa{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new wa(this.buffer,this.index)}}class ei{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ye.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Nn(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(md(s,i,f,f+c.length)){if(c instanceof ei){if(r&Oe.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new bt(new by(o,c,e,f),null,u)}else if(r&Oe.IncludeAnonymous||!c.type.isAnonymous||xa(c)){let u;if(!(r&Oe.IgnoreMounts)&&(u=cr.get(c))&&!u.overlay)return new je(u.tree,f,e,o);let p=new je(c,f,e,o);return r&Oe.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&Oe.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&Oe.IgnoreOverlays)&&(s=cr.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new je(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function pc(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function Cl(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class by{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class bt extends bd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new bt(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Oe.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new bt(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new bt(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new bt(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new ce(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function yd(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new je(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(Nn(l,e,t,!1))}}return s?yd(s):i}class Al{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof je)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof je?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&Oe.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Oe.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Oe.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&Oe.IncludeAnonymous||l instanceof ei||!l.type.isAnonymous||xa(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return Cl(this._tree,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function xa(n){return n.children.some(e=>e instanceof ei||!e.type.isAnonymous||xa(e))}function xy(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=gd,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new wa(t,t.length):t,a=i.types,h=0,c=0;function f(k,x,y,P,A,M){let{id:T,start:C,end:q,size:B}=l,U=c,re=h;for(;B<0;)if(l.next(),B==-1){let nt=r[T];y.push(nt),P.push(C-k);return}else if(B==-3){h=T;return}else if(B==-4){c=T;return}else throw new RangeError(`Unrecognized record size: ${B}`);let me=a[T],ze,ue,Be=C-k;if(q-C<=s&&(ue=m(l.pos-x,A))){let nt=new Uint16Array(ue.size-ue.skip),Te=l.pos-ue.size,Ee=nt.length;for(;l.pos>Te;)Ee=b(ue.start,nt,Ee);ze=new ei(nt,q-ue.start,i),Be=ue.start-k}else{let nt=l.pos-B;l.next();let Te=[],Ee=[],oi=T>=o?T:-1,$i=0,fs=q;for(;l.pos>nt;)oi>=0&&l.id==oi&&l.size>=0?(l.end<=fs-s&&(O(Te,Ee,C,$i,l.end,fs,oi,U,re),$i=Te.length,fs=l.end),l.next()):M>2500?u(C,nt,Te,Ee):f(C,nt,Te,Ee,oi,M+1);if(oi>=0&&$i>0&&$i-1&&$i>0){let Ya=p(me,re);ze=Sa(me,Te,Ee,0,Te.length,0,q-C,Ya,Ya)}else ze=g(me,Te,Ee,q-C,U-q,re)}y.push(ze),P.push(Be)}function u(k,x,y,P){let A=[],M=0,T=-1;for(;l.pos>x;){let{id:C,start:q,end:B,size:U}=l;if(U>4)l.next();else{if(T>-1&&q=0;B-=3)C[U++]=A[B],C[U++]=A[B+1]-q,C[U++]=A[B+2]-q,C[U++]=U;y.push(new ei(C,A[2]-q,i)),P.push(q-k)}}function p(k,x){return(y,P,A)=>{let M=0,T=y.length-1,C,q;if(T>=0&&(C=y[T])instanceof ce){if(!T&&C.type==k&&C.length==A)return C;(q=C.prop(I.lookAhead))&&(M=P[T]+C.length+q)}return g(k,y,P,A,M,x)}}function O(k,x,y,P,A,M,T,C,q){let B=[],U=[];for(;k.length>P;)B.push(k.pop()),U.push(x.pop()+y-A);k.push(g(i.types[T],B,U,M-A,C-M,q)),x.push(A-y)}function g(k,x,y,P,A,M,T){if(M){let C=[I.contextHash,M];T=T?[C].concat(T):[C]}if(A>25){let C=[I.lookAhead,A];T=T?[C].concat(T):[C]}return new ce(k,x,y,P,T)}function m(k,x){let y=l.fork(),P=0,A=0,M=0,T=y.end-s,C={size:0,start:0,skip:0};e:for(let q=y.pos-k;y.pos>q;){let B=y.size;if(y.id==x&&B>=0){C.size=P,C.start=A,C.skip=M,M+=4,P+=4,y.next();continue}let U=y.pos-B;if(B<0||U=o?4:0,me=y.start;for(y.next();y.pos>U;){if(y.size<0)if(y.size==-3)re+=4;else break e;else y.id>=o&&(re+=4);y.next()}A=me,P+=B,M+=re}return(x<0||P==k)&&(C.size=P,C.start=A,C.skip=M),C.size>4?C:void 0}function b(k,x,y){let{id:P,start:A,end:M,size:T}=l;if(l.next(),T>=0&&P4){let q=l.pos-(T-4);for(;l.pos>q;)y=b(k,x,y)}x[--y]=C,x[--y]=M-k,x[--y]=A-k,x[--y]=P}else T==-3?h=P:T==-4&&(c=P);return y}let w=[],S=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,w,S,-1,0);let Q=(e=n.length)!==null&&e!==void 0?e:w.length?S[0]+w[0].length:0;return new ce(a[n.topID],w.reverse(),S.reverse(),Q)}const Oc=new WeakMap;function Us(n,e){if(!n.isAnonymous||e instanceof ei||e.type!=n)return 1;let t=Oc.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof ce)){t=1;break}t+=Us(n,i)}Oc.set(e,t)}return t}function Sa(n,e,t,i,s,r,o,l,a){let h=0;for(let O=i;O=c)break;x+=y}if(S==Q+1){if(x>c){let y=O[Q];p(y.children,y.positions,0,y.children.length,g[Q]+w);continue}f.push(O[Q])}else{let y=g[S-1]+O[S-1].length-k;f.push(Sa(n,O,g,Q,S,k,y,null,a))}u.push(k+w-r)}}return p(e,t,i,s,0),(l||a)(f,u,o)}class Sy{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof bt?this.setBuffer(e.context.buffer,e.index,t):e instanceof je&&this.map.set(e.tree,t)}get(e){return e instanceof bt?this.getBuffer(e.context.buffer,e.index):e instanceof je?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class wi{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new wi(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let p=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=p>=O?null:new wi(p,O,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew So(s.from,s.to)):[new So(0,0)]:[new So(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class ky{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new I({perNode:!0});let vy=0;class Ge{constructor(e,t,i,s){this.name=e,this.set=t,this.base=i,this.modified=s,this.id=vy++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Ge&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Ge(i,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new fr(e);return i=>i.modified.indexOf(t)>-1?i:fr.get(i.base||i,i.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Qy=0;class fr{constructor(e){this.name=e,this.instances=[],this.id=Qy++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Py(t,l.modified));if(i)return i;let s=[],r=new Ge(e.name,s,e,t);for(let l of t)l.instances.push(r);let o=$y(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(fr.get(l,a));return r}}function Py(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function $y(n){let e=[[]];for(let t=0;ti.length-t.length)}function xd(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let p=s[f++];if(f==s.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new ur(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return Sd.add(e)}const Sd=new I;class ur{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function Cy(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Ay(n,e,t,i=0,s=n.length){let r=new Zy(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Zy{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(p=>!p.scope||p.scope(o)));let h=s,c=My(e)||ur.empty,f=Cy(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(I.mounted);if(u&&u.overlay){let p=e.node.enter(u.overlay[0].from+l,1),O=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,b=l;;m++){let w=m=S||!e.nextSibling())););if(!w||S>i)break;b=w.to+l,b>t&&(this.highlightRange(p.cursor(),Math.max(t,w.from+l),Math.min(i,b),"",O),this.startSpan(Math.min(i,b),h))}g&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function My(n){let e=n.type.prop(Sd);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Z=Ge.define,Rs=Z(),jt=Z(),gc=Z(jt),mc=Z(jt),Yt=Z(),Ts=Z(Yt),ko=Z(Yt),pt=Z(),li=Z(pt),ut=Z(),dt=Z(),Zl=Z(),yn=Z(Zl),Es=Z(),d={comment:Rs,lineComment:Z(Rs),blockComment:Z(Rs),docComment:Z(Rs),name:jt,variableName:Z(jt),typeName:gc,tagName:Z(gc),propertyName:mc,attributeName:Z(mc),className:Z(jt),labelName:Z(jt),namespace:Z(jt),macroName:Z(jt),literal:Yt,string:Ts,docString:Z(Ts),character:Z(Ts),attributeValue:Z(Ts),number:ko,integer:Z(ko),float:Z(ko),bool:Z(Yt),regexp:Z(Yt),escape:Z(Yt),color:Z(Yt),url:Z(Yt),keyword:ut,self:Z(ut),null:Z(ut),atom:Z(ut),unit:Z(ut),modifier:Z(ut),operatorKeyword:Z(ut),controlKeyword:Z(ut),definitionKeyword:Z(ut),moduleKeyword:Z(ut),operator:dt,derefOperator:Z(dt),arithmeticOperator:Z(dt),logicOperator:Z(dt),bitwiseOperator:Z(dt),compareOperator:Z(dt),updateOperator:Z(dt),definitionOperator:Z(dt),typeOperator:Z(dt),controlOperator:Z(dt),punctuation:Zl,separator:Z(Zl),bracket:yn,angleBracket:Z(yn),squareBracket:Z(yn),paren:Z(yn),brace:Z(yn),content:pt,heading:li,heading1:Z(li),heading2:Z(li),heading3:Z(li),heading4:Z(li),heading5:Z(li),heading6:Z(li),contentSeparator:Z(pt),list:Z(pt),quote:Z(pt),emphasis:Z(pt),strong:Z(pt),link:Z(pt),monospace:Z(pt),strikethrough:Z(pt),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:Es,documentMeta:Z(Es),annotation:Z(Es),processingInstruction:Z(Es),definition:Ge.defineModifier("definition"),constant:Ge.defineModifier("constant"),function:Ge.defineModifier("function"),standard:Ge.defineModifier("standard"),local:Ge.defineModifier("local"),special:Ge.defineModifier("special")};for(let n in d){let e=d[n];e instanceof Ge&&(e.name=n)}kd([{tag:d.link,class:"tok-link"},{tag:d.heading,class:"tok-heading"},{tag:d.emphasis,class:"tok-emphasis"},{tag:d.strong,class:"tok-strong"},{tag:d.keyword,class:"tok-keyword"},{tag:d.atom,class:"tok-atom"},{tag:d.bool,class:"tok-bool"},{tag:d.url,class:"tok-url"},{tag:d.labelName,class:"tok-labelName"},{tag:d.inserted,class:"tok-inserted"},{tag:d.deleted,class:"tok-deleted"},{tag:d.literal,class:"tok-literal"},{tag:d.string,class:"tok-string"},{tag:d.number,class:"tok-number"},{tag:[d.regexp,d.escape,d.special(d.string)],class:"tok-string2"},{tag:d.variableName,class:"tok-variableName"},{tag:d.local(d.variableName),class:"tok-variableName tok-local"},{tag:d.definition(d.variableName),class:"tok-variableName tok-definition"},{tag:d.special(d.variableName),class:"tok-variableName2"},{tag:d.definition(d.propertyName),class:"tok-propertyName tok-definition"},{tag:d.typeName,class:"tok-typeName"},{tag:d.namespace,class:"tok-namespace"},{tag:d.className,class:"tok-className"},{tag:d.macroName,class:"tok-macroName"},{tag:d.propertyName,class:"tok-propertyName"},{tag:d.operator,class:"tok-operator"},{tag:d.comment,class:"tok-comment"},{tag:d.meta,class:"tok-meta"},{tag:d.invalid,class:"tok-invalid"},{tag:d.punctuation,class:"tok-punctuation"}]);var vo;const Li=new I;function vd(n){return E.define({combine:n?e=>e.concat(n):void 0})}const ka=new I;class st{constructor(e,t,i=[],s=""){this.data=e,this.name=s,H.prototype.hasOwnProperty("tree")||Object.defineProperty(H.prototype,"tree",{get(){return ge(this)}}),this.parser=t,this.extension=[ti.of(this),H.languageData.of((r,o,l)=>{let a=bc(r,o,l),h=a.type.prop(Li);if(!h)return[];let c=r.facet(h),f=a.type.prop(ka);if(f){let u=a.resolve(o-a.from,l);for(let p of f)if(p.test(u,r)){let O=r.facet(p.facet);return p.type=="replace"?O:O.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return bc(e,t,i).type.prop(Li)==this.data}findRegions(e){let t=e.facet(ti);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(Li)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(I.mounted);if(l){if(l.tree.prop(Li)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new dr(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ge(n){let e=n.field(st.state,!1);return e?e.tree:ce.empty}class Ry{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let wn=null;class pr{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new pr(e,t,[],ce.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Ry(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=ce.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(wi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=wn;wn=this;try{return e()}finally{wn=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=yc(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=wi.applyChanges(i,a),s=ce.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=yc(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends wd{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=wn;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new ce(Ye.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return wn}}function yc(n,e,t){return wi.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class en{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new en(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=pr.create(e.facet(ti).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new en(i)}}st.state=be.define({create:en.init,update(n,e){for(let t of e.effects)if(t.is(st.setState))return t.value;return e.startState.facet(ti)!=e.state.facet(ti)?en.init(e.state):n.apply(e)}});let Qd=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Qd=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Qo=typeof navigator<"u"&&(!((vo=navigator.scheduling)===null||vo===void 0)&&vo.isInputPending)?()=>navigator.scheduling.isInputPending():null,Ty=fe.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(st.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(st.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Qd(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Qo&&Qo()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:st.setState.of(new en(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>qe(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ti=E.define({combine(n){return n.length?n[0]:null},enables:n=>[st.state,Ty,R.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ey{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Ly=E.define(),Xr=E.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Or(n){let e=n.facet(Xr);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function In(n,e){let t="",i=n.tabSize,s=n.facet(Xr)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?Dy(n,t,e):null}class jr{constructor(e,t={}){this.state=e,this.options=t,this.unit=Or(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return hn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Pd=new I;function Dy(n,e,t){let i=e.resolveStack(t),s=i.node.enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o!=i.node;o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return $d(i,n,t)}function $d(n,e,t){for(let i=n;i;i=i.next){let s=qy(i.node);if(s)return s(Qa.create(e,t,i))}return 0}function _y(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function qy(n){let e=n.type.prop(Pd);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(I.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Cd(o,!0,1,void 0,r&&!_y(o)?s.from:void 0)}return n.parent==null?Xy:null}function Xy(){return 0}class Qa extends jr{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new Qa(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(jy(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return $d(this.context.next,this.base,this.pos)}}function jy(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function Yy(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}l=a.to}}function zy({closing:n,align:e=!0,units:t=1}){return i=>Cd(i,e,t,n)}function Cd(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?Yy(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const By=n=>n.baseIndent;function Po({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Vy=200;function Ny(){return H.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+Vy)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=va(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],p=In(o,f);u!=p&&a.push({from:c.from,to:c.from+u.length,insert:p})}return a.length?[n,{changes:a,sequential:!0}]:n})}const Iy=E.define(),Ad=new I;function Fy(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function Gy(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function gr(n,e,t){for(let i of n.facet(Iy)){let s=i(n,e,t);if(s)return s}return Wy(n,e,t)}function Zd(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const Yr=X.define({map:Zd}),rs=X.define({map:Zd});function Md(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const Pi=be.define({create(){return _.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Yr)&&!Uy(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Pa),s=i?_.replace({widget:new nw(i(e.state,t.value))}):wc;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(rs)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>R.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function Uy(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function Rd(n,e){return n.field(Pi,!1)?e:e.concat(X.appendConfig.of(Ed()))}const Hy=n=>{for(let e of Md(n)){let t=gr(n.state,e.from,e.to);if(t)return n.dispatch({effects:Rd(n.state,[Yr.of(t),Td(n,t)])}),!0}return!1},Ky=n=>{if(!n.state.field(Pi,!1))return!1;let e=[];for(let t of Md(n)){let i=mr(n.state,t.from,t.to);i&&e.push(rs.of(i),Td(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function Td(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return R.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const Jy=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(Pi,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(rs.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},tw=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Hy},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ky},{key:"Ctrl-Alt-[",run:Jy},{key:"Ctrl-Alt-]",run:ew}],iw={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Pa=E.define({combine(n){return Qt(n,iw)}});function Ed(n){let e=[Pi,ow];return n&&e.push(Pa.of(n)),e}function Ld(n,e){let{state:t}=n,i=t.facet(Pa),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=mr(n.state,l.from,l.to);a&&n.dispatch({effects:rs.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const wc=_.replace({widget:new class extends _t{toDOM(n){return Ld(n,null)}}});class nw extends _t{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ld(e,this.value)}}const sw={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class $o extends Lt{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function rw(n={}){let e=Object.assign(Object.assign({},sw),n),t=new $o(e,!0),i=new $o(e,!1),s=fe.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(ti)!=o.state.facet(ti)||o.startState.field(Pi,!1)!=o.state.field(Pi,!1)||ge(o.startState)!=ge(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Ut;for(let a of o.viewportLineBlocks){let h=mr(o.state,a.from,a.to)?i:gr(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,ry({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||W.empty},initialSpacer(){return new $o(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=mr(o.state,l.from,l.to);if(h)return o.dispatch({effects:rs.of(h)}),!0;let c=gr(o.state,l.from,l.to);return c?(o.dispatch({effects:Yr.of(c)}),!0):!1}})}),Ed()]}const ow=R.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class os{constructor(e,t){this.specs=e;let i;function s(l){let a=Ht.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof st?l=>l.prop(Li)==o.data:o?l=>l==o:void 0,this.style=kd(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Ht(i):null,this.themeType=t.themeType}static define(e,t){return new os(e,t||{})}}const Ml=E.define(),Dd=E.define({combine(n){return n.length?[n[0]]:null}});function Co(n){let e=n.facet(Ml);return e.length?e:n.facet(Dd)}function _d(n,e){let t=[aw],i;return n instanceof os&&(n.module&&t.push(R.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Dd.of(n)):i?t.push(Ml.computeN([R.darkTheme],s=>s.facet(R.darkTheme)==(i=="dark")?[n]:[])):t.push(Ml.of(n)),t}class lw{constructor(e){this.markCache=Object.create(null),this.tree=ge(e.state),this.decorations=this.buildDeco(e,Co(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ge(e.state),i=Co(e.state),s=i!=Co(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return _.none;let i=new Ut;for(let{from:s,to:r}of e.visibleRanges)Ay(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=_.mark({class:a})))},s,r);return i.finish()}}const aw=si.high(fe.fromClass(lw,{decorations:n=>n.decorations})),hw=os.define([{tag:d.meta,color:"#404740"},{tag:d.link,textDecoration:"underline"},{tag:d.heading,textDecoration:"underline",fontWeight:"bold"},{tag:d.emphasis,fontStyle:"italic"},{tag:d.strong,fontWeight:"bold"},{tag:d.strikethrough,textDecoration:"line-through"},{tag:d.keyword,color:"#708"},{tag:[d.atom,d.bool,d.url,d.contentSeparator,d.labelName],color:"#219"},{tag:[d.literal,d.inserted],color:"#164"},{tag:[d.string,d.deleted],color:"#a11"},{tag:[d.regexp,d.escape,d.special(d.string)],color:"#e40"},{tag:d.definition(d.variableName),color:"#00f"},{tag:d.local(d.variableName),color:"#30a"},{tag:[d.typeName,d.namespace],color:"#085"},{tag:d.className,color:"#167"},{tag:[d.special(d.variableName),d.macroName],color:"#256"},{tag:d.definition(d.propertyName),color:"#00c"},{tag:d.comment,color:"#940"},{tag:d.invalid,color:"#f00"}]),cw=R.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),qd=1e4,Xd="()[]{}",jd=E.define({combine(n){return Qt(n,{afterCursor:!0,brackets:Xd,maxScanDistance:qd,renderMatch:dw})}}),fw=_.mark({class:"cm-matchingBracket"}),uw=_.mark({class:"cm-nonmatchingBracket"});function dw(n){let e=[],t=n.matched?fw:uw;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const pw=be.define({create(){return _.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(jd);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=yt(e.state,s.head,-1,i)||s.head>0&&yt(e.state,s.head-1,1,i)||i.afterCursor&&(yt(e.state,s.head,1,i)||s.headR.decorations.from(n)}),Ow=[pw,cw];function gw(n={}){return[jd.of(n),Ow]}const mw=new I;function Rl(n,e,t){let i=n.prop(e<0?I.openedBy:I.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Tl(n){let e=n.type.prop(mw);return e?e(n.node):n}function yt(n,e,t,i={}){let s=i.maxScanDistance||qd,r=i.brackets||Xd,o=ge(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=Rl(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return bw(n,e,t,a,c,h,r)}}return yw(n,e,t,o,l.type,s,r)}function bw(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let p=c.value;t<0&&(u+=p.length);let O=e+u*t;for(let g=t>0?0:p.length-1,m=t>0?p.length:-1;g!=m;g+=t){let b=o.indexOf(p[g]);if(!(b<0||i.resolveInner(O+g,1).type!=s))if(b%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:O+g,to:O+g+1},matched:b>>1==a>>1};f--}}t>0&&(u+=p.length)}return c.done?{start:h,matched:!1}:null}const ww=Object.create(null),xc=[Ye.none],Sc=[],kc=Object.create(null),xw=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xw[n]=Sw(ww,e);function Ao(n,e){Sc.indexOf(n)>-1||(Sc.push(n),console.warn(e))}function Sw(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||d[h];c?typeof c=="function"?a.length?a=a.map(c):Ao(h,`Modifier ${h} used at start of tag`):a.length?Ao(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:Ao(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=kc[s];if(r)return r.id;let o=kc[s]=Ye.define({id:xc.length,name:i,props:[xd({[i]:t})]});return xc.push(o),o.id}ie.RTL,ie.LTR;const kw=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=Ca(n.state,t.from);return i.line?vw(n):i.block?Pw(n):!1};function $a(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const vw=$a(Aw,0),Qw=$a(Yd,0),Pw=$a((n,e)=>Yd(n,e,Cw(e)),0);function Ca(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const xn=50;function $w(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-xn,i),o=n.sliceDoc(s,s+xn),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*xn?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+xn),f=n.sliceDoc(s-xn,s));let u=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(f)[0].length,O=f.length-p-t.length;return c.slice(u,u+e.length)==e&&f.slice(O,O+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-p-t.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function Cw(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Yd(n,e,t=e.selection.ranges){let i=t.map(r=>Ca(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>$w(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,p=u==f.length,O=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const El=Dt.define(),Zw=Dt.define(),Mw=E.define(),zd=E.define({combine(n){return Qt(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),Bd=be.define({create(){return wt.empty},update(n,e){let t=e.state.facet(zd),i=e.annotation(El);if(i){let a=Xe.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=br(c,c.length,t.minDepth,a):c=Id(c,e.startState.selection),new wt(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(Zw);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(he.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Xe.fromTransaction(e),o=e.annotation(he.time),l=e.annotation(he.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new wt(n.done.map(Xe.fromJSON),n.undone.map(Xe.fromJSON))}});function Rw(n={}){return[Bd,zd.of(n),R.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Vd:e.inputType=="historyRedo"?Ll:null;return i?(e.preventDefault(),i(t)):!1}})]}function zr(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Bd,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const Vd=zr(0,!1),Ll=zr(1,!1),Tw=zr(0,!0),Ew=zr(1,!0);class Xe{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Xe(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Xe(e.changes&&pe.fromJSON(e.changes),[],e.mapped&&St.fromJSON(e.mapped),e.startSelection&&v.fromJSON(e.startSelection),e.selectionsAfter.map(v.fromJSON))}static fromTransaction(e,t){let i=He;for(let s of e.startState.facet(Mw)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Xe(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,He)}static selection(e){return new Xe(void 0,He,void 0,void 0,e)}}function br(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function Lw(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function Dw(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Nd(n,e){return n.length?e.length?n.concat(e):n:e}const He=[],_w=200;function Id(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-_w));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),br(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Xe.selection([e])]}function qw(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Zo(n,e){if(!n.length)return n;let t=n.length,i=He;for(;t;){let s=Xw(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Xe.selection(i)]:He}function Xw(n,e,t){let i=Nd(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):He,t);if(!n.changes)return Xe.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Xe(s,X.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const jw=/^(input\.type|delete)($|\.)/;class wt{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new wt(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||jw.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Br(t,e))}function Ce(n){return n.textDirectionAt(n.state.selection.main.head)==ie.LTR}const Wd=n=>Fd(n,!Ce(n)),Gd=n=>Fd(n,Ce(n));function Ud(n,e){return ht(n,t=>t.empty?n.moveByGroup(t,e):Br(t,e))}const zw=n=>Ud(n,!Ce(n)),Bw=n=>Ud(n,Ce(n));function Vw(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Vr(n,e,t){let i=ge(n).resolveInner(e.head),s=t?I.closedBy:I.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;Vw(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?yt(n,i.from,1):yt(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,v.cursor(l,t?-1:1)}const Nw=n=>ht(n,e=>Vr(n.state,e,!Ce(n))),Iw=n=>ht(n,e=>Vr(n.state,e,Ce(n)));function Hd(n,e){return ht(n,t=>{if(!t.empty)return Br(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Kd=n=>Hd(n,!1),Jd=n=>Hd(n,!0);function ep(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Br(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomtp(n,!1),Dl=n=>tp(n,!0);function ri(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=v.cursor(i.from+r))}return s}const Fw=n=>ht(n,e=>ri(n,e,!0)),Ww=n=>ht(n,e=>ri(n,e,!1)),Gw=n=>ht(n,e=>ri(n,e,!Ce(n))),Uw=n=>ht(n,e=>ri(n,e,Ce(n))),Hw=n=>ht(n,e=>v.cursor(n.lineBlockAt(e.head).from,1)),Kw=n=>ht(n,e=>v.cursor(n.lineBlockAt(e.head).to,-1));function Jw(n,e,t){let i=!1,s=cn(n.selection,r=>{let o=yt(n,r.head,-1)||yt(n,r.head,1)||r.head>0&&yt(n,r.head-1,1)||r.headJw(n,e,!1);function it(n,e){let t=cn(n.state.selection,i=>{let s=e(i);return v.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Pt(n.state,t)),!0)}function ip(n,e){return it(n,t=>n.moveByChar(t,e))}const np=n=>ip(n,!Ce(n)),sp=n=>ip(n,Ce(n));function rp(n,e){return it(n,t=>n.moveByGroup(t,e))}const tx=n=>rp(n,!Ce(n)),ix=n=>rp(n,Ce(n)),nx=n=>it(n,e=>Vr(n.state,e,!Ce(n))),sx=n=>it(n,e=>Vr(n.state,e,Ce(n)));function op(n,e){return it(n,t=>n.moveVertically(t,e))}const lp=n=>op(n,!1),ap=n=>op(n,!0);function hp(n,e){return it(n,t=>n.moveVertically(t,e,ep(n).height))}const Qc=n=>hp(n,!1),Pc=n=>hp(n,!0),rx=n=>it(n,e=>ri(n,e,!0)),ox=n=>it(n,e=>ri(n,e,!1)),lx=n=>it(n,e=>ri(n,e,!Ce(n))),ax=n=>it(n,e=>ri(n,e,Ce(n))),hx=n=>it(n,e=>v.cursor(n.lineBlockAt(e.head).from)),cx=n=>it(n,e=>v.cursor(n.lineBlockAt(e.head).to)),$c=({state:n,dispatch:e})=>(e(Pt(n,{anchor:0})),!0),Cc=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.doc.length})),!0),Ac=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.selection.main.anchor,head:0})),!0),Zc=({state:n,dispatch:e})=>(e(Pt(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fx=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),ux=({state:n,dispatch:e})=>{let t=Nr(n).map(({from:i,to:s})=>v.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:v.create(t),userEvent:"select"})),!0},dx=({state:n,dispatch:e})=>{let t=cn(n.selection,i=>{let s=ge(n),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return v.range(l.to,l.from)}return i});return t.eq(n.selection)?!1:(e(Pt(n,t)),!0)},px=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=v.create([t.main]):t.main.empty||(i=v.create([v.cursor(t.main.head)])),i?(e(Pt(n,i)),!0):!1};function ls(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=Ls(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=Ls(n,o,!1),l=Ls(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:v.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const cp=(n,e,t)=>ls(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&scp(n,!1,!0),fp=n=>cp(n,!0,!1),up=(n,e)=>ls(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=ve(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),dp=n=>up(n,!1),Ox=n=>up(n,!0),gx=n=>ls(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headls(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bx=n=>ls(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:G.of(["",""])},range:v.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},wx=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:ve(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:ve(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:v.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Nr(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function pp(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of Nr(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(v.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(v.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:v.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const xx=({state:n,dispatch:e})=>pp(n,e,!1),Sx=({state:n,dispatch:e})=>pp(n,e,!0);function Op(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Nr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const kx=({state:n,dispatch:e})=>Op(n,e,!1),vx=({state:n,dispatch:e})=>Op(n,e,!0),Qx=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Nr(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Px(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ge(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(I.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const Mc=gp(!1),$x=gp(!0);function gp(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Px(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new jr(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=va(h,r);for(c==null&&(c=hn(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:v.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const Cx=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new jr(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Aa(n,(r,o,l)=>{let a=va(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=In(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(Aa(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Xr)})}),{userEvent:"input.indent"})),!0),bp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Aa(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=hn(s,n.tabSize),o=0,l=In(n,Math.max(0,r-Or(n)));for(;o(n.setTabFocusMode(),!0),Zx=[{key:"Ctrl-b",run:Wd,shift:np,preventDefault:!0},{key:"Ctrl-f",run:Gd,shift:sp},{key:"Ctrl-p",run:Kd,shift:lp},{key:"Ctrl-n",run:Jd,shift:ap},{key:"Ctrl-a",run:Hw,shift:hx},{key:"Ctrl-e",run:Kw,shift:cx},{key:"Ctrl-d",run:fp},{key:"Ctrl-h",run:_l},{key:"Ctrl-k",run:gx},{key:"Ctrl-Alt-h",run:dp},{key:"Ctrl-o",run:yx},{key:"Ctrl-t",run:wx},{key:"Ctrl-v",run:Dl}],Mx=[{key:"ArrowLeft",run:Wd,shift:np,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:zw,shift:tx,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Gw,shift:lx,preventDefault:!0},{key:"ArrowRight",run:Gd,shift:sp,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Bw,shift:ix,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Uw,shift:ax,preventDefault:!0},{key:"ArrowUp",run:Kd,shift:lp,preventDefault:!0},{mac:"Cmd-ArrowUp",run:$c,shift:Ac},{mac:"Ctrl-ArrowUp",run:vc,shift:Qc},{key:"ArrowDown",run:Jd,shift:ap,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Cc,shift:Zc},{mac:"Ctrl-ArrowDown",run:Dl,shift:Pc},{key:"PageUp",run:vc,shift:Qc},{key:"PageDown",run:Dl,shift:Pc},{key:"Home",run:Ww,shift:ox,preventDefault:!0},{key:"Mod-Home",run:$c,shift:Ac},{key:"End",run:Fw,shift:rx,preventDefault:!0},{key:"Mod-End",run:Cc,shift:Zc},{key:"Enter",run:Mc,shift:Mc},{key:"Mod-a",run:fx},{key:"Backspace",run:_l,shift:_l},{key:"Delete",run:fp},{key:"Mod-Backspace",mac:"Alt-Backspace",run:dp},{key:"Mod-Delete",mac:"Alt-Delete",run:Ox},{mac:"Mod-Backspace",run:mx},{mac:"Mod-Delete",run:bx}].concat(Zx.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rx=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Nw,shift:nx},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Iw,shift:sx},{key:"Alt-ArrowUp",run:xx},{key:"Shift-Alt-ArrowUp",run:kx},{key:"Alt-ArrowDown",run:Sx},{key:"Shift-Alt-ArrowDown",run:vx},{key:"Escape",run:px},{key:"Mod-Enter",run:$x},{key:"Alt-l",mac:"Ctrl-l",run:ux},{key:"Mod-i",run:dx,preventDefault:!0},{key:"Mod-[",run:bp},{key:"Mod-]",run:mp},{key:"Mod-Alt-\\",run:Cx},{key:"Shift-Mod-k",run:Qx},{key:"Shift-Mod-\\",run:ex},{key:"Mod-/",run:kw},{key:"Alt-A",run:Qw},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Ax}].concat(Mx),Tx={key:"Tab",run:mp,shift:bp};function ee(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class tn{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Rc(l)):Rc,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return we(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=sa(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ue(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=yr(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Yi(t,e.sliceString(t,i));return Mo.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=yr(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(xp.prototype[Symbol.iterator]=Sp.prototype[Symbol.iterator]=function(){return this});function Ex(n){try{return new RegExp(n,Za),!0}catch{return!1}}function yr(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function ql(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=ee("input",{class:"cm-textfield",name:"line",value:e}),i=ee("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:wr.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},ee("label",n.state.phrase("Go to line"),": ",t)," ",ee("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,p=h?+h:l.number;if(h&&f){let m=p/100;a&&(m=m*(a=="-"?-1:1)+l.number/o.doc.lines),p=Math.round(o.doc.lines*m)}else h&&a&&(p=p*(a=="-"?-1:1)+l.number);let O=o.doc.line(Math.max(1,Math.min(o.doc.lines,p))),g=v.cursor(O.from+Math.max(0,Math.min(u,O.length)));n.dispatch({effects:[wr.of(!1),R.scrollIntoView(g.from,{y:"center"})],selection:g}),n.focus()}return{dom:i}}const wr=X.define(),Tc=be.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(wr)&&(n=t.value);return n},provide:n=>Vn.from(n,e=>e?ql:null)}),Lx=n=>{let e=Bn(n,ql);if(!e){let t=[wr.of(!0)];n.state.field(Tc,!1)==null&&t.push(X.appendConfig.of([Tc,Dx])),n.dispatch({effects:t}),e=Bn(n,ql)}return e&&e.dom.querySelector("input").select(),!0},Dx=R.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),_x={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},kp=E.define({combine(n){return Qt(n,_x,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function qx(n){let e=[Bx,zx];return n&&e.push(kp.of(n)),e}const Xx=_.mark({class:"cm-selectionMatch"}),jx=_.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ec(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=ne.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=ne.Word)}function Yx(n,e,t,i){return n(e.sliceDoc(t,t+1))==ne.Word&&n(e.sliceDoc(i-1,i))==ne.Word}const zx=fe.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(kp),{state:t}=n,i=t.selection;if(i.ranges.length>1)return _.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return _.none;let a=t.wordAt(s.head);if(!a)return _.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return _.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Ec(o,t,s.from,s.to)&&Yx(o,t,s.from,s.to)))return _.none}else if(r=t.sliceDoc(s.from,s.to),!r)return _.none}let l=[];for(let a of n.visibleRanges){let h=new tn(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||Ec(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(jx.range(c,f)):(c>=s.to||f<=s.from)&&l.push(Xx.range(c,f)),l.length>e.maxMatches))return _.none}}return _.set(l)}},{decorations:n=>n.decorations}),Bx=R.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vx=({state:n,dispatch:e})=>{let{selection:t}=n,i=v.create(t.ranges.map(s=>n.wordAt(s.head)||v.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function Nx(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new tn(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new tn(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const Ix=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return Vx({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=Nx(n,i);return s?(e(n.update({selection:n.selection.addRange(v.range(s.from,s.to),!1),effects:R.scrollIntoView(s.to)})),!0):!1},fn=E.define({combine(n){return Qt(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sS(e),scrollToMatch:e=>R.scrollIntoView(e)})}});class vp{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Ex(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Ux(this):new Wx(this)}getCursor(e,t=0,i){let s=e.doc?e:H.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Ti(this,s,t,i):Ri(this,s,t,i)}}class Qp{constructor(e){this.spec=e}}function Ri(n,e,t,i){return new tn(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Fx(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Fx(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ri(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Ti(n,e,t,i){return new xp(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Gx(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function xr(n,e){return n.slice(ve(n,e,!1),e)}function Sr(n,e){return n.slice(e,ve(n,e))}function Gx(n){return(e,t,i)=>!i[0].length||(n(xr(i.input,i.index))!=ne.Word||n(Sr(i.input,i.index))!=ne.Word)&&(n(Sr(i.input,i.index+i[0].length))!=ne.Word||n(xr(i.input,i.index+i[0].length))!=ne.Word)}class Ux extends Qp{nextMatch(e,t,i){let s=Ti(this.spec,e,i,e.doc.length).next();return s.done&&(s=Ti(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Ti(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ti(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Fn=X.define(),Ma=X.define(),Wt=be.define({create(n){return new Ro(Xl(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Fn)?n=new Ro(t.value.create(),n.panel):t.is(Ma)&&(n=new Ro(n.query,t.value?Ra:null));return n},provide:n=>Vn.from(n,e=>e.panel)});class Ro{constructor(e,t){this.query=e,this.panel=t}}const Hx=_.mark({class:"cm-searchMatch"}),Kx=_.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jx=fe.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Wt))}update(n){let e=n.state.field(Wt);(e!=n.startState.field(Wt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return _.none;let{view:t}=this,i=new Ut;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?Kx:Hx)})}return i.finish()}},{decorations:n=>n.decorations});function as(n){return e=>{let t=e.state.field(Wt,!1);return t&&t.query.spec.valid?n(e,t):Cp(e)}}const kr=as((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=v.single(i.from,i.to),r=n.state.facet(fn);return n.dispatch({selection:s,effects:[Ta(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),$p(n),!0}),vr=as((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=v.single(s.from,s.to),o=n.state.facet(fn);return n.dispatch({selection:r,effects:[Ta(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),$p(n),!0}),eS=as((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:v.create(t.map(i=>v.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),tS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new tn(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(v.range(l.value.from,l.value.to))}return e(n.update({selection:v.create(r,o),userEvent:"select.search.matches"})),!0},Lc=as((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push(R.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l=v.single(r.from-c,r.to-c),h.push(Ta(n,r)),h.push(t.facet(fn).scrollToMatch(l.main,n))}return n.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),iS=as((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:R.announce.of(i),userEvent:"input.replace.all"}),!0});function Ra(n){return n.state.facet(fn).createPanel(n)}function Xl(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(fn);return new vp({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function Pp(n){let e=Bn(n,Ra);return e&&e.dom.querySelector("[main-field]")}function $p(n){let e=Pp(n);e&&e==n.root.activeElement&&e.select()}const Cp=n=>{let e=n.state.field(Wt,!1);if(e&&e.panel){let t=Pp(n);if(t&&t!=n.root.activeElement){let i=Xl(n.state,e.query.spec);i.valid&&n.dispatch({effects:Fn.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[Ma.of(!0),e?Fn.of(Xl(n.state,e.query.spec)):X.appendConfig.of(oS)]});return!0},Ap=n=>{let e=n.state.field(Wt,!1);if(!e||!e.panel)return!1;let t=Bn(n,Ra);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:Ma.of(!1)}),!0},nS=[{key:"Mod-f",run:Cp,scope:"editor search-panel"},{key:"F3",run:kr,shift:vr,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:kr,shift:vr,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ap,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tS},{key:"Mod-Alt-g",run:Lx},{key:"Mod-d",run:Ix,preventDefault:!0}];class sS{constructor(e){this.view=e;let t=this.query=e.state.field(Wt).query.spec;this.commit=this.commit.bind(this),this.searchField=ee("input",{value:t.search,placeholder:Ve(e,"Find"),"aria-label":Ve(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ee("input",{value:t.replace,placeholder:Ve(e,"Replace"),"aria-label":Ve(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ee("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=ee("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=ee("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return ee("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=ee("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>kr(e),[Ve(e,"next")]),i("prev",()=>vr(e),[Ve(e,"previous")]),i("select",()=>eS(e),[Ve(e,"all")]),ee("label",null,[this.caseField,Ve(e,"match case")]),ee("label",null,[this.reField,Ve(e,"regexp")]),ee("label",null,[this.wordField,Ve(e,"by word")]),...e.state.readOnly?[]:[ee("br"),this.replaceField,i("replace",()=>Lc(e),[Ve(e,"replace")]),i("replaceAll",()=>iS(e),[Ve(e,"replace all")])],ee("button",{name:"close",onclick:()=>Ap(e),"aria-label":Ve(e,"close"),type:"button"},["×"])])}commit(){let e=new vp({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Fn.of(e)}))}keydown(e){Ob(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?vr:kr)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Lc(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(Fn)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(fn).top}}function Ve(n,e){return n.state.phrase(e)}const Ds=30,_s=/[\s\.,:;?!]/;function Ta(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-Ds),o=Math.min(s,t+Ds),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-Ds;a--)if(!_s.test(l[a-1])&&_s.test(l[a])){l=l.slice(0,a);break}}return R.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const rS=R.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),oS=[Wt,si.low(Jx),rS];class Zp{constructor(e,t,i,s){this.state=e,this.pos=t,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ge(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Rp(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Dc(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lS(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:lS(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function aS(n,e){return t=>{for(let i=ge(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class _c{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function Gt(n){return n.selection.main.from}function Rp(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Ea=Dt.define();function hS(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>{if(l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i))return{range:l};let a=n.toText(e);return{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:a},range:v.cursor(l.from+r+a.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const qc=new WeakMap;function cS(n){if(!Array.isArray(n))return n;let e=qc.get(n);return e||qc.set(n,e=Mp(n)),e}const Qr=X.define(),Wn=X.define();class fS{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=sa(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!w||y==1&&m||Q==0&&y!=0)&&(t[f]==k||i[f]==k&&(u=!0)?o[f++]=w:o.length&&(b=!1)),Q=y,w+=Ue(k)}return f==a&&o[0]==0&&b?this.result(-100+(u?-200:0),o,e):p==a&&O==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):p==a?this.ret(-200+-700-e.length,[O,g]):f==a?this.result(-100+(u?-200:0)+-700+(b?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?Ue(we(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class uS{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:dS,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Xc(e(i),t(i)),optionClass:(e,t)=>i=>Xc(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Xc(n,e){return n?e?n+" "+e:n:e}function dS(n,e,t,i,s,r){let o=n.textDirection==ie.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,p=s.right-e.right,O=i.right-i.left,g=i.bottom-i.top;if(l&&u=g||w>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let m=(e.bottom-e.top)/r.offsetHeight,b=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/m}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function pS(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function To(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class OS{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(ke);this.optionContent=pS(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=To(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ke).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Wn.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=To(r.length,o,e.state.facet(ke).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=To(t.options.length,t.selected,this.view.state.facet(ke).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>qe(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&mS(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottomi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let p=s.appendChild(document.createElement("completion-section"));p.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let p=u(l,this.view.state,this.view,a);p&&c.appendChild(p)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew OS(t,n,e)}function mS(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function jc(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bS(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(ke);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new _c(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,p=r.filterStrict?new uS(f):new fS(f);for(let O of h.result.options)if(u=p.match(O.label)){let g=O.displayLabel?c?c(O,u.matched):[]:u.matched;s(new _c(O,h.source,g,u.score+(O.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,p)=>{var O,g;return((O=u.rank)!==null&&O!==void 0?O:1e9)-((g=p.rank)!==null&&g!==void 0?g:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):jc(h.completion)>jc(l)&&(o[o.length-1]=h),l=h.completion}return o}class Di{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Di(this.options,Yc(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=bS(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new Di(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(ke).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:vS,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Di(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Pr{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Pr(SS,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ke),r=(i.override||t.languageDataAt("autocomplete",Gt(t)).map(cS)).map(l=>(this.active.find(h=>h.source==l)||new Fe(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!yS(r,this.active)?o=Di.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new Fe(l.source,0):l));for(let l of e.effects)l.is(Lp)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new Pr(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?wS:xS}}function yS(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SS=[];function Tp(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(Ea);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Fe{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=Tp(e,t),s=this;(i&8||i&16&&this.touches(e))&&(s=new Fe(s.source,0)),i&4&&s.state==0&&(s=new Fe(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(Qr))s=new Fe(s.source,1,r.value?Gt(e.state):-1);else if(r.is(Wn))s=new Fe(s.source,0);else if(r.is(Ep))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Fe(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Gt(e.state))}}class zi extends Fe{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Gt(e.state);if((this.explicitPos<0?l<=r:lo||!s||t&2&&Gt(e.startState)==this.from)return new Fe(this.source,t&4?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return kS(s.validFor,e.state,r,o)?new zi(this.source,a,s,r,o):s.update&&(s=s.update(s,r,o,new Zp(e.state,l,a>=0)))?new zi(this.source,a,s,s.from,(i=s.to)!==null&&i!==void 0?i:Gt(e.state)):new Fe(this.source,1,a)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new zi(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Fe(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function kS(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Rp(n,!0).test(s)}const Ep=X.define({map(n,e){return n.map(t=>t.map(e))}}),Lp=X.define(),_e=be.define({create(){return Pr.start()},update(n,e){return n.update(e)},provide:n=>[ba.from(n,e=>e.tooltip),R.contentAttributes.from(n,e=>e.attrs)]});function La(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(_e).active.find(s=>s.source==e.source);return i instanceof zi?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},hS(n.state,t,i.from,i.to)),{annotations:Ea.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const vS=gS(_e,La);function qs(n,e="option"){return t=>{let i=t.state.field(_e,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Lp.of(l)}),!0}}const QS=n=>{let e=n.state.field(_e,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(_e,!1)?(n.dispatch({effects:Qr.of(!0)}),!0):!1,PS=n=>{let e=n.state.field(_e,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Wn.of(null)}),!0)};class $S{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const CS=50,AS=1e3,ZS=fe.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(_e).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(_e),t=n.state.facet(ke);if(!n.selectionSet&&!n.docChanged&&n.startState.field(_e)==e)return;let i=n.transactions.some(r=>{let o=Tp(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rCS&&Date.now()-o.time>AS){for(let l of o.context.abortListeners)try{l()}catch(a){qe(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(Qr)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(_e);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Gt(e),i=new Zp(e,t,n.explicitPos==t,this.view),s=new $S(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Wn.of(null)}),qe(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ke).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ke);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new Fe(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:Ep.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(_e,!1);if(e&&e.tooltip&&this.view.state.facet(ke).closeOnBlur){let t=e.open&&ud(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Wn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Qr.of(!1)}),20),this.composing=0}}}),MS=typeof navigator=="object"&&/Win/.test(navigator.platform),RS=si.highest(R.domEventHandlers({keydown(n,e){let t=e.state.field(_e,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(MS&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&La(e,i),!1}})),Dp=R.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class TS{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class Da{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Se.TrackDel),i=e.mapPos(this.to,1,Se.TrackDel);return t==null||i==null?null:new Da(this.field,t,i)}}class _a{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew Da(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new TS(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new _a(i,s)}}let ES=_.widget({widget:new class extends _t{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),LS=_.mark({class:"cm-snippetField"});class un{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(i=>(i.from==i.to?ES:LS).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new un(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const hs=X.define({map(n,e){return n&&n.map(e)}}),DS=X.define(),Gn=be.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(hs))return t.value;if(t.is(DS)&&n)return new un(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>R.decorations.from(n,e=>e?e.deco:_.none)});function qa(n,e){return v.create(n.filter(t=>t.field==e).map(t=>v.range(t.from,t.to)))}function _S(n){let e=_a.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:G.of(o)},scrollIntoView:!0,annotations:i?[Ea.of(i),he.userEvent.of("input.complete")]:void 0};if(l.length&&(a.selection=qa(l,0)),l.some(h=>h.field>0)){let h=new un(l,0),c=a.effects=[hs.of(h)];t.state.field(Gn,!1)===void 0&&c.push(X.appendConfig.of([Gn,zS,BS,Dp]))}t.dispatch(t.state.update(a))}}function _p(n){return({state:e,dispatch:t})=>{let i=e.field(Gn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:qa(i.ranges,s),effects:hs.of(r?null:new un(i.ranges,s)),scrollIntoView:!0})),!0}}const qS=({state:n,dispatch:e})=>n.field(Gn,!1)?(e(n.update({effects:hs.of(null)})),!0):!1,XS=_p(1),jS=_p(-1),YS=[{key:"Tab",run:XS,shift:jS},{key:"Escape",run:qS}],Bc=E.define({combine(n){return n.length?n[0]:YS}}),zS=si.highest(ns.compute([Bc],n=>n.facet(Bc)));function Le(n,e){return Object.assign(Object.assign({},e),{apply:_S(n)})}const BS=R.domEventHandlers({mousedown(n,e){let t=e.state.field(Gn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:qa(t.ranges,s.field),effects:hs.of(t.ranges.some(r=>r.field>s.field)?new un(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),Un={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},mi=X.define({map(n,e){let t=e.mapPos(n,-1,Se.TrackAfter);return t??void 0}}),Xa=new class extends Si{};Xa.startSide=1;Xa.endSide=-1;const qp=be.define({create(){return W.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(mi)&&(n=n.update({add:[Xa.range(t.value,t.value+1)]}));return n}});function VS(){return[IS,qp]}const Eo="()[]{}<>";function Xp(n){for(let e=0;e{if((NS?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Ue(we(i,0))==1||e!=s.from||t!=s.to)return!1;let r=GS(n.state,i);return r?(n.dispatch(r),!0):!1}),FS=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=jp(n,n.selection.main.head).brackets||Un.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=US(n.doc,o.head);for(let a of i)if(a==l&&Ir(n.doc,o.head)==Xp(we(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:v.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},WS=[{key:"Backspace",run:FS}];function GS(n,e){let t=jp(n,n.selection.main.head),i=t.brackets||Un.brackets;for(let s of i){let r=Xp(we(s,0));if(e==s)return r==s?JS(n,s,i.indexOf(s+s+s)>-1,t):HS(n,s,r,t.before||Un.before);if(e==r&&Yp(n,n.selection.main.from))return KS(n,s,r)}return null}function Yp(n,e){let t=!1;return n.field(qp).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Ir(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Ue(we(t,0)))}function US(n,e){let t=n.sliceString(e-2,e);return Ue(we(t,0))==t.length?t:t.slice(1)}function HS(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:mi.of(o.to+e.length),range:v.range(o.anchor+e.length,o.head+e.length)};let l=Ir(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:mi.of(o.head+e.length),range:v.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function KS(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&Ir(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:v.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function JS(n,e,t,i){let s=i.stringPrefixes||Un.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:mi.of(l.to+e.length),range:v.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=Ir(n.doc,a),c;if(h==e){if(Vc(n,a))return{changes:{insert:e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)};if(Yp(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:v.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=Nc(n,a-2*e.length,s))>-1&&Vc(n,c))return{changes:{insert:e+e+e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=ne.Word&&Nc(n,a,s)>-1&&!ek(n,a,e,s))return{changes:{insert:e+e,from:a},effects:mi.of(a+e.length),range:v.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Vc(n,e){let t=ge(n).resolveInner(e+1);return t.parent&&t.from==e}function ek(n,e,t,i){let s=ge(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function Nc(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=ne.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=ne.Word)return r}return-1}function tk(n={}){return[RS,_e,ke.of(n),ZS,ik,Dp]}const zp=[{key:"Ctrl-Space",run:zc},{mac:"Alt-`",run:zc},{key:"Escape",run:PS},{key:"ArrowDown",run:qs(!0)},{key:"ArrowUp",run:qs(!1)},{key:"PageDown",run:qs(!0,"page")},{key:"PageUp",run:qs(!1,"page")},{key:"Enter",run:QS}],ik=si.highest(ns.computeN([ke],n=>n.facet(ke).defaultKeymap?[zp]:[]));class nk{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class ui{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(Hn).markerFilter;r&&(s=r(s,i));let o=_.set(s.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?_.widget({widget:new uk(l),diagnostic:l}).range(l.from):_.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new ui(o,t,nn(o))}}function nn(n,e=null,t=0){let i=null;return n.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new nk(s,r,o.diagnostic),!1}),i}function sk(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(Hn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(Bp))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function rk(n,e){return n.field(We,!1)?e:e.concat(X.appendConfig.of(Ok))}const Bp=X.define(),ja=X.define(),Vp=X.define(),We=be.define({create(){return new ui(_.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=nn(t,n.selected.diagnostic,r)||nn(t,null,r)}!t.size&&s&&e.state.facet(Hn).autoPanel&&(s=null),n=new ui(t,s,i)}for(let t of e.effects)if(t.is(Bp)){let i=e.state.facet(Hn).autoPanel?t.value.length?Kn.open:null:n.panel;n=ui.init(t.value,i,e.state)}else t.is(ja)?n=new ui(n.diagnostics,t.value?Kn.open:null,n.selected):t.is(Vp)&&(n=new ui(n.diagnostics,n.panel,t.value));return n},provide:n=>[Vn.from(n,e=>e.panel),R.decorations.from(n,e=>e.diagnostics)]}),ok=_.mark({class:"cm-lintRange cm-lintRange-active"});function lk(n,e,t){let{diagnostics:i}=n.state.field(We),s=[],r=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(eIp(n,t,!1)))}const hk=n=>{let e=n.state.field(We,!1);(!e||!e.panel)&&n.dispatch({effects:rk(n.state,[ja.of(!0)])});let t=Bn(n,Kn.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ic=n=>{let e=n.state.field(We,!1);return!e||!e.panel?!1:(n.dispatch({effects:ja.of(!1)}),!0)},ck=n=>{let e=n.state.field(We,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},fk=[{key:"Mod-Shift-m",run:hk,preventDefault:!0},{key:"F8",run:ck}],Hn=E.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},Qt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function Np(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Ip(n,e,t){var i;let s=t?Np(e.actions):[];return ee("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ee("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let p=nn(n.state.field(We).diagnostics,e);p&&r.apply(n,p.from,p.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),ee("u",h.slice(c,c+1)),h.slice(c+1)];return ee("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&ee("div",{class:"cm-diagnosticSource"},e.source))}class uk extends _t{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ee("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Fc{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ip(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Kn{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Ic(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Np(r.actions);for(let l=0;l{for(let r=0;rIc(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(We).selected;if(!e)return-1;for(let t=0;t{let h=-1,c;for(let f=i;fi&&(this.items.splice(i,h-i),s=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.topl.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(We),i=nn(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Vp.of(i)})}static open(e){return new Kn(e)}}function dk(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Xs(n){return dk(``,'width="6" height="3"')}const pk=R.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Xs("#d11")},".cm-lintRange-warning":{backgroundImage:Xs("orange")},".cm-lintRange-info":{backgroundImage:Xs("#999")},".cm-lintRange-hint":{backgroundImage:Xs("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Ok=[We,R.decorations.compute([We],n=>{let{selected:e,panel:t}=n.field(We);return!e||!t||e.from==e.to?_.none:_.set([ok.range(e.from,e.to)])}),ty(lk,{hideOn:sk}),pk],gk=(()=>[uy(),Oy(),Rb(),Rw(),rw(),xb(),Pb(),H.allowMultipleSelections.of(!0),Ny(),_d(hw,{fallback:!0}),gw(),VS(),tk(),Vb(),Fb(),qb(),qx(),ns.of([...WS,...Rx,...nS,...Yw,...tw,...zp,...fk])])();class $r{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new $r(e,[],t,i,i,0,[],0,s?new Wc(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new $r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new mk(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Wc{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class mk{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Cr{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Cr(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Cr(this.stack,this.pos,this.index)}}function Cn(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class Hs{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Gc=new Hs;class bk{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Gc,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Gc,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class Bi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;Fp(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Bi.prototype.contextual=Bi.prototype.fallback=Bi.prototype.extend=!1;class jl{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Cn(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Fp(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}jl.prototype.contextual=Bi.prototype.fallback=Bi.prototype.extend=!1;class cs{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Fp(n,e,t,i,s,r){let o=0,l=1<0){let O=n[p];if(a.allows(O)&&(e.token.value==-1||e.token.value==O||yk(O,e.token.value,s,r))){e.acceptToken(O);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,O=h+p+(p<<1),g=n[O],m=n[O+1]||65536;if(c=m)f=p+1;else{o=n[O+2],e.advance();continue e}}break}}function Uc(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function yk(n,e,t,i){let s=Uc(t,i,e);return s<0||Uc(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class wk{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Hc(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Hc(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof ce){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class xk{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Hs)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Hs,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Hs,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new wk(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&Qk(s);if(o)return Ne&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ne&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Ne&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(I.contextHash)||0)==c))return e.useNode(f,u),Ne&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof ce)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof ce&&f.positions[0]==0)f=p;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ne&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Kc(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ne&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let p=0;f.forceReduce()&&p<10&&(Ne&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));p++)Ne&&(u=this.stackID(f)+" -> ");for(let p of l.recoverByInsert(a))Ne&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Ne&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Kc(l,i)):(!s||s.scoren;class vk{constructor(e){this.start=e.start,this.shift=e.shift||Do,this.reduce=e.reduce||Do,this.reuse=e.reuse||Do,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ar extends wd{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new ya(t.map((l,a)=>Ye.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=gd;let o=Cn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new Bi(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let s=new Sk(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=At(this.data,r+2);else break;s=t(At(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=At(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(Ar.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=Jc(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Pk=312,$k=313,ef=1,Ck=2,Ak=3,Zk=4,Mk=314,Rk=316,Tk=317,Ek=5,Lk=6,Dk=0,Yl=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Wp=125,_k=59,zl=47,qk=42,Xk=43,jk=45,Yk=60,zk=44,Bk=63,Vk=46,Nk=91,Ik=new vk({start:!1,shift(n,e){return e==Ek||e==Lk||e==Rk?n:e==Tk},strict:!1}),Fk=new cs((n,e)=>{let{next:t}=n;(t==Wp||t==-1||e.context)&&n.acceptToken(Mk)},{contextual:!0,fallback:!0}),Wk=new cs((n,e)=>{let{next:t}=n,i;Yl.indexOf(t)>-1||t==zl&&((i=n.peek(1))==zl||i==qk)||t!=Wp&&t!=_k&&t!=-1&&!e.context&&n.acceptToken(Pk)},{contextual:!0}),Gk=new cs((n,e)=>{n.next==Nk&&!e.context&&n.acceptToken($k)},{contextual:!0}),Uk=new cs((n,e)=>{let{next:t}=n;if(t==Xk||t==jk){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(ef);n.acceptToken(i?ef:Ck)}}else t==Bk&&n.peek(1)==Vk&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(Ak))},{contextual:!0});function _o(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const Hk=new cs((n,e)=>{if(n.next!=Yk||!e.dialectEnabled(Dk)||(n.advance(),n.next==zl))return;let t=0;for(;Yl.indexOf(n.next)>-1;)n.advance(),t++;if(_o(n.next,!0)){for(n.advance(),t++;_o(n.next,!1);)n.advance(),t++;for(;Yl.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zk)return;for(let i=0;;i++){if(i==7){if(!_o(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Zk,-t)}),Kk=xd({"get set async static":d.modifier,"for while do if else switch try catch finally return throw break continue default case":d.controlKeyword,"in of await yield void typeof delete instanceof":d.operatorKeyword,"let var const using function class extends":d.definitionKeyword,"import export from":d.moduleKeyword,"with debugger as new":d.keyword,TemplateString:d.special(d.string),super:d.atom,BooleanLiteral:d.bool,this:d.self,null:d.null,Star:d.modifier,VariableName:d.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":d.function(d.variableName),VariableDefinition:d.definition(d.variableName),Label:d.labelName,PropertyName:d.propertyName,PrivatePropertyName:d.special(d.propertyName),"CallExpression/MemberExpression/PropertyName":d.function(d.propertyName),"FunctionDeclaration/VariableDefinition":d.function(d.definition(d.variableName)),"ClassDeclaration/VariableDefinition":d.definition(d.className),PropertyDefinition:d.definition(d.propertyName),PrivatePropertyDefinition:d.definition(d.special(d.propertyName)),UpdateOp:d.updateOperator,"LineComment Hashbang":d.lineComment,BlockComment:d.blockComment,Number:d.number,String:d.string,Escape:d.escape,ArithOp:d.arithmeticOperator,LogicOp:d.logicOperator,BitOp:d.bitwiseOperator,CompareOp:d.compareOperator,RegExp:d.regexp,Equals:d.definitionOperator,Arrow:d.function(d.punctuation),": Spread":d.punctuation,"( )":d.paren,"[ ]":d.squareBracket,"{ }":d.brace,"InterpolationStart InterpolationEnd":d.special(d.brace),".":d.derefOperator,", ;":d.separator,"@":d.meta,TypeName:d.typeName,TypeDefinition:d.definition(d.typeName),"type enum interface implements namespace module declare":d.definitionKeyword,"abstract global Privacy readonly override":d.modifier,"is keyof unique infer":d.operatorKeyword,JSXAttributeValue:d.attributeValue,JSXText:d.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":d.angleBracket,"JSXIdentifier JSXNameSpacedName":d.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":d.attributeName,"JSXBuiltin/JSXIdentifier":d.standard(d.tagName)}),Jk={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},ev={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},tv={__proto__:null,"<":187},iv=Ar.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Ik,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Kk],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Wk,Gk,Uk,Hk,2,3,4,5,6,7,8,9,10,11,12,13,14,Fk,new jl("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new jl("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>Jk[n]||-1},{term:339,get:n=>ev[n]||-1},{term:92,get:n=>tv[n]||-1}],tokenPrec:15004}),Gp=[Le("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Le("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Le("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Le("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Le("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Le(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Le("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Le(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Le(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Le('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Le('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],nv=Gp.concat([Le("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Le("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Le("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),tf=new Sy,Up=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Sn(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const sv=["FunctionDeclaration"],rv={FunctionDeclaration:Sn("function"),ClassDeclaration:Sn("class"),ClassExpression:()=>!0,EnumDeclaration:Sn("constant"),TypeAliasDeclaration:Sn("type"),NamespaceDeclaration:Sn("namespace"),VariableDefinition(n,e){n.matchContext(sv)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Hp(n,e){let t=tf.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(Oe.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=rv[o.name];if(l&&l(o,r)||Up.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of Hp(n,o.node))i.push(l);return!1}}),tf.set(e,i),i}const nf=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Kp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function ov(n){let e=ge(n.state).resolveInner(n.pos,-1);if(Kp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&nf.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)Up.has(s.name)&&(i=i.concat(Hp(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:nf}}const xi=dr.define({name:"javascript",parser:iv.configure({props:[Pd.add({IfStatement:Po({except:/^\s*({|else\b)/}),TryStatement:Po({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:By,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:zy({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Po({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Ad.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Fy,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Jp={test:n=>/^JSX/.test(n.name),facet:vd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},lv=xi.configure({dialect:"ts"},"typescript"),av=xi.configure({dialect:"jsx",props:[ka.add(n=>n.isTop?[Jp]:void 0)]}),hv=xi.configure({dialect:"jsx ts",props:[ka.add(n=>n.isTop?[Jp]:void 0)]},"typescript");let eO=n=>({label:n,type:"keyword"});const tO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(eO),cv=tO.concat(["declare","implements","private","protected","public"].map(eO));function fv(n={}){let e=n.jsx?n.typescript?hv:av:n.typescript?lv:xi,t=n.typescript?nv.concat(cv):Gp.concat(tO);return new Ey(e,[xi.data.of({autocomplete:aS(Kp,Mp(t))}),xi.data.of({autocomplete:ov}),n.jsx?pv:[]])}function uv(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function sf(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const dv=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),pv=R.inputHandler.of((n,e,t,i,s)=>{if((dv?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!xi.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=ge(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let p=f.parent,O=p.parent;if(O&&p.from==c-2&&((u=sf(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let g=`${u}>`;return{range:v.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(i==">"){let p=uv(f);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=sf(o.doc,p,c)))return{range:a,changes:{from:c,insert:``}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Ae=({variant:n,settings:e,styles:t})=>{const i=R.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),s=os.define(t);return[i,_d(s)]};Ae({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:d.comment,color:"#404080"},{tag:[d.string,d.regexp],color:"#999999"},{tag:d.number,color:"#7090B0"},{tag:[d.bool,d.null],color:"#8080A0"},{tag:[d.punctuation,d.derefOperator],color:"#805080"},{tag:d.keyword,color:"#60B0FF"},{tag:d.definitionKeyword,color:"#B0FFF0"},{tag:d.moduleKeyword,color:"#60B0FF"},{tag:d.operator,color:"#A0A0FF"},{tag:[d.variableName,d.self],color:"#008080"},{tag:d.operatorKeyword,color:"#A0A0FF"},{tag:d.controlKeyword,color:"#80A0FF"},{tag:d.className,color:"#70E080"},{tag:[d.function(d.propertyName),d.propertyName],color:"#50A0A0"},{tag:d.tagName,color:"#009090"},{tag:d.modifier,color:"#B0FFF0"},{tag:[d.squareBracket,d.attributeName],color:"#D0D0FF"}]});Ae({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:d.comment,color:"#787b8099"},{tag:d.string,color:"#86b300"},{tag:d.regexp,color:"#4cbf99"},{tag:[d.number,d.bool,d.null],color:"#ffaa33"},{tag:d.variableName,color:"#5c6166"},{tag:[d.definitionKeyword,d.modifier],color:"#fa8d3e"},{tag:[d.keyword,d.special(d.brace)],color:"#fa8d3e"},{tag:d.operator,color:"#ed9366"},{tag:d.separator,color:"#5c6166b3"},{tag:d.punctuation,color:"#5c6166"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#f2ae49"},{tag:[d.className,d.definition(d.typeName)],color:"#22a4e6"},{tag:[d.tagName,d.typeName,d.self,d.labelName],color:"#55b4d4"},{tag:d.angleBracket,color:"#55b4d480"},{tag:d.attributeName,color:"#f2ae49"}]});Ae({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:d.comment,color:"#6E6E6E"},{tag:[d.string,d.regexp,d.special(d.brace)],color:"#5C81B3"},{tag:d.number,color:"#C1E1B8"},{tag:d.bool,color:"#53667D"},{tag:[d.definitionKeyword,d.modifier,d.function(d.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[d.keyword,d.moduleKeyword,d.operatorKeyword,d.operator],color:"#697A8E",fontWeight:"bold"},{tag:[d.variableName,d.attributeName],color:"#708E67"},{tag:[d.function(d.variableName),d.definition(d.propertyName),d.derefOperator],color:"#fff"},{tag:d.tagName,color:"#A3D295"}]});Ae({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:d.comment,color:"#666666"},{tag:[d.string,d.special(d.brace)],color:"#54BE0D"},{tag:d.regexp,color:"#E9C062"},{tag:d.number,color:"#CF6A4C"},{tag:[d.keyword,d.operator],color:"#5EA6EA"},{tag:d.variableName,color:"#7587A6"},{tag:[d.definitionKeyword,d.modifier],color:"#F9EE98"},{tag:[d.propertyName,d.function(d.variableName)],color:"#937121"},{tag:[d.typeName,d.angleBracket,d.tagName],color:"#9B859D"}]});Ae({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:d.comment,color:"#6B4E32"},{tag:[d.keyword,d.operator,d.derefOperator],color:"#EF5D32"},{tag:d.className,color:"#EFAC32",fontWeight:"bold"},{tag:[d.typeName,d.propertyName,d.function(d.variableName),d.definition(d.variableName)],color:"#EFAC32"},{tag:d.definition(d.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:d.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[d.number,d.bool],color:"#6C99BB"},{tag:[d.variableName,d.self],color:"#7DAF9C"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#D9D762"},{tag:[d.angleBracket,d.tagName,d.attributeName],color:"#EFCB43"}]});Ae({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:d.comment,color:"#404040"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#00D8FF"},{tag:d.number,color:"#E62286"},{tag:[d.variableName,d.attributeName,d.self],color:"#E62286",fontWeight:"bold"},{tag:d.function(d.variableName),color:"#fff",fontWeight:"bold"}]});Ae({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:d.comment,color:"#BCC8BA"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#5D90CD"},{tag:[d.number,d.bool,d.null],color:"#46A609"},{tag:d.keyword,color:"#AF956F"},{tag:[d.definitionKeyword,d.modifier],color:"#C52727"},{tag:[d.angleBracket,d.tagName,d.attributeName],color:"#606060"},{tag:d.self,color:"#000"}]});Ae({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:d.comment,color:"#0088FF"},{tag:d.string,color:"#3AD900"},{tag:d.regexp,color:"#80FFC2"},{tag:[d.number,d.bool,d.null],color:"#FF628C"},{tag:[d.definitionKeyword,d.modifier],color:"#FFEE80"},{tag:d.variableName,color:"#CCCCCC"},{tag:d.self,color:"#FF80E1"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.definition(d.typeName),d.labelName],color:"#FFDD00"},{tag:[d.keyword,d.operator],color:"#FF9D00"},{tag:[d.propertyName,d.typeName],color:"#80FFBB"},{tag:d.special(d.brace),color:"#EDEF7D"},{tag:d.attributeName,color:"#9EFFFF"},{tag:d.derefOperator,color:"#fff"}]});Ae({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:d.comment,color:"#AEAEAE"},{tag:[d.string,d.special(d.brace),d.regexp],color:"#8DFF8E"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.function(d.definition(d.variableName)),d.definition(d.typeName)],color:"#A3EBFF"},{tag:[d.number,d.bool,d.null],color:"#62E9BD"},{tag:[d.keyword,d.operator],color:"#2BF1DC"},{tag:[d.definitionKeyword,d.modifier],color:"#F8FBB1"},{tag:[d.variableName,d.self],color:"#B683CA"},{tag:[d.angleBracket,d.tagName,d.typeName,d.propertyName],color:"#60A4F1"},{tag:d.derefOperator,color:"#E0E0E0"},{tag:d.attributeName,color:"#7BACCA"}]});const Ov=Ae({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:d.comment,color:"#6272a4"},{tag:[d.string,d.special(d.brace)],color:"#f1fa8c"},{tag:[d.number,d.self,d.bool,d.null],color:"#bd93f9"},{tag:[d.keyword,d.operator],color:"#ff79c6"},{tag:[d.definitionKeyword,d.typeName],color:"#8be9fd"},{tag:d.definition(d.typeName),color:"#f8f8f2"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.attributeName],color:"#50fa7b"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:d.comment,color:"#AAAAAA"},{tag:[d.keyword,d.operator,d.typeName,d.tagName,d.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[d.attributeName,d.definition(d.propertyName)],color:"#4F9FD0"},{tag:[d.className,d.string,d.special(d.brace)],color:"#CF4F5F"},{tag:d.number,color:"#CF4F5F",fontWeight:"bold"},{tag:d.variableName,fontWeight:"bold"}]});Ae({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:d.comment,color:"#9995b7"},{tag:d.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[d.definitionKeyword,d.modifier],color:"#ff5792"},{tag:[d.className,d.tagName,d.definition(d.typeName)],color:"#0094f0"},{tag:[d.number,d.bool,d.null,d.special(d.brace)],color:"#5842ff"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#0095a8"},{tag:d.typeName,color:"#b3694d"},{tag:[d.propertyName,d.variableName],color:"#fa8900"},{tag:d.operator,color:"#ff5792"},{tag:d.self,color:"#e64100"},{tag:[d.string,d.regexp],color:"#00b368"},{tag:[d.paren,d.bracket],color:"#0431fa"},{tag:d.labelName,color:"#00bdd6"},{tag:d.attributeName,color:"#e64100"},{tag:d.angleBracket,color:"#9995b7"}]});Ae({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:d.comment,color:"#9893a5"},{tag:[d.bool,d.null],color:"#286983"},{tag:d.number,color:"#d7827e"},{tag:d.className,color:"#d7827e"},{tag:[d.angleBracket,d.tagName,d.typeName],color:"#56949f"},{tag:d.attributeName,color:"#907aa9"},{tag:d.punctuation,color:"#797593"},{tag:[d.keyword,d.modifier],color:"#286983"},{tag:[d.string,d.regexp],color:"#ea9d34"},{tag:d.variableName,color:"#d7827e"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:d.comment,color:"#CFCFCF"},{tag:[d.number,d.bool,d.null],color:"#E66C29"},{tag:[d.className,d.definition(d.propertyName),d.function(d.variableName),d.labelName,d.definition(d.typeName)],color:"#2EB43B"},{tag:d.keyword,color:"#D8B229"},{tag:d.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[d.definitionKeyword,d.modifier],color:"#925A47"},{tag:d.string,color:"#704D3D"},{tag:d.typeName,color:"#2F8996"},{tag:[d.variableName,d.propertyName],color:"#77ACB0"},{tag:d.self,color:"#77ACB0",fontWeight:"bold"},{tag:d.regexp,color:"#E3965E"},{tag:[d.tagName,d.angleBracket],color:"#BAA827"},{tag:d.attributeName,color:"#B06520"},{tag:d.derefOperator,color:"#000"}]});Ae({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:d.comment,color:"#93A1A1"},{tag:d.string,color:"#2AA198"},{tag:d.regexp,color:"#D30102"},{tag:d.number,color:"#D33682"},{tag:d.variableName,color:"#268BD2"},{tag:[d.keyword,d.operator,d.punctuation],color:"#859900"},{tag:[d.definitionKeyword,d.modifier],color:"#073642",fontWeight:"bold"},{tag:[d.className,d.self,d.definition(d.propertyName)],color:"#268BD2"},{tag:d.function(d.variableName),color:"#268BD2"},{tag:[d.bool,d.null],color:"#B58900"},{tag:d.tagName,color:"#268BD2",fontWeight:"bold"},{tag:d.angleBracket,color:"#93A1A1"},{tag:d.attributeName,color:"#93A1A1"},{tag:d.typeName,color:"#859900"}]});Ae({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:d.comment,color:"#8E908C"},{tag:[d.variableName,d.self,d.propertyName,d.attributeName,d.regexp],color:"#C82829"},{tag:[d.number,d.bool,d.null],color:"#F5871F"},{tag:[d.className,d.typeName,d.definition(d.typeName)],color:"#C99E00"},{tag:[d.string,d.special(d.brace)],color:"#718C00"},{tag:d.operator,color:"#3E999F"},{tag:[d.definition(d.propertyName),d.function(d.variableName)],color:"#4271AE"},{tag:d.keyword,color:"#8959A8"},{tag:d.derefOperator,color:"#4D4D4C"}]});class rf extends vt{beforeRender(e){this.state={content:F(z)(e.content,"")}}template(e){return D("section",{class:["editor",e.class]},D("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new R({doc:this.state.content.get(),extensions:[gk,ns.of([Tx]),fv(),Ov,R.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Vi;class gv extends vt{constructor(){super(...arguments);us(this,Vi,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:F(z)(t.width),height:F(z)(t.height)}}template(t){return D("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(ct(this,Vi)),this.state.height.subscribe(ct(this,Vi)),ct(this,Vi).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Vi=new WeakMap;class mv extends vt{constructor(){super(...arguments);qt(this,"state",{zoomed:z(!0)})}template(t){return D("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},D(gv,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const js="workshop-data-light@0.0.0__";function ai(n,e,{encode:t=JSON.stringify,decode:i=s=>{try{return JSON.parse(s)}catch{return s}}}={}){const s=localStorage.getItem(js+e),r=z(s?i(s):n);return s===null&&localStorage.setItem(js+e,t(r.current)),r.persist=o=>localStorage.setItem(js+e,t(o)),r.subscribe(r.persist),r.clear=()=>localStorage.removeItem(js+e),r}class bv extends vt{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var i,s,r,o;return D(hf,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ot)(null,this)},D("div",{class:"confirm-modal__content"},e.children),D(Ys,{class:"confirm-modal__toolbar"},D(Zt,{icon:((i=e.cancel)==null?void 0:i.icon)??GO,label:((s=e.cancel)==null?void 0:s.label)??"annuler","event-click":this.handleCancel}),D(Zt,{active:!0,icon:((r=e.confirm)==null?void 0:r.icon)??JO,label:((o=e.confirm)==null?void 0:o.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ot)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ot)(!1,this),this.destroy()}}const yv=async(n,e={})=>{if(await new Promise(i=>{Bl(D(bv,{"event-close":i,"event-input":i,...e},typeof e.message=="string"?D("div",{innerHTML:e.message}):e.message))}))return n()};var bi,Jn;class wv extends vt{constructor(){super(...arguments);qt(this,"state",{running:z(!1),frameCount:z(0),dataMode:z(!1)});qt(this,"store",{code:ai(Ha.toString(),"code"),data:ai("{}","data"),title:ai("Sans titre","title"),author:ai("Inconnu","author"),description:ai("","description"),frames:ai(300,"frames"),frameRate:ai(30,"frameRate"),ledCount:z(+"300")});qt(this,"tick",Ot);qt(this,"context",new g0);qt(this,"__module",Ot);us(this,bi,async()=>{const t=this.store.code.get();this.stop();try{this._module=await SO(()=>import("data:text/javascript,"+t),[]),this.tick=vO(this.context.frameRate,i=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(i),this.context.frameCount++,this.refs.scene.update(this.context)}catch(s){ct(this,Jn).call(this,s)}}),console.clear(),(this._module.setup??Ot)(),this.start()}catch(i){ct(this,Jn).call(this,i)}});us(this,Jn,t=>{this.stop(),console.clear(),console.error(t)})}template(){return D("main",{class:["app",{"is-running":this.state.running,"is-data-mode":this.state.dataMode}]},D("header",{class:"app__header"},D("h1",{class:"app__title"},D("span",{class:"app__logo",innerHTML:ng}),D("span",null,document.title)),D("a",{innerHTML:eg,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),D(rf,{class:"editor__code",ref:this.ref("editor"),content:this.store.code}),D(rf,{class:"editor__data",ref:this.ref("data"),content:this.store.data}),D(mv,{ref:this.ref("scene"),running:this.state.running}),D("footer",{class:"app__footer"},D(Ys,null,D(Zt,{icon:Hr(this.state.dataMode,t=>t?ig:tg),label:Hr(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),D(Zt,{icon:UO,title:"Commencer un nouveau programme","event-click":t=>yv(()=>{this.refs.data.clear("{}"),this.refs.editor.clear(Ha.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})})),D(Ys,null,D(Ys,{compact:!0},D(Zt,{icon:Hr(this.state.running,t=>t?KO:HO),"event-click":t=>{this.state.running.get()?this.stop():this.start()}}),D(pn,{class:"readonly",type:"number",value:this.state.frameCount}),D(pn,{type:"number",label:"/",titles:"frames",value:this.store.frames}),D("hr",null),D(pn,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30})),D(Zt,{icon:Ua,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["data","ledCount","frames","frameRate"]){const i=this.createContextPropHandler(t);this.store[t].subscribe(i),i(this.store[t].get())}this.store.frames.subscribe(ct(this,bi)),this.store.frameRate.subscribe(ct(this,bi)),this.store.code.subscribe(ct(this,bi)),ct(this,bi).call(this,this.store.code.get())}createContextPropHandler(t){return i=>{this.context[t]=i,this.context.reset()}}start(){this.context.reset(),Fa.add(this.tick),this.state.running.set(!0)}stop(){Fa.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(D(hf,{title:"Exporter l’animation",class:"app__export",ref:i=>{t=i}},D("fieldset",null,D(pn,{type:"text",label:"titre",value:this.store.title}),D(pn,{type:"text",label:"auteur·ice",value:this.store.author}),D("textarea",{value:this.store.description,"event-input":i=>this.store.description.set(i.target.value),rows:"4",placeholder:"description"})),D("footer",null,D(Zt,{icon:Ua,label:"exporter","event-click":async()=>{await x0({context:this.context,setup:this._module.setup??Ot,draw:this._module.draw??this._module.default??Ot,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),filename:`${qo(this.store.title.get())}_@${this.store.frameRate.get()}.png`}),t==null||t.destroy()}}))),document.body)}}bi=new WeakMap,Jn=new WeakMap;Bl(D(wv,null)); diff --git a/assets/index-d4094426.js b/assets/index-d4094426.js new file mode 100644 index 0000000..6575278 --- /dev/null +++ b/assets/index-d4094426.js @@ -0,0 +1,230 @@ +var s9=Object.defineProperty;var i9=(n,e,t)=>e in n?s9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var or=(n,e,t)=>(i9(n,typeof e!="symbol"?e+"":e,t),t),Cb=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Cr=(n,e,t)=>(Cb(n,e,"read from private field"),t?t.call(n):e.get(n)),An=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Zi=(n,e,t,r)=>(Cb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var xa=(n,e,t)=>(Cb(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function zt(n,e){const t={};return t.vnode=!0,t.type=n,t.props=e||{},t.children=[].concat.apply([],[].slice.call(arguments,2)),t.isInstance=n&&n.template&&typeof n.template=="function",t.isComponent=typeof n=="function"&&n.prototype&&typeof n.prototype.render=="function",t.isStateless=typeof n=="function"&&!t.isComponent,t.isDom=typeof n=="string",t}zt.f=n=>n.children;function CD(n,e){for(const t in e)n[t]=e[t];return n}function en(){}function a9(n,e,t,r){if(r)return{log:en,warn:en,error:en};const i=[];n=n.toUpperCase(),i.push(`%c ${n} `);let l="font-weight:bold;";return e&&(l+=`color:${e};`),t&&(l+=`background-color:${t}`),i.push(l),{log:console.log.bind(console,...i),warn:console.warn.bind(console,...i),error:console.error.bind(console,...i)}}const wD=["nodes","components","refs","domEvents","storeEvents"];let Ha=class{constructor(){this.data={};for(let e=0;en&&String(n._symbol)==="Symbol(signal)";let kb;const Yi=(n,e)=>n.substr(0,e.length)===e,kD=n=>(e,t)=>t.classList.toggle(n,e||!1),Ab=(n="textContent",e)=>(t,r)=>{if(e&&n!==(n=n.replace(/^xlink:?/,"")))r.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t);else{if(t===void 0){r.removeAttribute(n);return}kb=t??"",e||(r[n]=kb),(e||o9.has(n)||Yi(n,"data-"))&&r.setAttribute(n,kb)}};function l9(n,e,t,r,i){if(t!==void 0&&!(e==="__self"||e==="__source")){e==="className"&&(e="class");for(let l=0;l{l.startsWith("--")?n.style.setProperty(l,C):n.style[l]=C};wb((t??[])[l])?r.append({storeEvents:[{store:t[l],init:!0,fn:h,el:n}]}):h(t[l])}else typeof t=="string"&&(n.style.cssText=t);else if(e!=="list"&&e!=="type"&&!i&&e in n)try{Ab(e,i)(t,n)}catch{}else typeof t!="object"&&typeof t!="function"&&Ab(e,i)(t,n)}}function u9(n){return Array.isArray(n)?n:[n]}function hl(n,e){if(Array.isArray(n))return c9(n,e);if(n instanceof window.Element)return h9(n);if(n===null||typeof n!="object"||!n.vnode)return f9(n);const t=CD(CD({},n.props),{children:[].concat.apply([],n.children||[])});if(n.isDom)return p9(n,t,e);if(n.isInstance)return AD(n,t,e,!0);if(n.isStateless)return d9(n,t,e);if(n.isComponent)return AD(n,t,e)}function c9(n,e){n=u9(n);const t=new Ha;for(let r=0;r1?C:C[0];for(const A in i.data)A!=="nodes"&&(l._collector[A]||(l._collector[A]=[]),l._collector[A]=l._collector[A].concat(i.data[A]));i.set({components:[l],refs:[],domEvents:[],storeEvents:[]});for(let A=0;Ae.startsWith("data-")).reduce((e,[t,r])=>({...e,[t]:r}),{})}storeSubscribe(e,t,r,i=!0){e.subscribe(t,r),this._storeListeners.push([e,t,r]),i&&t.call(r,e.current)}template(){}beforeRender(){}afterRender(){}afterMount(){}beforeDestroy(){}ref(e){const t=this;return function(r){t.refs[e]=r}}refArray(e,t=!1){const r=this.refs[e]||(this.refs[e]=[]);let i=r.length,l,h;return t&&(l=this.refs.__pools||(this.refs.__pools={}),h=l[e]||(l[e]=[]),h.length&&(i=h.pop())),r[i]=null,function(C){r[i]=C,t&&h.push(i)}}refMap(e,t){const r=this.refs[t]||(this.refs[t]=new Map);return function(i){i?r.set(e,i):r.delete(e)}}render(e,t){return Cx(e,t,this)}destroy(){let e=0;for(this.beforeDestroy(this.props),e=this._collector.domEvents.length-1;e>=0;e--){const r=this._collector.domEvents[e];r.el.removeEventListener(r.evt,r.fn)}for(e=this._collector.storeEvents.length-1;e>=0;e--){const r=this._collector.storeEvents[e];r.store.unsubscribe(r.fn)}for(e=this._storeListeners.length-1;e>=0;e--){const r=this._storeListeners[e];r[0].unsubscribe(r[1],r[2])}for(e=this._collector.components.length-1;e>=0;e--)this._collector.components[e].destroy();if(this.mounted=!1,this.destroyed=!0,this._parent){const r=this._parent._collector.components.indexOf(this);~r&&this._parent._collector.components.splice(r,1),this._parent=null}for(e=this._collector.refs.length-1;e>=0;e--)this._collector.refs[e].fn(null),this._collector.refs.splice(e,1);let t=Array.isArray(this.base)?this.base:[this.base];for(e=0;e{if(l=S9(l),l in PD)return;PD[l]=!0;const h=l.endsWith(".css"),C=h?'[rel="stylesheet"]':"";if(!!r)for(let B=i.length-1;B>=0;B--){const q=i[B];if(q.href===l&&(!h||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${C}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":O9,h||(_.as="script",_.crossOrigin=""),_.href=l,document.head.appendChild(_),h)return new Promise((B,q)=>{_.addEventListener("load",B),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function E9(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var mv={},C9={get exports(){return mv},set exports(n){mv=n}};(function(n){(function(e){let t;function r(B,q){const Y=B.charCodeAt(q);if(isNaN(Y))throw new RangeError("Index "+q+' out of range for string "'+B+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(Y<55296||Y>57343)return[B.charAt(q),q];if(Y>=55296&&Y<=56319){if(B.length<=q+1)return[" ",q];const me=B.charCodeAt(q+1);return me<56320||me>57343?[" ",q]:[B.charAt(q)+B.charAt(q+1),q+1]}if(q===0)return[" ",q];const ie=B.charCodeAt(q-1);if(ie<55296||ie>56319)return[" ",q];throw new Error('String "'+B+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?t=function(B){return btoa(unescape(encodeURIComponent(B)))}:t=function(B){const q=unescape(encodeURIComponent(B+""));let Y="";for(let ie,me,_e=0,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";q.charAt(_e|0)||($e="=",_e%1);Y+=$e.charAt(63&ie>>8-_e%1*8)){if(me=q.charCodeAt(_e+=3/4),me>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");ie=ie<<8|me}return Y}:t=function(B){return Buffer.from(B).toString("base64")};function i(B,q){let Y=C(B,q);if((q&&q.fallback!==void 0?q.fallback:i.defaults.fallback)===!0&&Y===""){let me="";for(let _e=0;_e1?Y[q[me]]=B[q[me]]:ie[q[me]]=B[q[me]];Object.assign(i.charmap,ie),Object.assign(i.multicharmap,Y)},i.setLocale=function(B){h=l[B]||{}},n.exports?n.exports=i:e.slug=i})(gi)})(C9);function w9(n,e){if(e===void 0)throw new Error("You must specify a callback");n===void 0&&(n=30);var t=1e3/n,r=0,i=0;return function(l){r-=l,i+=l,r<=0&&(e(i),i=0,r=t+r%t)}}var mc=typeof window>"u"?global:window,Ji=[],ja=[],qa=[],Si=null,ea=null,Uo=!1,wx=!1,kx,hi;function Lu(n){n===void 0&&(n=0),ea===null&&(ea=n),hi=n-ea,kx+=hi,ea=n,Si=Uo?null:mc.requestAnimationFrame(Lu),Uo&&(Uo=!1);var e;if(wx){for(e=0;e0||qa.length>0}function Ax(n,e,t){return!e||!n||~n.indexOf(e)?!1:(t=!!t,t?n.unshift(e):n.push(e),!0)}function Px(n,e){if(!e)return!1;var t=n.indexOf(e);return~t?(n.splice(t,1),n.length===0):!1}function k9(n,e){Ax(qa,n,e)&&gc()}function A9(n,e){Ax(ja,n,e)&&gc()}function P9(n,e){Ax(Ji,n,e)&&WI()}function T9(n){Px(qa,n)&&gc()}function D9(n,e){Px(ja,n)&&gc()}function I9(n){Px(Ji,n)&&Tx()}function WI(n){Uo=!1,!Si&&(n=!!n,ea=null,n?Lu():Si=mc.requestAnimationFrame(Lu))}function R9(){Si||(Uo=!0,ea=null,Si=mc.requestAnimationFrame(Lu))}function Tx(){Si&&(mc.cancelAnimationFrame(Si),Si=null)}function F9(){Tx(),Ji.length=0,ja.length=0,qa.length=0,wx=!1,ea=null,kx=0,hi=0}const DD={add:P9,addAfter:A9,addBefore:k9,remove:I9,removeAfter:D9,removeBefore:T9,start:WI,stop:Tx,time:kx,dt:hi,requestOnce:R9,dispose:F9};function ID(n,e,t,r){this.fn=e,this.ctx=t||null,this.owner=n,this.once=!!r}function Pb(n,e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.ctx=e.fn=e.owner=null,e===n._first&&(n._first=e.next),e===n._last&&(n._last=e.prev)}let GI=class{constructor(){this._first=this._last=null,this._symbol=Symbol("signal")}dispatch(e,t,r,i,l){let h=this._first;for(;h;)h.fn.call(h.ctx,e,t,r,i,l),h.once&&this.unsubscribe(h),h=h.next}subscribe(e,t,r){const i=new ID(this,e,t,r);return this._first?(this._last.next=i,i.prev=this._last,this._last=i):(this._first=i,this._last=i),i}subscribeOnce(e,t){return this.subscribe(e,t,!0)}unsubscribe(e,t){if(e instanceof ID)return Pb(this,e);t||(t=null);let r=this._first;for(;r;)r.fn===e&&r.ctx===t&&Pb(this,r),r=r.next}unsubscribeAll(){let e=this._first;for(this._first=this._last=null;e;)Pb(this,e),e=e.next}},_9=class extends GI{constructor(e){super(),this.initial=e,this.current=e}set(){throw new Error("Cannot set a different value for a Readable Signal. Use Writable instead")}get(){return this.current}},zI=class extends _9{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.reset=this.reset.bind(this)}set(e,t){if(!t&&this.current===e)return;this.previous=this.current,this.current=e;let r=this._first;for(;r;)r.fn.call(r.ctx,this.current,this.previous),r.once&&this.unsubscribe(r),r=r.next}reset(){this.set(this.initial)}toggle(){this.set(!this.current)}update(e,t){const r=e(this.current);this.set(r!==void 0?r:this.current,t)}};function cr(n){return new zI(n)}function Cu(n,e){const t=new zI,r=t.set.bind(t);delete t.set;const i=Array.isArray(n);let l=i?new Array(n.length):null;if(i)for(let C=0,A=n.length;C(...e)=>{for(const t of e){if(t instanceof GI)return t;if(t!==void 0)return n(t)}return n(null)},B9=n=>Cu(n,e=>!e),L9="ui-backdrop-1l3kn107",N9={backdrop:L9,"loader-spin":"ui-loader-spin-1l3kn1"};class M9 extends qs{beforeRender(e){this.close=this.close.bind(this),this.captureEscapeKey=this.captureEscapeKey.bind(this),this.state={lastActiveElement:document.activeElement,locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[N9.backdrop,...Array.isArray(e.class)?e.class:[e.class]],"event-click":r=>(e["event-click"]??en)(r,this)},e.children)}afterMount(){this.state.lastActiveElement&&this.state.lastActiveElement.blur(),window.addEventListener("keyup",this.captureEscapeKey),(this.props["event-open"]??en)(null,this)}captureEscapeKey(e){e.key==="Escape"&&this.close()}close(){this.state.locked.get()||((this.props["event-close"]||en)(null,this),this.destroy())}beforeDestroy(){if(!this.destroyed&&(window.removeEventListener("keyup",this.captureEscapeKey),this.state&&this.state.lastActiveElement)){const e=this.state.lastActiveElement;window.setTimeout(()=>e.focus(),0)}}}const $9="ui-button-1urez107",j9="ui-button__label-1urez161",q9="ui-button__icon-1urez171",Tb={button:$9,"is-hidden":"is-hidden","is-disabled":"is-disabled","has-click":"has-click",button__label:j9,"is-active":"is-active","is-waiting":"is-waiting",button__icon:q9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-1urez1"};class Ks extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.state={label:vr(cr)(e["store-label"],e.label),title:vr(cr)(e["store-title"],e.title),icon:vr(cr)(e["store-icon"],e.icon),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("button",{...this.dataProps,type:e.type,id:e.id,tabIndex:e.tabindex,class:[Tb.button,{"has-click":!!this.props["event-click"],"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"store-title":t.title,"store-disabled":t.disabled,"event-click":this.handleClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:Tb.button__icon,"store-innerHTML":t.icon}),zt("label",{class:Tb.button__label,"store-innerHTML":t.label}))}async handleClick(e){if(this.props["event-click"]&&!this.state.disabled.get()){if(this.base.blur(),this.state.waiting.get())return e.preventDefault();this.state.waiting.set(!0);try{await this.props["event-click"](e,this)}finally{this.mounted&&(this.state.waiting.set(!1),this&&this.refs&&this.refs.icon&&(this.refs.icon.style.animation="none",this.refs.icon.offsetHeight,this.refs.icon.style.animation=null))}}}}const Q9="ui-input-ada4i107",U9="ui-input__icon-ada4i150",ko={input:Q9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-active":"is-active","is-waiting":"is-waiting","is-edited-on-dblclick":"is-edited-on-dblclick",input__icon:U9,"has-icon":"has-icon","loader-spin":"ui-loader-spin-ada4i1"};class Ao extends qs{beforeRender(e){this.update=this.update.bind(this),this.handleClick=this.handleClick.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.state={value:vr(cr)(e["store-value"],e.value),files:vr(cr)(e["store-files"],e.files),placeholder:vr(cr)(e["store-placeholder"],e.placeholder),title:vr(cr)(e["store-title"],e.title),label:vr(cr)(e["store-label"],e.label),before:vr(cr)(e["store-before"],e.before),after:vr(cr)(e["store-after"],e.after),icon:vr(cr)(e["store-icon"],e.icon),accept:vr(cr)(e["store-accept"],e.accept??"*"),multiple:vr(cr)(e["store-multiple"],e.multiple??"*"),min:vr(cr)(e["store-min"],e.min),max:vr(cr)(e["store-max"],e.max),step:vr(cr)(e["store-step"],e.step),active:vr(cr)(e["store-active"],e.active),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden),waiting:vr(cr)(e["store-waiting"],e.waiting)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,tabIndex:e.tabindex,class:[ko.input,{"is-edited-on-dblclick":!!e.editOnDblClick,"has-icon":t.icon,"is-active":t.active,"is-disabled":t.disabled,"is-hidden":t.hidden,"is-waiting":t.waiting},...Array.isArray(e.class)?e.class:[e.class]],"data-type":e.type,"store-title":t.title,"event-click":this.handleClick,"event-dblclick":this.handleDblClick,"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("span",{ref:this.ref("icon"),class:ko.input__icon,"store-innerHTML":t.icon}),zt("label",{class:ko.input__label,"store-innerHTML":t.label}),zt("label",{class:ko.input__before,"store-innerHTML":t.before}),zt("input",{ref:this.ref("input"),type:e.type,name:e.name,autofocus:e.autofocus,autocomplete:e.autocomplete??"off",size:e.type!=="number"?e.size==="auto"?"":e.size:void 0,"store-min":e.type==="number"?t.min:void 0,"store-max":e.type==="number"?t.max:void 0,"store-step":e.type==="number"?t.step:void 0,"store-placeholder":t.placeholder,"store-accept":e.type==="file"?t.accept:void 0,"store-multiple":e.type==="file"?t.multiple:void 0,"store-disabled":t.disabled,"event-click":r=>r.stopPropagation(),"event-input":this.handleInput,"event-focus":this.handleFocus,"event-blur":r=>(e["event-blur"]??en)(r,this)}),zt("label",{class:ko.input__after,"store-innerHTML":t.after}))}afterRender(){this.state.value.subscribe(this.update),this.update()}update(){const e=this.state.value.get();switch(this.props.type){case"number":{this.refs.input.value=+e;break}case"file":{this.refs.input.files=e;break}default:this.refs.input.value=e}if(this.props.size==="auto"){const t=(String(this.refs.input.value)??"").length||(this.state.placeholder.current??"").length||1;this.props.type==="number"?this.refs.input.style.width=t+1+"ch":this.refs.input.size=Math.max(1,t)}}handleClick(e){this.props.type==="file"?this.refs.input.click():this.props.editOnDblClick||this.refs.input.focus(),(this.props["event-click"]??en)(e,this)}async handleDblClick(e){this.refs.input.focus(),await(this.props["event-dblclick"]??en)(e,this)}async handleInput(e){if(this.state.waiting.get())return e.preventDefault();switch(this.state.waiting.set(!0),this.props.type){case"number":this.state.value.set(+this.refs.input.value);break;case"file":this.state.value.set(this.refs.input.files);break;default:this.state.value.set(this.refs.input.value)}await(this.props["event-input"]??en)(e,this),this.mounted&&this.state.waiting.set(!1)}handleFocus(e){this.props.autoSelectAll&&this.refs.input.select(),(this.props["event-focus"]??en)(e,this)}beforeDestroy(){this.state.value.unsubscribe(this.update)}}const V9="ui-modal-1ng3s107",W9="ui-modal__header-1ng3s119",G9="ui-modal__title-1ng3s125",z9="ui-modal__content-1ng3s129",Po={modal:V9,modal__header:W9,modal__title:G9,modal__content:z9,"loader-spin":"ui-loader-spin-1ng3s1"},Z9=` + + +`;class ZI extends qs{beforeRender(e){this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.state={title:vr(cr)(e["store-title"],e.title),tabs:vr(cr)(e["store-tabs"],e.tabs),locked:vr(cr)(e["store-locked"],e.locked)}}template(e,t){return zt(M9,{ref:this.ref("backdrop"),"store-locked":t.locked,"event-open":e["event-open"],"event-close":e["event-close"],"event-click":this.handleClick},zt("div",{...this.dataProps,id:e.id,class:[Po.modal,...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},zt("header",{class:Po.modal__header},zt(Ks,{class:Po.modal__title,icon:e.icon,"store-label":t.title}),zt(Ks,{class:Po.modal__close,icon:Z9,"store-hidden":t.locked,"event-click":this.handleClose})),zt("div",{class:Po.modal__content},e.children)))}handleClick(e){e.target===this.base&&this.handleClose()}handleClose(){this.state.locked.get()||this.refs.backdrop.close()}}const X9="ui-toolbar-1r0eh107",Y9={toolbar:X9,"is-hidden":"is-hidden","is-disabled":"is-disabled","is-compact":"is-compact","loader-spin":"ui-loader-spin-1r0eh1"};class Lo extends qs{beforeRender(e){this.state={compact:vr(cr)(e["store-compact"],e.compact),disabled:vr(cr)(e["store-disabled"],e.disabled),hidden:vr(cr)(e["store-hidden"],e.hidden)}}template(e,t){return zt("div",{...this.dataProps,id:e.id,class:[Y9.toolbar,{"is-compact":t.compact,"is-disabled":t.disabled,"is-hidden":t.hidden},...Array.isArray(e.class)?e.class:[e.class]],"event-mouseenter":r=>(e["event-mouseenter"]??en)(r,this),"event-mouseleave":r=>(e["event-mouseleave"]??en)(r,this)},e.children)}}function RD(n,e,t){var r,i,l,h,C;e==null&&(e=100);function A(){var B=Date.now()-h;B=0?r=setTimeout(A,e-B):(r=null,t||(C=n.apply(l,i),l=i=null))}var _=function(){l=this,i=arguments,h=Date.now();var B=t&&!r;return r||(r=setTimeout(A,e)),B&&(C=n.apply(l,i),l=i=null),C};return _.clear=function(){r&&(clearTimeout(r),r=null)},_.flush=function(){r&&(C=n.apply(l,i),l=i=null,clearTimeout(r),r=null)},_}RD.debounce=RD;const H9=` + + +`,K9=` + + + +`,J9=` + + + +`,e4=` + + + +`,t4=` + + +`,r4=` + + + + + + +`,FD=` + + + + +`,n4=` + + + + +`,s4=` + + + + +`,_D=`export function setup () { + log('setup') +} + +export function draw () { + log(frameCount) +} +`,i4=` + + +`;function XI(n,e,t){return Math.max(e,Math.min(n,t))}function YI(n,e,t){return n>t?n%t:nd4(m4(e,n),t),Dx=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let e=0;e<=3;e++)e<3?((n[e]<0||n[e]>255)&&(n._clipped=!0),n[e]=sa(n[e],0,255)):e===3&&(n[e]=sa(n[e],0,1));return n},eR={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])eR[`[object ${n}]`]=n.toLowerCase();function dr(n){return eR[Object.prototype.toString.call(n)]||"object"}const ur=(n,e=null)=>n.length>=3?Array.prototype.slice.call(n):dr(n[0])=="object"&&e?e.split("").filter(t=>n[0][t]!==void 0).map(t=>n[0][t]):n[0].slice(0),Ka=n=>{if(n.length<2)return null;const e=n.length-1;return dr(n[e])=="string"?n[e].toLowerCase():null},{PI:yc,min:tR,max:rR}=Math,es=n=>Math.round(n*100)/100,yv=n=>Math.round(n*100)/100,Xs=yc*2,Db=yc/3,g4=yc/180,y4=180/yc;function nR(n){return[...n.slice(0,3).reverse(),...n.slice(3)]}const lr={format:{},autodetect:[]};class Ct{constructor(...e){const t=this;if(dr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let r=Ka(e),i=!1;if(!r){i=!0,lr.sorted||(lr.autodetect=lr.autodetect.sort((l,h)=>h.p-l.p),lr.sorted=!0);for(let l of lr.autodetect)if(r=l.test(...e),r)break}if(lr.format[r]){const l=lr.format[r].apply(null,i?e:e.slice(0,-1));t._rgb=Dx(l)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return dr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const b4="3.1.2",pr=(...n)=>new Ct(...n);pr.version=b4;const Qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},v4=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,x4=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,sR=n=>{if(n.match(v4)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);const e=parseInt(n,16),t=e>>16,r=e>>8&255,i=e&255;return[t,r,i,1]}if(n.match(x4)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const e=parseInt(n,16),t=e>>24&255,r=e>>16&255,i=e>>8&255,l=Math.round((e&255)/255*100)/100;return[t,r,i,l]}throw new Error(`unknown hex color: ${n}`)},{round:Hl}=Math,iR=(...n)=>{let[e,t,r,i]=ur(n,"rgba"),l=Ka(n)||"auto";i===void 0&&(i=1),l==="auto"&&(l=i<1?"rgba":"rgb"),e=Hl(e),t=Hl(t),r=Hl(r);let C="000000"+(e<<16|t<<8|r).toString(16);C=C.substr(C.length-6);let A="0"+Hl(i*255).toString(16);switch(A=A.substr(A.length-2),l.toLowerCase()){case"rgba":return`#${C}${A}`;case"argb":return`#${A}${C}`;default:return`#${C}`}};Ct.prototype.name=function(){const n=iR(this._rgb,"rgb");for(let e of Object.keys(Qa))if(Qa[e]===n)return e.toLowerCase();return n};lr.format.named=n=>{if(n=n.toLowerCase(),Qa[n])return sR(Qa[n]);throw new Error("unknown color name: "+n)};lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Qa[n.toLowerCase()])return"named"}});Ct.prototype.alpha=function(n,e=!1){return n!==void 0&&dr(n)==="number"?e?(this._rgb[3]=n,this):new Ct([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]};Ct.prototype.clipped=function(){return this._rgb._clipped||!1};const Ns={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},O4=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Js(n){const e=O4.get(String(n).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+n);Ns.labWhitePoint=n,Ns.Xn=e[0],Ns.Zn=e[1]}function Xo(){return Ns.labWhitePoint}const Ix=(...n)=>{n=ur(n,"lab");const[e,t,r]=n,[i,l,h]=S4(e,t,r),[C,A,_]=aR(i,l,h);return[C,A,_,n.length>3?n[3]:1]},S4=(n,e,t)=>{const{kE:r,kK:i,kKE:l,Xn:h,Yn:C,Zn:A}=Ns,_=(n+16)/116,B=.002*e+_,q=_-.005*t,Y=B*B*B,ie=q*q*q,me=Y>r?Y:(116*B-16)/i,_e=n>l?Math.pow((n+16)/116,3):n/i,$e=ie>r?ie:(116*q-16)/i,Qe=me*h,Je=_e*C,ct=$e*A;return[Qe,Je,ct]},Ib=n=>{const e=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*e},aR=(n,e,t)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:l,RefWhiteRGB:h,Xn:C,Yn:A,Zn:_}=Ns,B=C*r.m00+A*r.m10+_*r.m20,q=C*r.m01+A*r.m11+_*r.m21,Y=C*r.m02+A*r.m12+_*r.m22,ie=h.X*r.m00+h.Y*r.m10+h.Z*r.m20,me=h.X*r.m01+h.Y*r.m11+h.Z*r.m21,_e=h.X*r.m02+h.Y*r.m12+h.Z*r.m22,$e=(n*r.m00+e*r.m10+t*r.m20)*(ie/B),Qe=(n*r.m01+e*r.m11+t*r.m21)*(me/q),Je=(n*r.m02+e*r.m12+t*r.m22)*(_e/Y),ct=$e*i.m00+Qe*i.m10+Je*i.m20,yt=$e*i.m01+Qe*i.m11+Je*i.m21,ft=$e*i.m02+Qe*i.m12+Je*i.m22,ot=Ib(ct*l.m00+yt*l.m10+ft*l.m20),Ye=Ib(ct*l.m01+yt*l.m11+ft*l.m21),xt=Ib(ct*l.m02+yt*l.m12+ft*l.m22);return[ot*255,Ye*255,xt*255]},Rx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=oR(e,t,r),[A,_,B]=E4(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function E4(n,e,t){const{Xn:r,Yn:i,Zn:l,kE:h,kK:C}=Ns,A=n/r,_=e/i,B=t/l,q=A>h?Math.pow(A,1/3):(C*A+16)/116,Y=_>h?Math.pow(_,1/3):(C*_+16)/116,ie=B>h?Math.pow(B,1/3):(C*B+16)/116;return[116*Y-16,500*(q-Y),200*(Y-ie)]}function Rb(n){const e=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*e}const oR=(n,e,t)=>{n=Rb(n/255),e=Rb(e/255),t=Rb(t/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:l,Xn:h,Yn:C,Zn:A,As:_,Bs:B,Cs:q}=Ns;let Y=n*r.m00+e*r.m10+t*r.m20,ie=n*r.m01+e*r.m11+t*r.m21,me=n*r.m02+e*r.m12+t*r.m22;const _e=h*i.m00+C*i.m10+A*i.m20,$e=h*i.m01+C*i.m11+A*i.m21,Qe=h*i.m02+C*i.m12+A*i.m22;let Je=Y*i.m00+ie*i.m10+me*i.m20,ct=Y*i.m01+ie*i.m11+me*i.m21,yt=Y*i.m02+ie*i.m12+me*i.m22;return Je*=_e/_,ct*=$e/B,yt*=Qe/q,Y=Je*l.m00+ct*l.m10+yt*l.m20,ie=Je*l.m01+ct*l.m11+yt*l.m21,me=Je*l.m02+ct*l.m12+yt*l.m22,[Y,ie,me]};Ct.prototype.lab=function(){return Rx(this._rgb)};const C4=(...n)=>new Ct(...n,"lab");Object.assign(pr,{lab:C4,getLabWhitePoint:Xo,setLabWhitePoint:Js});lr.format.lab=Ix;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"lab"),dr(n)==="array"&&n.length===3)return"lab"}});Ct.prototype.darken=function(n=1){const e=this,t=e.lab();return t[0]-=Ns.Kn*n,new Ct(t,"lab").alpha(e.alpha(),!0)};Ct.prototype.brighten=function(n=1){return this.darken(-n)};Ct.prototype.darker=Ct.prototype.darken;Ct.prototype.brighter=Ct.prototype.brighten;Ct.prototype.get=function(n){const[e,t]=n.split("."),r=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return r};const{pow:w4}=Math,k4=1e-7,A4=20;Ct.prototype.luminance=function(n,e="rgb"){if(n!==void 0&&dr(n)==="number"){if(n===0)return new Ct([0,0,0,this._rgb[3]],"rgb");if(n===1)return new Ct([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),r=A4;const i=(h,C)=>{const A=h.interpolate(C,.5,e),_=A.luminance();return Math.abs(n-_)n?i(h,A):i(A,C)},l=(t>n?i(new Ct([0,0,0]),this):i(this,new Ct([255,255,255]))).rgb();return new Ct([...l,this._rgb[3]])}return P4(...this._rgb.slice(0,3))};const P4=(n,e,t)=>(n=Fb(n),e=Fb(e),t=Fb(t),.2126*n+.7152*e+.0722*t),Fb=n=>(n/=255,n<=.03928?n/12.92:w4((n+.055)/1.055,2.4)),bn={},Ua=(n,e,t=.5,...r)=>{let i=r[0]||"lrgb";if(!bn[i]&&!r.length&&(i=Object.keys(bn)[0]),!bn[i])throw new Error(`interpolation mode ${i} is not defined`);return dr(n)!=="object"&&(n=new Ct(n)),dr(e)!=="object"&&(e=new Ct(e)),bn[i](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))};Ct.prototype.mix=Ct.prototype.interpolate=function(n,e=.5,...t){return Ua(this,n,e,...t)};Ct.prototype.premultiply=function(n=!1){const e=this._rgb,t=e[3];return n?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ct([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};const{sin:T4,cos:D4}=Math,lR=(...n)=>{let[e,t,r]=ur(n,"lch");return isNaN(r)&&(r=0),r=r*g4,[e,D4(r)*t,T4(r)*t]},Fx=(...n)=>{n=ur(n,"lch");const[e,t,r]=n,[i,l,h]=lR(e,t,r),[C,A,_]=Ix(i,l,h);return[C,A,_,n.length>3?n[3]:1]},I4=(...n)=>{const e=nR(ur(n,"hcl"));return Fx(...e)},{sqrt:R4,atan2:F4,round:_4}=Math,uR=(...n)=>{const[e,t,r]=ur(n,"lab"),i=R4(t*t+r*r);let l=(F4(r,t)*y4+360)%360;return _4(i*1e4)===0&&(l=Number.NaN),[e,i,l]},_x=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Rx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};Ct.prototype.lch=function(){return _x(this._rgb)};Ct.prototype.hcl=function(){return nR(_x(this._rgb))};const B4=(...n)=>new Ct(...n,"lch"),L4=(...n)=>new Ct(...n,"hcl");Object.assign(pr,{lch:B4,hcl:L4});lr.format.lch=Fx;lr.format.hcl=I4;["lch","hcl"].forEach(n=>lr.autodetect.push({p:2,test:(...e)=>{if(e=ur(e,n),dr(e)==="array"&&e.length===3)return n}}));Ct.prototype.saturate=function(n=1){const e=this,t=e.lch();return t[1]+=Ns.Kn*n,t[1]<0&&(t[1]=0),new Ct(t,"lch").alpha(e.alpha(),!0)};Ct.prototype.desaturate=function(n=1){return this.saturate(-n)};Ct.prototype.set=function(n,e,t=!1){const[r,i]=n.split("."),l=this[r]();if(i){const h=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(h>-1){if(dr(e)=="string")switch(e.charAt(0)){case"+":l[h]+=+e;break;case"-":l[h]+=+e;break;case"*":l[h]*=+e.substr(1);break;case"/":l[h]/=+e.substr(1);break;default:l[h]=+e}else if(dr(e)==="number")l[h]=e;else throw new Error("unsupported value for Color.set");const C=new Ct(l,r);return t?(this._rgb=C._rgb,this):C}throw new Error(`unknown channel ${i} in mode ${r}`)}else return l};Ct.prototype.tint=function(n=.5,...e){return Ua(this,"white",n,...e)};Ct.prototype.shade=function(n=.5,...e){return Ua(this,"black",n,...e)};const N4=(n,e,t)=>{const r=n._rgb,i=e._rgb;return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"rgb")};bn.rgb=N4;const{sqrt:_b,pow:Oa}=Math,M4=(n,e,t)=>{const[r,i,l]=n._rgb,[h,C,A]=e._rgb;return new Ct(_b(Oa(r,2)*(1-t)+Oa(h,2)*t),_b(Oa(i,2)*(1-t)+Oa(C,2)*t),_b(Oa(l,2)*(1-t)+Oa(A,2)*t),"rgb")};bn.lrgb=M4;const $4=(n,e,t)=>{const r=n.lab(),i=e.lab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"lab")};bn.lab=$4;const Ja=(n,e,t,r)=>{let i,l;r==="hsl"?(i=n.hsl(),l=e.hsl()):r==="hsv"?(i=n.hsv(),l=e.hsv()):r==="hcg"?(i=n.hcg(),l=e.hcg()):r==="hsi"?(i=n.hsi(),l=e.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=n.hcl(),l=e.hcl()):r==="oklch"&&(i=n.oklch().reverse(),l=e.oklch().reverse());let h,C,A,_,B,q;(r.substr(0,1)==="h"||r==="oklch")&&([h,A,B]=i,[C,_,q]=l);let Y,ie,me,_e;return!isNaN(h)&&!isNaN(C)?(C>h&&C-h>180?_e=C-(h+360):C180?_e=C+360-h:_e=C-h,ie=h+t*_e):isNaN(h)?isNaN(C)?ie=Number.NaN:(ie=C,(B==1||B==0)&&r!="hsv"&&(Y=_)):(ie=h,(q==1||q==0)&&r!="hsv"&&(Y=A)),Y===void 0&&(Y=A+t*(_-A)),me=B+t*(q-B),r==="oklch"?new Ct([me,Y,ie],r):new Ct([ie,Y,me],r)},cR=(n,e,t)=>Ja(n,e,t,"lch");bn.lch=cR;bn.hcl=cR;const j4=n=>{if(dr(n)=="number"&&n>=0&&n<=16777215){const e=n>>16,t=n>>8&255,r=n&255;return[e,t,r,1]}throw new Error("unknown num color: "+n)},q4=(...n)=>{const[e,t,r]=ur(n,"rgb");return(e<<16)+(t<<8)+r};Ct.prototype.num=function(){return q4(this._rgb)};const Q4=(...n)=>new Ct(...n,"num");Object.assign(pr,{num:Q4});lr.format.num=j4;lr.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&dr(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num"}});const U4=(n,e,t)=>{const r=n.num(),i=e.num();return new Ct(r+t*(i-r),"num")};bn.num=U4;const{floor:V4}=Math,W4=(...n)=>{n=ur(n,"hcg");let[e,t,r]=n,i,l,h;r=r*255;const C=t*255;if(t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const A=V4(e),_=e-A,B=r*(1-t),q=B+C*(1-_),Y=B+C*_,ie=B+C;switch(A){case 0:[i,l,h]=[ie,Y,B];break;case 1:[i,l,h]=[q,ie,B];break;case 2:[i,l,h]=[B,ie,Y];break;case 3:[i,l,h]=[B,q,ie];break;case 4:[i,l,h]=[Y,B,ie];break;case 5:[i,l,h]=[ie,B,q];break}}return[i,l,h,n.length>3?n[3]:1]},G4=(...n)=>{const[e,t,r]=ur(n,"rgb"),i=tR(e,t,r),l=rR(e,t,r),h=l-i,C=h*100/255,A=i/(255-h)*100;let _;return h===0?_=Number.NaN:(e===l&&(_=(t-r)/h),t===l&&(_=2+(r-e)/h),r===l&&(_=4+(e-t)/h),_*=60,_<0&&(_+=360)),[_,C,A]};Ct.prototype.hcg=function(){return G4(this._rgb)};const z4=(...n)=>new Ct(...n,"hcg");pr.hcg=z4;lr.format.hcg=W4;lr.autodetect.push({p:1,test:(...n)=>{if(n=ur(n,"hcg"),dr(n)==="array"&&n.length===3)return"hcg"}});const Z4=(n,e,t)=>Ja(n,e,t,"hcg");bn.hcg=Z4;const{cos:Sa}=Math,X4=(...n)=>{n=ur(n,"hsi");let[e,t,r]=n,i,l,h;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(h=(1-t)/3,i=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,l=1-(h+i)):e<2/3?(e-=1/3,i=(1-t)/3,l=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,h=1-(i+l)):(e-=2/3,l=(1-t)/3,h=(1+t*Sa(Xs*e)/Sa(Db-Xs*e))/3,i=1-(l+h)),i=sa(r*i*3),l=sa(r*l*3),h=sa(r*h*3),[i*255,l*255,h*255,n.length>3?n[3]:1]},{min:Y4,sqrt:H4,acos:K4}=Math,J4=(...n)=>{let[e,t,r]=ur(n,"rgb");e/=255,t/=255,r/=255;let i;const l=Y4(e,t,r),h=(e+t+r)/3,C=h>0?1-l/h:0;return C===0?i=NaN:(i=(e-t+(e-r))/2,i/=H4((e-t)*(e-t)+(e-r)*(t-r)),i=K4(i),r>t&&(i=Xs-i),i/=Xs),[i*360,C,h]};Ct.prototype.hsi=function(){return J4(this._rgb)};const eQ=(...n)=>new Ct(...n,"hsi");pr.hsi=eQ;lr.format.hsi=X4;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsi"),dr(n)==="array"&&n.length===3)return"hsi"}});const tQ=(n,e,t)=>Ja(n,e,t,"hsi");bn.hsi=tQ;const bv=(...n)=>{n=ur(n,"hsl");const[e,t,r]=n;let i,l,h;if(t===0)i=l=h=r*255;else{const C=[0,0,0],A=[0,0,0],_=r<.5?r*(1+t):r+t-r*t,B=2*r-_,q=e/360;C[0]=q+1/3,C[1]=q,C[2]=q-1/3;for(let Y=0;Y<3;Y++)C[Y]<0&&(C[Y]+=1),C[Y]>1&&(C[Y]-=1),6*C[Y]<1?A[Y]=B+(_-B)*6*C[Y]:2*C[Y]<1?A[Y]=_:3*C[Y]<2?A[Y]=B+(_-B)*(2/3-C[Y])*6:A[Y]=B;[i,l,h]=[A[0]*255,A[1]*255,A[2]*255]}return n.length>3?[i,l,h,n[3]]:[i,l,h,1]},fR=(...n)=>{n=ur(n,"rgba");let[e,t,r]=n;e/=255,t/=255,r/=255;const i=tR(e,t,r),l=rR(e,t,r),h=(l+i)/2;let C,A;return l===i?(C=0,A=Number.NaN):C=h<.5?(l-i)/(l+i):(l-i)/(2-l-i),e==l?A=(t-r)/(l-i):t==l?A=2+(r-e)/(l-i):r==l&&(A=4+(e-t)/(l-i)),A*=60,A<0&&(A+=360),n.length>3&&n[3]!==void 0?[A,C,h,n[3]]:[A,C,h]};Ct.prototype.hsl=function(){return fR(this._rgb)};const rQ=(...n)=>new Ct(...n,"hsl");pr.hsl=rQ;lr.format.hsl=bv;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsl"),dr(n)==="array"&&n.length===3)return"hsl"}});const nQ=(n,e,t)=>Ja(n,e,t,"hsl");bn.hsl=nQ;const{floor:sQ}=Math,iQ=(...n)=>{n=ur(n,"hsv");let[e,t,r]=n,i,l,h;if(r*=255,t===0)i=l=h=r;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const C=sQ(e),A=e-C,_=r*(1-t),B=r*(1-t*A),q=r*(1-t*(1-A));switch(C){case 0:[i,l,h]=[r,q,_];break;case 1:[i,l,h]=[B,r,_];break;case 2:[i,l,h]=[_,r,q];break;case 3:[i,l,h]=[_,B,r];break;case 4:[i,l,h]=[q,_,r];break;case 5:[i,l,h]=[r,_,B];break}}return[i,l,h,n.length>3?n[3]:1]},{min:aQ,max:oQ}=Math,lQ=(...n)=>{n=ur(n,"rgb");let[e,t,r]=n;const i=aQ(e,t,r),l=oQ(e,t,r),h=l-i;let C,A,_;return _=l/255,l===0?(C=Number.NaN,A=0):(A=h/l,e===l&&(C=(t-r)/h),t===l&&(C=2+(r-e)/h),r===l&&(C=4+(e-t)/h),C*=60,C<0&&(C+=360)),[C,A,_]};Ct.prototype.hsv=function(){return lQ(this._rgb)};const uQ=(...n)=>new Ct(...n,"hsv");pr.hsv=uQ;lr.format.hsv=iQ;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"hsv"),dr(n)==="array"&&n.length===3)return"hsv"}});const cQ=(n,e,t)=>Ja(n,e,t,"hsv");bn.hsv=cQ;function Nu(n,e){let t=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(e[0])||(e=e.map(h=>[h]));let r=e[0].length,i=e[0].map((h,C)=>e.map(A=>A[C])),l=n.map(h=>i.map(C=>Array.isArray(h)?h.reduce((A,_,B)=>A+_*(C[B]||0),0):C.reduce((A,_)=>A+_*h,0)));return t===1&&(l=l[0]),r===1?l.map(h=>h[0]):l}const Bx=(...n)=>{n=ur(n,"lab");const[e,t,r,...i]=n,[l,h,C]=fQ([e,t,r]),[A,_,B]=aR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]};function fQ(n){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Nu(t,n);return Nu(e,r.map(i=>i**3))}const Lx=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),l=oR(e,t,r);return[...pQ(l),...i.length>0&&i[0]<1?[i[0]]:[]]};function pQ(n){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Nu(e,n);return Nu(t,r.map(i=>Math.cbrt(i)))}Ct.prototype.oklab=function(){return Lx(this._rgb)};const hQ=(...n)=>new Ct(...n,"oklab");Object.assign(pr,{oklab:hQ});lr.format.oklab=Bx;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklab"),dr(n)==="array"&&n.length===3)return"oklab"}});const dQ=(n,e,t)=>{const r=n.oklab(),i=e.oklab();return new Ct(r[0]+t*(i[0]-r[0]),r[1]+t*(i[1]-r[1]),r[2]+t*(i[2]-r[2]),"oklab")};bn.oklab=dQ;const mQ=(n,e,t)=>Ja(n,e,t,"oklch");bn.oklch=mQ;const{pow:Bb,sqrt:Lb,PI:Nb,cos:BD,sin:LD,atan2:gQ}=Math,yQ=(n,e="lrgb",t=null)=>{const r=n.length;t||(t=Array.from(new Array(r)).map(()=>1));const i=r/t.reduce(function(q,Y){return q+Y});if(t.forEach((q,Y)=>{t[Y]*=i}),n=n.map(q=>new Ct(q)),e==="lrgb")return bQ(n,t);const l=n.shift(),h=l.get(e),C=[];let A=0,_=0;for(let q=0;q{const ie=q.get(e);B+=q.alpha()*t[Y+1];for(let me=0;me=360;)Y-=360;h[q]=Y}else h[q]=h[q]/C[q];return B/=r,new Ct(h,e).alpha(B>.99999?1:B,!0)},bQ=(n,e)=>{const t=n.length,r=[0,0,0,0];for(let i=0;i.9999999&&(r[3]=1),new Ct(Dx(r))},{pow:vQ}=Math;function Mu(n){let e="rgb",t=pr("#ccc"),r=0,i=[0,1],l=[],h=[0,0],C=!1,A=[],_=!1,B=0,q=1,Y=!1,ie={},me=!0,_e=1;const $e=function(Ye){if(Ye=Ye||["#fff","#000"],Ye&&dr(Ye)==="string"&&pr.brewer&&pr.brewer[Ye.toLowerCase()]&&(Ye=pr.brewer[Ye.toLowerCase()]),dr(Ye)==="array"){Ye.length===1&&(Ye=[Ye[0],Ye[0]]),Ye=Ye.slice(0);for(let xt=0;xt=C[It];)It++;return It-1}return 0};let Je=Ye=>Ye,ct=Ye=>Ye;const yt=function(Ye,xt){let It,_t;if(xt==null&&(xt=!1),isNaN(Ye)||Ye===null)return t;xt?_t=Ye:C&&C.length>2?_t=Qe(Ye)/(C.length-2):q!==B?_t=(Ye-B)/(q-B):_t=1,_t=ct(_t),xt||(_t=Je(_t)),_e!==1&&(_t=vQ(_t,_e)),_t=h[0]+_t*(1-h[0]-h[1]),_t=sa(_t,0,1);const Nt=Math.floor(_t*1e4);if(me&&ie[Nt])It=ie[Nt];else{if(dr(A)==="array")for(let At=0;At=Yt&&At===l.length-1){It=A[At];break}if(_t>Yt&&_tie={};$e(n);const ot=function(Ye){const xt=pr(yt(Ye));return _&&xt[_]?xt[_]():xt};return ot.classes=function(Ye){if(Ye!=null){if(dr(Ye)==="array")C=Ye,i=[Ye[0],Ye[Ye.length-1]];else{const xt=pr.analyze(i);Ye===0?C=[xt.min,xt.max]:C=pr.limits(xt,"e",Ye)}return ot}return C},ot.domain=function(Ye){if(!arguments.length)return i;B=Ye[0],q=Ye[Ye.length-1],l=[];const xt=A.length;if(Ye.length===xt&&B!==q)for(let It of Array.from(Ye))l.push((It-B)/(q-B));else{for(let It=0;It2){const It=Ye.map((Nt,At)=>At/(Ye.length-1)),_t=Ye.map(Nt=>(Nt-B)/(q-B));_t.every((Nt,At)=>It[At]===Nt)||(ct=Nt=>{if(Nt<=0||Nt>=1)return Nt;let At=0;for(;Nt>=_t[At+1];)At++;const Yt=(Nt-_t[At])/(_t[At+1]-_t[At]);return It[At]+Yt*(It[At+1]-It[At])})}}return i=[B,q],ot},ot.mode=function(Ye){return arguments.length?(e=Ye,ft(),ot):e},ot.range=function(Ye,xt){return $e(Ye),ot},ot.out=function(Ye){return _=Ye,ot},ot.spread=function(Ye){return arguments.length?(r=Ye,ot):r},ot.correctLightness=function(Ye){return Ye==null&&(Ye=!0),Y=Ye,ft(),Y?Je=function(xt){const It=yt(0,!0).lab()[0],_t=yt(1,!0).lab()[0],Nt=It>_t;let At=yt(xt,!0).lab()[0];const Yt=It+(_t-It)*xt;let er=At-Yt,yr=0,$r=1,Vr=20;for(;Math.abs(er)>.01&&Vr-- >0;)(function(){return Nt&&(er*=-1),er<0?(yr=xt,xt+=($r-xt)*.5):($r=xt,xt+=(yr-xt)*.5),At=yt(xt,!0).lab()[0],er=At-Yt})();return xt}:Je=xt=>xt,ot},ot.padding=function(Ye){return Ye!=null?(dr(Ye)==="number"&&(Ye=[Ye,Ye]),h=Ye,ot):h},ot.colors=function(Ye,xt){arguments.length<2&&(xt="hex");let It=[];if(arguments.length===0)It=A.slice(0);else if(Ye===1)It=[ot(.5)];else if(Ye>1){const _t=i[0],Nt=i[1]-_t;It=xQ(0,Ye,!1).map(At=>ot(_t+At/(Ye-1)*Nt))}else{n=[];let _t=[];if(C&&C.length>2)for(let Nt=1,At=C.length,Yt=1<=At;Yt?NtAt;Yt?Nt++:Nt--)_t.push((C[Nt-1]+C[Nt])*.5);else _t=i;It=_t.map(Nt=>ot(Nt))}return pr[xt]&&(It=It.map(_t=>_t[xt]())),It},ot.cache=function(Ye){return Ye!=null?(me=Ye,ot):me},ot.gamma=function(Ye){return Ye!=null?(_e=Ye,ot):_e},ot.nodata=function(Ye){return Ye!=null?(t=pr(Ye),ot):t},ot}function xQ(n,e,t){let r=[],i=nl;i?h++:h--)r.push(h);return r}const OQ=function(n){let e=[1,1];for(let t=1;tnew Ct(l)),n.length===2)[t,r]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>t[C]+l*(r[C]-t[C]));return new Ct(h,"lab")};else if(n.length===3)[t,r,i]=n.map(l=>l.lab()),e=function(l){const h=[0,1,2].map(C=>(1-l)*(1-l)*t[C]+2*(1-l)*l*r[C]+l*l*i[C]);return new Ct(h,"lab")};else if(n.length===4){let l;[t,r,i,l]=n.map(h=>h.lab()),e=function(h){const C=[0,1,2].map(A=>(1-h)*(1-h)*(1-h)*t[A]+3*(1-h)*(1-h)*h*r[A]+3*(1-h)*h*h*i[A]+h*h*h*l[A]);return new Ct(C,"lab")}}else if(n.length>=5){let l,h,C;l=n.map(A=>A.lab()),C=n.length-1,h=OQ(C),e=function(A){const _=1-A,B=[0,1,2].map(q=>l.reduce((Y,ie,me)=>Y+h[me]*_**(C-me)*A**me*ie[q],0));return new Ct(B,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},EQ=n=>{const e=SQ(n);return e.scale=()=>Mu(e),e},{round:pR}=Math;Ct.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(pR)};Ct.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?n===!1?e:pR(e):e)};const CQ=(...n)=>new Ct(...n,"rgb");Object.assign(pr,{rgb:CQ});lr.format.rgb=(...n)=>{const e=ur(n,"rgba");return e[3]===void 0&&(e[3]=1),e};lr.autodetect.push({p:3,test:(...n)=>{if(n=ur(n,"rgba"),dr(n)==="array"&&(n.length===3||n.length===4&&dr(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb"}});const ms=(n,e,t)=>{if(!ms[t])throw new Error("unknown blend mode "+t);return ms[t](n,e)},Ri=n=>(e,t)=>{const r=pr(t).rgb(),i=pr(e).rgb();return pr.rgb(n(r,i))},Fi=n=>(e,t)=>{const r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r},wQ=n=>n,kQ=(n,e)=>n*e/255,AQ=(n,e)=>n>e?e:n,PQ=(n,e)=>n>e?n:e,TQ=(n,e)=>255*(1-(1-n/255)*(1-e/255)),DQ=(n,e)=>e<128?2*n*e/255:255*(1-2*(1-n/255)*(1-e/255)),IQ=(n,e)=>255*(1-(1-e/255)/(n/255)),RQ=(n,e)=>n===255?255:(n=255*(e/255)/(1-n/255),n>255?255:n);ms.normal=Ri(Fi(wQ));ms.multiply=Ri(Fi(kQ));ms.screen=Ri(Fi(TQ));ms.overlay=Ri(Fi(DQ));ms.darken=Ri(Fi(AQ));ms.lighten=Ri(Fi(PQ));ms.dodge=Ri(Fi(RQ));ms.burn=Ri(Fi(IQ));const{pow:FQ,sin:_Q,cos:BQ}=Math;function LQ(n=300,e=-1.5,t=1,r=1,i=[0,1]){let l=0,h;dr(i)==="array"?h=i[1]-i[0]:(h=0,i=[i,i]);const C=function(A){const _=Xs*((n+120)/360+e*A),B=FQ(i[0]+h*A,r),Y=(l!==0?t[0]+A*l:t)*B*(1-B)/2,ie=BQ(_),me=_Q(_),_e=B+Y*(-.14861*ie+1.78277*me),$e=B+Y*(-.29227*ie-.90649*me),Qe=B+Y*(1.97294*ie);return pr(Dx([_e*255,$e*255,Qe*255,1]))};return C.start=function(A){return A==null?n:(n=A,C)},C.rotations=function(A){return A==null?e:(e=A,C)},C.gamma=function(A){return A==null?r:(r=A,C)},C.hue=function(A){return A==null?t:(t=A,dr(t)==="array"?(l=t[1]-t[0],l===0&&(t=t[1])):l=0,C)},C.lightness=function(A){return A==null?i:(dr(A)==="array"?(i=A,h=A[1]-A[0]):(i=[A,A],h=0),C)},C.scale=()=>pr.scale(C),C.hue(t),C}const NQ="0123456789abcdef",{floor:MQ,random:$Q}=Math,jQ=()=>{let n="#";for(let e=0;e<6;e++)n+=NQ.charAt(MQ($Q()*16));return new Ct(n,"hex")},{log:ND,pow:qQ,floor:QQ,abs:UQ}=Math;function hR(n,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return dr(n)==="object"&&(n=Object.values(n)),n.forEach(r=>{e&&dr(r)==="object"&&(r=r[e]),r!=null&&!isNaN(r)&&(t.values.push(r),t.sum+=r,rt.max&&(t.max=r),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(r,i)=>dR(t,r,i),t}function dR(n,e="equal",t=7){dr(n)=="array"&&(n=hR(n));const{min:r,max:i}=n,l=n.values.sort((C,A)=>C-A);if(t===1)return[r,i];const h=[];if(e.substr(0,1)==="c"&&(h.push(r),h.push(i)),e.substr(0,1)==="e"){h.push(r);for(let C=1;C 0");const C=Math.LOG10E*ND(r),A=Math.LOG10E*ND(i);h.push(r);for(let _=1;_200&&(q=!1)}const me={};for(let $e=0;$e$e-Qe),h.push(_e[0]);for(let $e=1;$e<_e.length;$e+=2){const Qe=_e[$e];!isNaN(Qe)&&h.indexOf(Qe)===-1&&h.push(Qe)}}return h}const VQ=(n,e)=>{n=new Ct(n),e=new Ct(e);const t=n.luminance(),r=e.luminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)};/** + * @license + * + * The APCA contrast prediction algorithm is based of the formulas published + * in the APCA-1.0.98G specification by Myndex. The specification is available at: + * https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg + * + * Note that the APCA implementation is still beta, so please update to + * future versions of chroma.js when they become available. + * + * You can read more about the APCA Readability Criterion at + * https://readtech.org/ARC/ + */const MD=.027,WQ=5e-4,GQ=.1,$D=1.14,Kl=.022,jD=1.414,zQ=(n,e)=>{n=new Ct(n),e=new Ct(e),n.alpha()<1&&(n=Ua(e,n,n.alpha(),"rgb"));const t=qD(...n.rgb()),r=qD(...e.rgb()),i=t>=Kl?t:t+Math.pow(Kl-t,jD),l=r>=Kl?r:r+Math.pow(Kl-r,jD),h=Math.pow(l,.56)-Math.pow(i,.57),C=Math.pow(l,.65)-Math.pow(i,.62),A=Math.abs(l-i)0?A-MD:A+MD)*100};function qD(n,e,t){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}const{sqrt:Zs,pow:Gr,min:ZQ,max:XQ,atan2:QD,abs:UD,cos:Jl,sin:VD,exp:YQ,PI:WD}=Math;function HQ(n,e,t=1,r=1,i=1){var l=function(dn){return 360*dn/(2*WD)},h=function(dn){return 2*WD*dn/360};n=new Ct(n),e=new Ct(e);const[C,A,_]=Array.from(n.lab()),[B,q,Y]=Array.from(e.lab()),ie=(C+B)/2,me=Zs(Gr(A,2)+Gr(_,2)),_e=Zs(Gr(q,2)+Gr(Y,2)),$e=(me+_e)/2,Qe=.5*(1-Zs(Gr($e,7)/(Gr($e,7)+Gr(25,7)))),Je=A*(1+Qe),ct=q*(1+Qe),yt=Zs(Gr(Je,2)+Gr(_,2)),ft=Zs(Gr(ct,2)+Gr(Y,2)),ot=(yt+ft)/2,Ye=l(QD(_,Je)),xt=l(QD(Y,ct)),It=Ye>=0?Ye:Ye+360,_t=xt>=0?xt:xt+360,Nt=UD(It-_t)>180?(It+_t+360)/2:(It+_t)/2,At=1-.17*Jl(h(Nt-30))+.24*Jl(h(2*Nt))+.32*Jl(h(3*Nt+6))-.2*Jl(h(4*Nt-63));let Yt=_t-It;Yt=UD(Yt)<=180?Yt:_t<=It?Yt+360:Yt-360,Yt=2*Zs(yt*ft)*VD(h(Yt)/2);const er=B-C,yr=ft-yt,$r=1+.015*Gr(ie-50,2)/Zs(20+Gr(ie-50,2)),Vr=1+.045*ot,On=1+.015*ot*At,qr=30*YQ(-Gr((Nt-275)/25,2)),$n=-(2*Zs(Gr(ot,7)/(Gr(ot,7)+Gr(25,7))))*VD(2*h(qr)),hn=Zs(Gr(er/(t*$r),2)+Gr(yr/(r*Vr),2)+Gr(Yt/(i*On),2)+$n*(yr/(r*Vr))*(Yt/(i*On)));return XQ(0,ZQ(100,hn))}function KQ(n,e,t="lab"){n=new Ct(n),e=new Ct(e);const r=n.get(t),i=e.get(t);let l=0;for(let h in r){const C=(r[h]||0)-(i[h]||0);l+=C*C}return Math.sqrt(l)}const JQ=(...n)=>{try{return new Ct(...n),!0}catch{return!1}},eU={cool(){return Mu([pr.hsl(180,1,.9),pr.hsl(250,.7,.4)])},hot(){return Mu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},vv={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},mR=Object.keys(vv),GD=new Map(mR.map(n=>[n.toLowerCase(),n])),tU=typeof Proxy=="function"?new Proxy(vv,{get(n,e){const t=e.toLowerCase();if(GD.has(t))return n[GD.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(mR)}}):vv,rU=(...n)=>{n=ur(n,"cmyk");const[e,t,r,i]=n,l=n.length>4?n[4]:1;return i===1?[0,0,0,l]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),r>=1?0:255*(1-r)*(1-i),l]},{max:zD}=Math,nU=(...n)=>{let[e,t,r]=ur(n,"rgb");e=e/255,t=t/255,r=r/255;const i=1-zD(e,zD(t,r)),l=i<1?1/(1-i):0,h=(1-e-i)*l,C=(1-t-i)*l,A=(1-r-i)*l;return[h,C,A,i]};Ct.prototype.cmyk=function(){return nU(this._rgb)};const sU=(...n)=>new Ct(...n,"cmyk");Object.assign(pr,{cmyk:sU});lr.format.cmyk=rU;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"cmyk"),dr(n)==="array"&&n.length===4)return"cmyk"}});const iU=(...n)=>{const e=ur(n,"hsla");let t=Ka(n)||"lsa";return e[0]=es(e[0]||0)+"deg",e[1]=es(e[1]*100)+"%",e[2]=es(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},aU=(...n)=>{const e=ur(n,"lab");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=es(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},oU=(...n)=>{const e=ur(n,"lch");let t=Ka(n)||"lab";return e[0]=es(e[0])+"%",e[1]=es(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},lU=(...n)=>{const e=ur(n,"lab");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=yv(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},gR=(...n)=>{const[e,t,r,...i]=ur(n,"rgb"),[l,h,C]=Lx(e,t,r),[A,_,B]=uR(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},uU=(...n)=>{const e=ur(n,"lch");return e[0]=es(e[0]*100)+"%",e[1]=yv(e[1]),e[2]=isNaN(e[2])?"none":es(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Mb}=Math,cU=(...n)=>{const e=ur(n,"rgba");let t=Ka(n)||"rgb";if(t.substr(0,3)==="hsl")return iU(fR(e),t);if(t.substr(0,3)==="lab"){const r=Xo();Js("d50");const i=aU(Rx(e),t);return Js(r),i}if(t.substr(0,3)==="lch"){const r=Xo();Js("d50");const i=oU(_x(e),t);return Js(r),i}return t.substr(0,5)==="oklab"?lU(Lx(e)):t.substr(0,5)==="oklch"?uU(gR(e)):(e[0]=Mb(e[0]),e[1]=Mb(e[1]),e[2]=Mb(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},yR=(...n)=>{n=ur(n,"lch");const[e,t,r,...i]=n,[l,h,C]=lR(e,t,r),[A,_,B]=Bx(l,h,C);return[A,_,B,...i.length>0&&i[0]<1?[i[0]]:[]]},ei=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ds=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$u=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,rs=/\s*/.source,eo=/\s+/.source,Nx=/\s*,\s*/.source,bc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,to=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,bR=new RegExp("^rgba?\\("+rs+[ei,ei,ei].join(eo)+to+"\\)$"),vR=new RegExp("^rgb\\("+rs+[ei,ei,ei].join(Nx)+rs+"\\)$"),xR=new RegExp("^rgba\\("+rs+[ei,ei,ei,ds].join(Nx)+rs+"\\)$"),OR=new RegExp("^hsla?\\("+rs+[bc,$u,$u].join(eo)+to+"\\)$"),SR=new RegExp("^hsl?\\("+rs+[bc,$u,$u].join(Nx)+rs+"\\)$"),ER=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,CR=new RegExp("^lab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),wR=new RegExp("^lch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),kR=new RegExp("^oklab\\("+rs+[ds,ds,ds].join(eo)+to+"\\)$"),AR=new RegExp("^oklch\\("+rs+[ds,ds,bc].join(eo)+to+"\\)$"),{round:PR}=Math,Ea=n=>n.map((e,t)=>t<=2?sa(PR(e),0,255):e),zr=(n,e=0,t=100,r=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,r?n=e+(n+1)*.5*(t-e):n=e+n*(t-e)),+n),Pn=(n,e)=>n==="none"?e:n,Mx=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let e;if(lr.format.named)try{return lr.format.named(n)}catch{}if((e=n.match(bR))||(e=n.match(vR))){let t=e.slice(1,4);for(let i=0;i<3;i++)t[i]=+zr(Pn(t[i],0),0,255);t=Ea(t);const r=e[4]!==void 0?+zr(e[4],0,1):1;return t[3]=r,t}if(e=n.match(xR)){const t=e.slice(1,5);for(let r=0;r<4;r++)t[r]=+zr(t[r],0,255);return t}if((e=n.match(OR))||(e=n.match(SR))){const t=e.slice(1,4);t[0]=+Pn(t[0].replace("deg",""),0),t[1]=+zr(Pn(t[1],0),0,100)*.01,t[2]=+zr(Pn(t[2],0),0,100)*.01;const r=Ea(bv(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(ER)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const r=bv(t);for(let i=0;i<3;i++)r[i]=PR(r[i]);return r[3]=+e[4],r}if(e=n.match(CR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,100),t[1]=zr(Pn(t[1],0),-125,125,!0),t[2]=zr(Pn(t[2],0),-125,125,!0);const r=Xo();Js("d50");const i=Ea(Ix(t));Js(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(wR)){const t=e.slice(1,4);t[0]=zr(t[0],0,100),t[1]=zr(Pn(t[1],0),0,150,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Xo();Js("d50");const i=Ea(Fx(t));Js(r);const l=e[4]!==void 0?+zr(e[4],0,1):1;return i[3]=l,i}if(e=n.match(kR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),-.4,.4,!0),t[2]=zr(Pn(t[2],0),-.4,.4,!0);const r=Ea(Bx(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}if(e=n.match(AR)){const t=e.slice(1,4);t[0]=zr(Pn(t[0],0),0,1),t[1]=zr(Pn(t[1],0),0,.4,!1),t[2]=+Pn(t[2].replace("deg",""),0);const r=Ea(yR(t)),i=e[4]!==void 0?+zr(e[4],0,1):1;return r[3]=i,r}};Mx.test=n=>bR.test(n)||OR.test(n)||CR.test(n)||wR.test(n)||kR.test(n)||AR.test(n)||vR.test(n)||xR.test(n)||SR.test(n)||ER.test(n)||n==="transparent";Ct.prototype.css=function(n){return cU(this._rgb,n)};const fU=(...n)=>new Ct(...n,"css");pr.css=fU;lr.format.css=Mx;lr.autodetect.push({p:5,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&Mx.test(n))return"css"}});lr.format.gl=(...n)=>{const e=ur(n,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const pU=(...n)=>new Ct(...n,"gl");pr.gl=pU;Ct.prototype.gl=function(){const n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};Ct.prototype.hex=function(n){return iR(this._rgb,n)};const hU=(...n)=>new Ct(...n,"hex");pr.hex=hU;lr.format.hex=sR;lr.autodetect.push({p:4,test:(n,...e)=>{if(!e.length&&dr(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});const{log:eu}=Math,TR=n=>{const e=n/100;let t,r,i;return e<66?(t=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*eu(r),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*eu(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*eu(t),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*eu(r),i=255),[t,r,i,1]},{round:dU}=Math,mU=(...n)=>{const e=ur(n,"rgb"),t=e[0],r=e[2];let i=1e3,l=4e4;const h=.4;let C;for(;l-i>h;){C=(l+i)*.5;const A=TR(C);A[2]/A[0]>=r/t?l=C:i=C}return dU(C)};Ct.prototype.temp=Ct.prototype.kelvin=Ct.prototype.temperature=function(){return mU(this._rgb)};const $b=(...n)=>new Ct(...n,"temp");Object.assign(pr,{temp:$b,kelvin:$b,temperature:$b});lr.format.temp=lr.format.kelvin=lr.format.temperature=TR;Ct.prototype.oklch=function(){return gR(this._rgb)};const gU=(...n)=>new Ct(...n,"oklch");Object.assign(pr,{oklch:gU});lr.format.oklch=yR;lr.autodetect.push({p:2,test:(...n)=>{if(n=ur(n,"oklch"),dr(n)==="array"&&n.length===3)return"oklch"}});Object.assign(pr,{analyze:hR,average:yQ,bezier:EQ,blend:ms,brewer:tU,Color:Ct,colors:Qa,contrast:VQ,contrastAPCA:zQ,cubehelix:LQ,deltaE:HQ,distance:KQ,input:lr,interpolate:Ua,limits:dR,mix:Ua,random:jQ,scale:Mu,scales:eU,valid:JQ});class yU{constructor(){or(this,"PROPERTIES",{...h4,...console,min:Math.min,max:Math.max,data:null,frameCount:0,frameRate:30,frames:300,leds:[],ledCount:0,chroma:pr,rgb:(e=0,t=e,r=t=e)=>pr.rgb(e,t,r),hsl:(e=360,t=1,r=1)=>pr.hsl(e,t,r),clear:()=>{this.leds=new Array(this.ledCount)},led:(e,t=this.rgb())=>{if(!t||!t._rgb)throw new Error("Unexpected color value");e=Math.round(e),!(e<0||e>this.leds.length)&&(this.leds[e]=t._rgb)},line:(e,t,r)=>{const i=[e,t].sort((l,h)=>l-h);for(let l=i[0];l{this.line(0,this.ledCount,e)},gradient:(e,t,r=this.rgb(),i=r,l="rgb")=>{if(!r||!r._rgb)throw new Error("Unexpected color value");if(!i||!i._rgb)throw new Error("Unexpected color value");const h=[e,t].sort();for(let C=h[0];C"u"?B={autoBom:!1}:typeof B!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),B={autoBom:!B}),B.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(_.type)?new Blob(["\uFEFF",_],{type:_.type}):_}function r(_,B,q){var Y=new XMLHttpRequest;Y.open("GET",_),Y.responseType="blob",Y.onload=function(){A(Y.response,B,q)},Y.onerror=function(){console.error("could not download file")},Y.send()}function i(_){var B=new XMLHttpRequest;B.open("HEAD",_,!1);try{B.send()}catch{}return 200<=B.status&&299>=B.status}function l(_){try{_.dispatchEvent(new MouseEvent("click"))}catch{var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),_.dispatchEvent(B)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof gi=="object"&&gi.global===gi?gi:void 0,C=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!C?function(_,B,q){var Y=h.URL||h.webkitURL,ie=document.createElement("a");B=B||_.name||"download",ie.download=B,ie.rel="noopener",typeof _=="string"?(ie.href=_,ie.origin===location.origin?l(ie):i(ie.href)?r(_,B,q):l(ie,ie.target="_blank")):(ie.href=Y.createObjectURL(_),setTimeout(function(){Y.revokeObjectURL(ie.href)},4e4),setTimeout(function(){l(ie)},0))}:"msSaveOrOpenBlob"in navigator?function(_,B,q){if(B=B||_.name||"download",typeof _!="string")navigator.msSaveOrOpenBlob(t(_,q),B);else if(i(_))r(_,B,q);else{var Y=document.createElement("a");Y.href=_,Y.target="_blank",setTimeout(function(){l(Y)})}}:function(_,B,q,Y){if(Y=Y||open("","_blank"),Y&&(Y.document.title=Y.document.body.innerText="downloading..."),typeof _=="string")return r(_,B,q);var ie=_.type==="application/octet-stream",me=/constructor/i.test(h.HTMLElement)||h.safari,_e=/CriOS\/[\d]+/.test(navigator.userAgent);if((_e||ie&&me||C)&&typeof FileReader<"u"){var $e=new FileReader;$e.onloadend=function(){var ct=$e.result;ct=_e?ct:ct.replace(/^data:[^;]*;/,"data:attachment/file;"),Y?Y.location.href=ct:location=ct,Y=null},$e.readAsDataURL(_)}else{var Qe=h.URL||h.webkitURL,Je=Qe.createObjectURL(_);Y?Y.location=Je:location.href=Je,Y=null,setTimeout(function(){Qe.revokeObjectURL(Je)},4e4)}});h.saveAs=A.saveAs=A,n.exports=A})})(vU);const xU=xv;var Ys={},OU={get exports(){return Ys},set exports(n){Ys=n}};(function(n,e){(function(t,r){r(e)})(gi,function(t){function r(q){const Y=new ArrayBuffer(4),ie=new DataView(Y);return ie.setUint32(0,q),new Uint8Array(ie.buffer)}function i(q,Y=0,ie=q.byteLength){let me="";const _e=Math.min(ie,q.byteLength-Y);for(let $e=0;$e<_e;$e+=1)me+=String.fromCharCode(q.getUint8(Y+$e));return me}function l(q){return new TextEncoder().encode(q)}function h(q){const Y=q.reduce((me,_e)=>me+_e.byteLength,0),ie=new Uint8Array(Y);for(let me=0,_e=0;me79)throw new TypeError("Invalid length for key");const me=l("tEXt"),_e=l(`${Y}\0${ie}`),$e=r(function(ct){if(_.length===0)for(let ft=0;ft<256;ft++){let ot=ft;for(let Ye=0;Ye<8;Ye++)1&ot?ot=3988292384^ot>>>1:ot>>>=1;_[ft]=ot}const yt=4294967295;return(((ft,ot,Ye)=>{let xt=ft;for(let It=0;It>>8;return xt})(yt,ct,ct.byteLength)^yt)>>>0}(h([me,_e]))),Qe=h([r(_e.byteLength),me,_e,$e]),Je=16+C(q).getUint32(8)+4;return h([q.subarray(0,Je),Qe,q.subarray(Je)])}t.addMetadata=B,t.addMetadataFromBase64DataURI=function(q,Y,ie){const me="data:image/png;base64,";if(typeof q!="string"||q.substring(0,me.length)!==me)throw new TypeError("Invalid PNG as Base64 Data URI");const _e=atob(q.substring(me.length)),$e=new Uint8Array(_e.length);for(let Je=0;Je<_e.length;Je+=1)$e[Je]=_e.charCodeAt(Je);const Qe=B($e,Y,ie);return me+btoa(i(C(Qe)))},t.getMetadata=function(q,Y){if(!A(q))throw new TypeError("Invalid PNG");const ie=C(q);let me=8;for(;me{n.reset();const A=document.createElement("canvas");A.width=n.frames,A.height=n.ledCount;const _=A.getContext("2d");e();for(let q=0;qthis.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Va(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Is.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Va(this,e,t);let r=[];return this.decompose(e,t,r,0),Is.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vo(this),l=new Vo(e);for(let h=t,C=t;;){if(i.next(h),l.next(h),h=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(C+=i.value.length,i.done||C>=r)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new DR(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new IR(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Or.empty:e.length<=32?new Qr(e):Is.from(Qr.split(e,[]))}}class Qr extends Or{constructor(e,t=CU(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.text[l],C=i+h.length;if((t?r:C)>=e)return new wU(i,C,r,h);i=C+1,r++}}decompose(e,t,r,i){let l=e<=0&&t>=this.length?this:new Qr(ZD(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let h=r.pop(),C=wu(l.text,h.text.slice(),0,l.length);if(C.length<=32)r.push(new Qr(C,h.length+l.length));else{let A=C.length>>1;r.push(new Qr(C.slice(0,A)),new Qr(C.slice(A)))}}else r.push(l)}replace(e,t,r){if(!(r instanceof Qr))return super.replace(e,t,r);[e,t]=Va(this,e,t);let i=wu(this.text,wu(r.text,ZD(this.text,0,e)),t),l=this.length+r.length-(t-e);return i.length<=32?new Qr(i,l):Is.from(Qr.split(i,[]),l)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;l<=t&&he&&h&&(i+=r),el&&(i+=C.slice(Math.max(0,e-l),t-l)),l=A+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(t.push(new Qr(r,i)),r=[],i=-1);return i>-1&&t.push(new Qr(r,i)),t}}class Is extends Or{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let l=0;;l++){let h=this.children[l],C=i+h.length,A=r+h.lines-1;if((t?A:C)>=e)return h.lineInner(e,t,r,i);i=C+1,r=A+1}}decompose(e,t,r,i){for(let l=0,h=0;h<=t&&l=h){let _=i&((h<=e?1:0)|(A>=t?2:0));h>=e&&A<=t&&!_?r.push(C):C.decompose(e-h,t-h,r,_)}h=A+1}}replace(e,t,r){if([e,t]=Va(this,e,t),r.lines=l&&t<=C){let A=h.replace(e-l,t-l,r),_=this.lines-h.lines+A.lines;if(A.lines<_>>5-1&&A.lines>_>>5+1){let B=this.children.slice();return B[i]=A,new Is(B,this.length-(t-e)+r.length)}return super.replace(l,C,A)}l=C+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` +`){[e,t]=Va(this,e,t);let i="";for(let l=0,h=0;le&&l&&(i+=r),eh&&(i+=C.sliceString(e-h,t-h,r)),h=A+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Is))return 0;let r=0,[i,l,h,C]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,l+=t){if(i==h||l==C)return r;let A=this.children[i],_=e.children[l];if(A!=_)return r+A.scanIdentical(_,t);r+=A.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let ie of e)r+=ie.lines;if(r<32){let ie=[];for(let me of e)me.flatten(ie);return new Qr(ie,t)}let i=Math.max(32,r>>5),l=i<<1,h=i>>1,C=[],A=0,_=-1,B=[];function q(ie){let me;if(ie.lines>l&&ie instanceof Is)for(let _e of ie.children)q(_e);else ie.lines>h&&(A>h||!A)?(Y(),C.push(ie)):ie instanceof Qr&&A&&(me=B[B.length-1])instanceof Qr&&ie.lines+me.lines<=32?(A+=ie.lines,_+=ie.length+1,B[B.length-1]=new Qr(me.text.concat(ie.text),me.length+1+ie.length)):(A+ie.lines>i&&Y(),A+=ie.lines,_+=ie.length+1,B.push(ie))}function Y(){A!=0&&(C.push(B.length==1?B[0]:Is.from(B,_)),_=-1,A=B.length=0)}for(let ie of e)q(ie);return Y(),C.length==1?C[0]:new Is(C,t)}}Or.empty=new Qr([""],0);function CU(n){let e=-1;for(let t of n)e+=t.length+1;return e}function wu(n,e,t=0,r=1e9){for(let i=0,l=0,h=!0;l=t&&(A>r&&(C=C.slice(0,r-i)),i0?1:(e instanceof Qr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],h=l>>1,C=i instanceof Qr?i.text.length:i.children.length;if(h==(t>0?C:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Qr){let A=i.text[h+(t<0?-1:0)];if(this.offsets[r]+=t,A.length>Math.max(0,e))return this.value=e==0?A:t>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[h+(t<0?-1:0)];e>A.length?(e-=A.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(A),this.offsets.push(t>0?1:(A instanceof Qr?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class DR{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vo(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class IR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Or.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=DR.prototype[Symbol.iterator]=IR.prototype[Symbol.iterator]=function(){return this});class wU{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Va(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Da="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Da[e-1]<=n;return!1}function XD(n){return n>=127462&&n<=127487}const YD=8205;function pn(n,e,t=!0,r=!0){return(t?RR:AU)(n,e,r)}function RR(n,e,t){if(e==n.length)return e;e&&FR(n.charCodeAt(e))&&_R(n.charCodeAt(e-1))&&e--;let r=ln(n,e);for(e+=Kn(r);e=0&&XD(ln(n,h));)l++,h-=2;if(l%2==0)break;e+=2}else break}return e}function AU(n,e,t){for(;e>0;){let r=RR(n,e-2,t);if(r=56320&&n<57344}function _R(n){return n>=55296&&n<56320}function ln(n,e){let t=n.charCodeAt(e);if(!_R(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return FR(r)?(t-55296<<10)+(r-56320)+65536:t}function $x(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Kn(n){return n<65536?1:2}const Ov=/\r\n?|\n/;var cn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(cn||(cn={}));class Ms{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return l+(e-i);l+=C}else{if(r!=cn.Simple&&_>=e&&(r==cn.TrackDel&&ie||r==cn.TrackBefore&&ie))return null;if(_>e||_==e&&t<0&&!C)return e==i||t<0?l:l+A;l+=A}i=_}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,t=e){for(let r=0,i=0;r=0&&i<=t&&C>=e)return it?"cover":!0;i=C}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ms(e)}static create(e){return new Ms(e)}}class tn extends Ms{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(t,r,i,l,h)=>e=e.replace(i,i+(r-t),h),!1),e}mapDesc(e,t=!1){return Ev(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,l=0;i=0){t[i]=C,t[i+1]=h;let A=i>>1;for(;r.length0&&vi(r,t,l.text),l.forward(B),C+=B}let _=e[h++];for(;C<_;){if(l.done)break e;let B=Math.min(l.len,_-C);gn(t,B,-1),gn(i,B,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(B),C+=B}}return{changes:new tn(t,r),filtered:Ms.create(i)}}toJSON(){let e=[];for(let t=0;t>1].toJSON()))}return e}static of(e,t,r){let i=[],l=[],h=0,C=null;function A(B=!1){if(!B&&!i.length)return;hY||q<0||Y>t)throw new RangeError(`Invalid change range ${q} to ${Y} (in doc of length ${t})`);let me=ie?typeof ie=="string"?Or.of(ie.split(r||Ov)):ie:Or.empty,_e=me.length;if(q==Y&&_e==0)return;qh&&gn(i,q-h,-1),gn(i,Y-q,_e),vi(l,i,me),h=Y}}return _(e),A(!C),C}static empty(e){return new tn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;iC&&typeof h!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;r.length=0&&t<=0&&t==n[i+1]?n[i]+=e:e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function vi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r>1])),!(t||h==n.sections.length||n.sections[h+1]<0);)C=n.sections[h++],A=n.sections[h++];e(i,_,l,B,q),i=_,l=B}}}function Ev(n,e,t,r=!1){let i=[],l=r?[]:null,h=new Yo(n),C=new Yo(e);for(let A=-1;;)if(h.ins==-1&&C.ins==-1){let _=Math.min(h.len,C.len);gn(i,_,-1),h.forward(_),C.forward(_)}else if(C.ins>=0&&(h.ins<0||A==h.i||h.off==0&&(C.len=0&&A=0){let _=0,B=h.len;for(;B;)if(C.ins==-1){let q=Math.min(B,C.len);_+=q,B-=q,C.forward(q)}else if(C.ins==0&&C.lenA||h.ins>=0&&h.len>A)&&(C||r.length>_),l.forward2(A),h.forward(A)}}}}class Yo{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Or.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Or.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ta(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gt.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gt.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return gt.range(e.anchor,e.head)}static create(e,t,r){return new ta(e,t,r)}}class gt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gt.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gt(e.ranges.map(t=>ta.fromJSON(t)),e.main)}static single(e,t=e){return new gt([gt.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,l)=>i.from-l.from),t=e.indexOf(r);for(let i=1;il.head?gt.range(A,C):gt.range(C,A))}}return new gt(e,t)}}function LR(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let jx=0;class $t{constructor(e,t,r,i,l){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=jx++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new $t(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:qx),!!e.static,e.enables)}of(e){return new ku([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ku(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function qx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class ku{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=jx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,l=this.id,h=e[l]>>1,C=this.type==2,A=!1,_=!1,B=[];for(let q of this.dependencies)q=="doc"?A=!0:q=="selection"?_=!0:((t=e[q.id])!==null&&t!==void 0?t:1)&1||B.push(e[q.id]);return{create(q){return q.values[h]=r(q),1},update(q,Y){if(A&&Y.docChanged||_&&(Y.docChanged||Y.selection)||Cv(q,B)){let ie=r(q);if(C?!HD(ie,q.values[h],i):!i(ie,q.values[h]))return q.values[h]=ie,1}return 0},reconfigure:(q,Y)=>{let ie,me=Y.config.address[l];if(me!=null){let _e=qu(Y,me);if(this.dependencies.every($e=>$e instanceof $t?Y.facet($e)===q.facet($e):$e instanceof Hr?Y.field($e,!1)==q.field($e,!1):!0)||(C?HD(ie=r(q),_e,i):i(ie=r(q),_e)))return q.values[h]=_e,0}else ie=r(q);return q.values[h]=ie,1}}}}function HD(n,e,t){if(n.length!=e.length)return!1;for(let r=0;rn[A.id]),i=t.map(A=>A.type),l=r.filter(A=>!(A&1)),h=n[e.id]>>1;function C(A){let _=[];for(let B=0;Br===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(KD).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let l=r.values[t],h=this.updateF(l,i);return this.compareF(l,h)?0:(r.values[t]=h,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}init(e){return[this,KD.of({field:this,create:e})]}get extension(){return this}}const Hi={lowest:4,low:3,default:2,high:1,highest:0};function To(n){return e=>new NR(e,n)}const _i={highest:To(Hi.highest),high:To(Hi.high),default:To(Hi.default),low:To(Hi.low),lowest:To(Hi.lowest)};class NR{constructor(e,t){this.inner=e,this.prec=t}}class vc{of(e){return new wv(this,e)}reconfigure(e){return vc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wv{constructor(e,t){this.compartment=e,this.inner=t}}class ju{constructor(e,t,r,i,l,h){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=h,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,r){let i=[],l=Object.create(null),h=new Map;for(let Y of TU(e,t,h))Y instanceof Hr?i.push(Y):(l[Y.facet.id]||(l[Y.facet.id]=[])).push(Y);let C=Object.create(null),A=[],_=[];for(let Y of i)C[Y.id]=_.length<<1,_.push(ie=>Y.slot(ie));let B=r==null?void 0:r.config.facets;for(let Y in l){let ie=l[Y],me=ie[0].facet,_e=B&&B[Y]||[];if(ie.every($e=>$e.type==0))if(C[me.id]=A.length<<1|1,qx(_e,ie))A.push(r.facet(me));else{let $e=me.combine(ie.map(Qe=>Qe.value));A.push(r&&me.compare($e,r.facet(me))?r.facet(me):$e)}else{for(let $e of ie)$e.type==0?(C[$e.id]=A.length<<1|1,A.push($e.value)):(C[$e.id]=_.length<<1,_.push(Qe=>$e.dynamicSlot(Qe)));C[me.id]=_.length<<1,_.push($e=>PU($e,me,ie))}}let q=_.map(Y=>Y(C));return new ju(e,h,q,C,A,l)}}function TU(n,e,t){let r=[[],[],[],[],[]],i=new Map;function l(h,C){let A=i.get(h);if(A!=null){if(A<=C)return;let _=r[A].indexOf(h);_>-1&&r[A].splice(_,1),h instanceof wv&&t.delete(h.compartment)}if(i.set(h,C),Array.isArray(h))for(let _ of h)l(_,C);else if(h instanceof wv){if(t.has(h.compartment))throw new RangeError("Duplicate use of compartment in extensions");let _=e.get(h.compartment)||h.inner;t.set(h.compartment,_),l(_,C)}else if(h instanceof NR)l(h.inner,h.prec);else if(h instanceof Hr)r[C].push(h),h.provides&&l(h.provides,C);else if(h instanceof ku)r[C].push(h),h.facet.extensions&&l(h.facet.extensions,Hi.default);else{let _=h.extension;if(!_)throw new Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(_,C)}}return l(n,Hi.default),r.reduce((h,C)=>h.concat(C))}function Wo(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function qu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const MR=$t.define(),kv=$t.define({combine:n=>n.some(e=>e),static:!0}),$R=$t.define({combine:n=>n.length?n[0]:void 0,static:!0}),jR=$t.define(),qR=$t.define(),QR=$t.define(),UR=$t.define({combine:n=>n.length?n[0]:!1});class ni{constructor(e,t){this.type=e,this.value=t}static define(){return new DU}}class DU{of(e){return new ni(this,e)}}class IU{constructor(e){this.map=e}of(e){return new sr(this,e)}}class sr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new IU(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(t);l&&r.push(l)}return r}}sr.reconfigure=sr.define();sr.appendConfig=sr.define();class Xr{constructor(e,t,r,i,l,h){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=h,this._doc=null,this._state=null,r&&LR(r,t.newLength),l.some(C=>C.type==Xr.time)||(this.annotations=l.concat(Xr.time.of(Date.now())))}static create(e,t,r,i,l,h){return new Xr(e,t,r,i,l,h)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xr.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Xr.time=ni.define();Xr.userEvent=ni.define();Xr.addToHistory=ni.define();Xr.remote=ni.define();function RU(n,e){let t=[];for(let r=0,i=0;;){let l,h;if(r=n[r]))l=n[r++],h=n[r++];else if(i=0;i--){let l=r[i](n);l instanceof Xr?n=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Xr?n=l[0]:n=WR(e,Ia(l),!1)}return n}function _U(n){let e=n.startState,t=e.facet(QR),r=n;for(let i=t.length-1;i>=0;i--){let l=t[i](n);l&&Object.keys(l).length&&(r=VR(r,Av(e,l,n.changes.newLength),!0))}return r==n?n:Xr.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const BU=[];function Ia(n){return n==null?BU:Array.isArray(n)?n:[n]}var Br=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Br||(Br={}));const LU=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Pv;try{Pv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NU(n){if(Pv)return Pv.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||LU.test(t)))return!0}return!1}function MU(n){return e=>{if(!/\S/.test(e))return Br.Space;if(NU(e))return Br.Word;for(let t=0;t-1)return Br.Word;return Br.Other}}class Sr{constructor(e,t,r,i,l,h){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,h&&(h._state=this);for(let C=0;Ci.set(_,A)),t=null),i.set(C.value.compartment,C.value.extension)):C.is(sr.reconfigure)?(t=null,r=C.value):C.is(sr.appendConfig)&&(t=null,r=Ia(r).concat(C.value));let l;t?l=e.startState.values.slice():(t=ju.resolve(r,i,this),l=new Sr(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(A,_)=>_.reconfigure(A,this),null).values);let h=e.startState.facet(kv)?e.newSelection:e.newSelection.asSingle();new Sr(t,e.newDoc,h,l,(C,A)=>A.update(C,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gt.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),l=[r.range],h=Ia(r.effects);for(let C=1;Ch.spec.fromJSON(C,A)))}}return Sr.create({doc:e.doc,selection:gt.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ju.resolve(e.extensions||[],new Map),r=e.doc instanceof Or?e.doc:Or.of((e.doc||"").split(t.staticFacet(Sr.lineSeparator)||Ov)),i=e.selection?e.selection instanceof gt?e.selection:gt.single(e.selection.anchor,e.selection.head):gt.single(0);return LR(i,r.length),t.staticFacet(kv)||(i=i.asSingle()),new Sr(t,r,i,t.dynamicSlots.map(()=>null),(l,h)=>h.create(l),null)}get tabSize(){return this.facet(Sr.tabSize)}get lineBreak(){return this.facet(Sr.lineSeparator)||` +`}get readOnly(){return this.facet(UR)}phrase(e,...t){for(let r of this.facet(Sr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>t.length?r:t[l-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let l of this.facet(MR))for(let h of l(this,t,r))Object.prototype.hasOwnProperty.call(h,e)&&i.push(h[e]);return i}charCategorizer(e){return MU(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),h=e-r,C=e-r;for(;h>0;){let A=pn(t,h,!1);if(l(t.slice(A,h))!=Br.Word)break;h=A}for(;Cn.length?n[0]:4});Sr.lineSeparator=$R;Sr.readOnly=UR;Sr.phrases=$t.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Sr.languageData=MR;Sr.changeFilter=jR;Sr.transactionFilter=qR;Sr.transactionExtender=QR;vc.reconfigure=sr.define();function bs(n,e,t={}){let r={};for(let i of n)for(let l of Object.keys(i)){let h=i[l],C=r[l];if(C===void 0)r[l]=h;else if(!(C===h||h===void 0))if(Object.hasOwnProperty.call(t,l))r[l]=t[l](C,h);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class aa{eq(e){return this==e}range(e,t=e){return Tv.create(e,t,this)}}aa.prototype.startSide=aa.prototype.endSide=0;aa.prototype.point=!1;aa.prototype.mapMode=cn.TrackDel;let Tv=class GR{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new GR(e,t,r)}};function Dv(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let l=r?this.to:this.from;for(let h=i,C=l.length;;){if(h==C)return h;let A=h+C>>1,_=l[A]-e||(r?this.value[A].endSide:this.value[A].startSide)-t;if(A==h)return _>=0?h:C;_>=0?C=A:h=A+1}}between(e,t,r,i){for(let l=this.findIndex(t,-1e9,!0),h=this.findIndex(r,1e9,!1,l);lie||Y==ie&&_.startSide>0&&_.endSide<=0)continue;(ie-Y||_.endSide-_.startSide)<0||(h<0&&(h=Y),_.point&&(C=Math.max(C,ie-Y)),r.push(_),i.push(Y-h),l.push(ie-h))}return{mapped:r.length?new Qx(i,l,r,C):null,pos:h}}}class gr{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new gr(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,h=e.filter;if(t.length==0&&!h)return this;if(r&&(t=t.slice().sort(Dv)),this.isEmpty)return t.length?gr.of(t):this;let C=new zR(this,null,-1).goto(0),A=0,_=[],B=new ki;for(;C.value||A=0){let q=t[A++];B.addInner(q.from,q.to,q.value)||_.push(q)}else C.rangeIndex==1&&C.chunkIndexthis.chunkEnd(C.chunkIndex)||lC.to||l=l&&e<=l+h.length&&h.between(l,e-l,t-l,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ho.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ho.from(e).goto(t)}static compare(e,t,r,i,l=-1){let h=e.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),C=t.filter(q=>q.maxPoint>0||!q.isEmpty&&q.maxPoint>=l),A=JD(h,C,r),_=new Do(h,A,l),B=new Do(C,A,l);r.iterGaps((q,Y,ie)=>e2(_,q,B,Y,ie,i)),r.empty&&r.length==0&&e2(_,0,B,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=1e9-1);let l=e.filter(B=>!B.isEmpty&&t.indexOf(B)<0),h=t.filter(B=>!B.isEmpty&&e.indexOf(B)<0);if(l.length!=h.length)return!1;if(!l.length)return!0;let C=JD(l,h),A=new Do(l,C,0).goto(r),_=new Do(h,C,0).goto(r);for(;;){if(A.to!=_.to||!Iv(A.active,_.active)||A.point&&(!_.point||!A.point.eq(_.point)))return!1;if(A.to>i)return!0;A.next(),_.next()}}static spans(e,t,r,i,l=-1){let h=new Do(e,null,l).goto(t),C=t,A=h.openStart;for(;;){let _=Math.min(h.to,r);if(h.point){let B=h.activeForPoint(h.to),q=h.pointFromC&&(i.span(C,_,h.active,A),A=h.openEnd(_));if(h.to>r)return A+(h.point&&h.to>r?1:0);C=h.to,h.next()}}static of(e,t=!1){let r=new ki;for(let i of e instanceof Tv?[e]:t?$U(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return gr.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=gr.empty;i=i.nextLayer)t=new gr(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}gr.empty=new gr([],[],null,-1);function $U(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Dv);e=r}return n}gr.empty.nextLayer=gr.empty;class ki{finishChunk(e){this.chunks.push(new Qx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new ki)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(gr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=gr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function JD(n,e,t){let r=new Map;for(let l of n)for(let h=0;h=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new zR(h,t,r,l));return i.length==1?i[0]:new Ho(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)jb(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jb(this.heap,0)}}}function jb(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Do{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ho.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){tu(this.active,e),tu(this.activeTo,e),tu(this.activeRank,e),this.minActive=t2(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:l}=this.cursor;for(;t0;)t++;ru(this.active,t,r),ru(this.activeTo,t,i),ru(this.activeRank,t,l),e&&ru(e,t,this.cursor.from),this.minActive=t2(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&tu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function e2(n,e,t,r,i,l){n.goto(e),t.goto(r);let h=r+i,C=r,A=r-e;for(;;){let _=n.to+A-t.to||n.endSide-t.endSide,B=_<0?n.to+A:t.to,q=Math.min(B,h);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Iv(n.activeForPoint(n.to),t.activeForPoint(t.to))||l.comparePoint(C,q,n.point,t.point):q>C&&!Iv(n.active,t.active)&&l.compareRange(C,q,n.active,t.active),B>h)break;C=B,_<=0&&n.next(),_>=0&&t.next()}}function Iv(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;r--)n[r+1]=n[r];n[e]=t}function t2(n,e){let t=-1,r=1e9;for(let i=0;i=e)return i;if(i==n.length)break;l+=n.charCodeAt(i)==9?t-l%t:1,i=pn(n,i)}return r===!0?-1:n.length}const Fv="ͼ",r2=typeof Symbol>"u"?"__"+Fv:Symbol.for(Fv),_v=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ai{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(h){return/^@/.test(h)?[h]:h.split(/,\s*/)}function l(h,C,A,_){let B=[],q=/^@(\w+)\b/.exec(h[0]),Y=q&&q[1]=="keyframes";if(q&&C==null)return A.push(h[0]+";");for(let ie in C){let me=C[ie];if(/&/.test(ie))l(ie.split(/,\s*/).map(_e=>h.map($e=>_e.replace(/&/,$e))).reduce((_e,$e)=>_e.concat($e)),me,A);else if(me&&typeof me=="object"){if(!q)throw new RangeError("The value of a property ("+ie+") should be a primitive value.");l(i(ie),me,B,Y)}else me!=null&&B.push(ie.replace(/_.*/,"").replace(/[A-Z]/g,_e=>"-"+_e.toLowerCase())+": "+me+";")}(B.length||Y)&&A.push((r&&!q&&!_?h.map(r):h).join(", ")+" {"+B.join(" ")+"}")}for(let h in e)l(i(h),e[h],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=n2[r2]||1;return n2[r2]=e+1,Fv+e.toString(36)}static mount(e,t,r){let i=e[_v],l=r&&r.nonce;i?l&&i.setNonce(l):i=new jU(e,l),i.mount(Array.isArray(t)?t:[t],e)}}let s2=new Map;class jU{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=s2.get(r);if(l)return e[_v]=l;this.sheet=new i.CSSStyleSheet,s2.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_v]=this}mount(e,t){let r=this.sheet,i=0,l=0;for(let h=0;h-1&&(this.modules.splice(A,1),l--,A=-1),A==-1){if(this.modules.splice(l++,0,C),r)for(let _=0;_",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qU=typeof navigator<"u"&&/Mac/.test(navigator.platform),QU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)Pi[48+un]=Pi[96+un]=String(un);for(var un=1;un<=24;un++)Pi[un+111]="F"+un;for(var un=65;un<=90;un++)Pi[un]=String.fromCharCode(un+32),Ko[un]=String.fromCharCode(un);for(var qb in Pi)Ko.hasOwnProperty(qb)||(Ko[qb]=Pi[qb]);function UU(n){var e=qU&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||QU&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ko:Pi)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Jo(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Bv(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Au(n,e){if(!e.anchorNode)return!1;try{return Bv(n,e.anchorNode)}catch{return!1}}function el(n){return n.nodeType==3?la(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Go(n,e,t,r){return t?i2(n,e,t,r,-1)||i2(n,e,t,r,1):!1}function oa(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Qu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function i2(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:$s(n))){if(n.nodeName=="DIV")return!1;let l=n.parentNode;if(!l||l.nodeType!=1)return!1;e=oa(n)+(i<0?0:1),n=l}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?$s(n):0}else return!1}}function $s(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function xc(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function VU(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ZR(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function WU(n,e,t,r,i,l,h,C){let A=n.ownerDocument,_=A.defaultView||window;for(let B=n,q=!1;B&&!q;)if(B.nodeType==1){let Y,ie=B==A.body,me=1,_e=1;if(ie)Y=VU(_);else{if(/^(fixed|sticky)$/.test(getComputedStyle(B).position)&&(q=!0),B.scrollHeight<=B.clientHeight&&B.scrollWidth<=B.clientWidth){B=B.assignedSlot||B.parentNode;continue}let Je=B.getBoundingClientRect();({scaleX:me,scaleY:_e}=ZR(B,Je)),Y={left:Je.left,right:Je.left+B.clientWidth*me,top:Je.top,bottom:Je.top+B.clientHeight*_e}}let $e=0,Qe=0;if(i=="nearest")e.top0&&e.bottom>Y.bottom+Qe&&(Qe=e.bottom-Y.bottom+Qe+h)):e.bottom>Y.bottom&&(Qe=e.bottom-Y.bottom+h,t<0&&e.top-Qe0&&e.right>Y.right+$e&&($e=e.right-Y.right+$e+l)):e.right>Y.right&&($e=e.right-Y.right+l,t<0&&e.lefti.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class zU{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?$s(t):0),r,Math.min(e.focusOffset,r?$s(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let Ca=null;function XR(n){if(n.setActive)return n.setActive();if(Ca)return n.focus(Ca);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),!Ca){Ca=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function KR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=$s(t)}else if(t.parentNode&&!Qu(t))r=oa(t),t=t.parentNode;else return null}}function JR(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&rt)return q.domBoundsAround(e,t,_);if(Y>=e&&i==-1&&(i=A,l=_),_>t&&q.dom.parentNode==this.dom){h=A,C=B;break}B=Y,_=Y+q.breakAfter}return{from:l,to:C<0?r+this.length:C,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:h=0?this.children[h].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Ux){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function tF(n,e,t,r,i,l,h,C,A){let{children:_}=n,B=_.length?_[e]:null,q=l.length?l[l.length-1]:null,Y=q?q.breakAfter:h;if(!(e==r&&B&&!h&&!Y&&l.length<2&&B.merge(t,i,l.length?q:null,t==0,C,A))){if(r<_.length){let ie=_[r];ie&&(i0&&(!h&&l.length&&B.merge(t,B.length,l[0],!1,C,0)?B.breakAfter=l.shift().breakAfter:(t2);var Qt={mac:c2||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:Oc,ie_version:nF?Lv.documentMode||6:Mv?+Mv[1]:Nv?+Nv[1]:0,gecko:l2,gecko_version:l2?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!Qb,chrome_version:Qb?+Qb[1]:0,ios:c2,android:/Android\b/.test(_n.userAgent),webkit:u2,safari:sF,webkit_version:u2?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Lv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YU=256;class gs extends Pr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,r){return this.flags&8||r&&(!(r instanceof gs)||this.length-(t-e)+r.length>YU||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new gs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new yn(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return HU(this.dom,e,t)}}class ri extends Pr{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let i of t)i.setParent(this)}setAttrs(e){if(YR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,i,l,h){return r&&(!(r instanceof ri&&r.mark.eq(this.mark))||e&&l<=0||te&&t.push(r=e&&(i=l),r=A,l++}let h=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ri(this.mark,t,h)}domAtPos(e){return iF(this,e)}coordsAt(e,t){return oF(this,e,t)}}function HU(n,e,t){let r=n.nodeValue.length;e>r&&(e=r);let i=e,l=e,h=0;e==0&&t<0||e==r&&t>=0?Qt.chrome||Qt.gecko||(e?(i--,h=1):l=0)?0:C.length-1];return Qt.safari&&!h&&A.width==0&&(A=Array.prototype.find.call(C,_=>_.width)||A),h?xc(A,h<0):A||null}class xi extends Pr{static create(e,t,r){return new xi(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=xi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,r,i,l,h){return r&&(!(r instanceof xi)||!this.widget.compare(r.widget)||e>0&&l<=0||t0)?yn.before(this.dom):yn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let i=this.dom.getClientRects(),l=null;if(!i.length)return null;let h=this.side?this.side<0:e>0;for(let C=h?i.length-1:0;l=i[C],!(e>0?C==0:C==i.length-1||l.top0?yn.before(this.dom):yn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Or.empty}get isHidden(){return!0}}gs.prototype.children=xi.prototype.children=Wa.prototype.children=Ux;function iF(n,e){let t=n.dom,{children:r}=n,i=0;for(let l=0;il&&e0;l--){let h=r[l-1];if(h.dom.parentNode==t)return h.domAtPos(h.length)}for(let l=i;l0&&e instanceof ri&&i.length&&(r=i[i.length-1])instanceof ri&&r.mark.eq(e.mark)?aF(r,e.children[0],t-1):(i.push(e),e.setParent(n)),n.length+=e.length}function oF(n,e,t){let r=null,i=-1,l=null,h=-1;function C(_,B){for(let q=0,Y=0;q<_.children.length&&Y<=B;q++){let ie=_.children[q],me=Y+ie.length;me>=B&&(ie.children.length?C(ie,B-Y):(!l||l.isHidden&&t>0)&&(me>B||Y==me&&ie.getSide()>0)?(l=ie,h=B-Y):(Y-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let l of r)if(l!=t&&(i.indexOf(l)==-1||n[l]!==e[l]))return!1;return!0}function jv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function JU(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Ti(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:h}=lF(e,t);r=(l?t?-3e8:-1:5e8)-1,i=(h?t?2e8:1:-6e8)+1}return new Ti(e,r,i,t,e.widget||null,!0)}static line(e){return new ml(e)}static set(e,t=!1){return gr.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ht.none=gr.empty;class dl extends Ht{constructor(e){let{start:t,end:r}=lF(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof dl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Uu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}dl.prototype.point=!1;class ml extends Ht{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ml&&this.spec.class==e.spec.class&&Uu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ml.prototype.mapMode=cn.TrackBefore;ml.prototype.point=!0;class Ti extends Ht{constructor(e,t,r,i,l,h){super(t,r,l,e),this.block=i,this.isReplace=h,this.mapMode=i?t<=0?cn.TrackBefore:cn.TrackAfter:cn.TrackDel}get type(){return this.startSide!=this.endSide?Dn.WidgetRange:this.startSide<=0?Dn.WidgetBefore:Dn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ti&&eV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ti.prototype.point=!0;function lF(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function eV(n,e){return n==e||!!(n&&e&&n.compare(e))}function qv(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Zr extends Pr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,i,l,h){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),rF(this,e,t,r?r.children.slice():[],l,h),!0}split(e){let t=new Zr;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:r,off:i}=this.childPos(e);i&&(t.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let l=r;l0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Uu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){aF(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=$v(t,this.attrs||{})),r&&(this.attrs=$v({class:r},this.attrs||{}))}domAtPos(e){return iF(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?this.flags&4&&(YR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(jv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Pr.get(i)instanceof ri;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Pr.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Qt.ios||!this.children.some(l=>l instanceof gs))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let r of this.children){if(!(r instanceof gs)||/[^ -~]/.test(r.text))return null;let i=el(r.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let r=oF(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,l=r.bottom-r.top;if(Math.abs(l-i.lineHeight)<2&&i.textHeight=t){if(l instanceof Zr)return l;if(h>t)break}i=h+l.breakAfter}return null}}class ti extends Pr{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,i,l,h){return r&&(!(r instanceof ti)||!this.widget.compare(r.widget)||e>0&&l<=0||t0}}class Qv extends si{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class zo{constructor(e,t,r,i){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ti&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nu(new Wa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ti)&&this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:h,done:C}=this.cursor.next(this.skip);if(this.skip=0,C)throw new Error("Ran out of text content when drawing inline views");if(h){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(nu(new gs(this.text.slice(this.textOff,this.textOff+i)),t),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,t,r,i){this.buildText(t-e,r,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,r,i,l,h){if(this.disallowBlockEffectsFor[h]&&r instanceof Ti){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let C=t-e;if(r instanceof Ti)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ti(r.widget||Ga.block,C,r));else{let A=xi.create(r.widget||Ga.inline,C,C?0:r.startSide),_=this.atCursorPos&&!A.isEditable&&l<=i.length&&(e0),B=!A.isEditable&&(ei.length||r.startSide<=0),q=this.getLine();this.pendingBuffer==2&&!_&&!A.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),_&&(q.append(nu(new Wa(1),i),l),l=i.length+Math.max(0,l-i.length)),q.append(nu(A,i),l),this.atCursorPos=B,this.pendingBuffer=B?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);C&&(this.textOff+C<=this.text.length?this.textOff+=C:(this.skip+=C-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,r,i,l){let h=new zo(e,t,r,l);return h.openEnd=gr.spans(i,t,r,h),h.openStart<0&&(h.openStart=h.openEnd),h.finish(h.openEnd),h}}function nu(n,e){for(let t of e)n=new ri(t,[n],n.length);return n}class Ga extends si{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ga.inline=new Ga("span");Ga.block=new Ga("div");var Rr=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Rr||(Rr={}));const ua=Rr.LTR,Vx=Rr.RTL;function uF(n){let e=[];for(let t=0;t=t){if(C.level==r)return h;(l<0||(i!=0?i<0?C.fromt:e[l].level>C.level))&&(l=h)}}if(l<0)throw new RangeError("Index out of range");return l}}function fF(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;_e-=3)if(ks[_e+1]==-ie){let $e=ks[_e+2],Qe=$e&2?i:$e&4?$e&1?l:i:0;Qe&&(Ar[q]=Ar[ks[_e]]=Qe),C=_e;break}}else{if(ks.length==189)break;ks[C++]=q,ks[C++]=Y,ks[C++]=A}else if((me=Ar[q])==2||me==1){let _e=me==i;A=_e?0:1;for(let $e=C-3;$e>=0;$e-=3){let Qe=ks[$e+2];if(Qe&2)break;if(_e)ks[$e+2]|=2;else{if(Qe&4)break;ks[$e+2]|=4}}}}}function aV(n,e,t,r){for(let i=0,l=r;i<=t.length;i++){let h=i?t[i-1].to:n,C=iA;)me==$e&&(me=t[--_e].from,$e=_e?t[_e-1].to:n),Ar[--me]=ie;A=B}else l=_,A++}}}function Vv(n,e,t,r,i,l,h){let C=r%2?2:1;if(r%2==i%2)for(let A=e,_=0;AA&&h.push(new Oi(A,_e.from,ie));let $e=_e.direction==ua!=!(ie%2);Wv(n,$e?r+1:r,i,_e.inner,_e.from,_e.to,h),A=_e.to}me=_e.to}else{if(me==t||(B?Ar[me]!=C:Ar[me]==C))break;me++}Y?Vv(n,A,me,r+1,i,Y,h):Ae;){let B=!0,q=!1;if(!_||A>l[_-1].to){let _e=Ar[A-1];_e!=C&&(B=!1,q=_e==16)}let Y=!B&&C==1?[]:null,ie=B?r:r+1,me=A;e:for(;;)if(_&&me==l[_-1].to){if(q)break e;let _e=l[--_];if(!B)for(let $e=_e.from,Qe=_;;){if($e==e)break e;if(Qe&&l[Qe-1].to==$e)$e=l[--Qe].from;else{if(Ar[$e-1]==C)break e;break}}if(Y)Y.push(_e);else{_e.toAr.length;)Ar[Ar.length]=256;let r=[],i=e==ua?0:1;return Wv(n,i,i,t,0,n.length,r),r}function pF(n){return[new Oi(0,n,0)]}let hF="";function lV(n,e,t,r,i){var l;let h=r.head-n.from,C=Oi.find(e,h,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),A=e[C],_=A.side(i,t);if(h==_){let Y=C+=i?1:-1;if(Y<0||Y>=e.length)return null;A=e[C=Y],h=A.side(!i,t),_=A.side(i,t)}let B=pn(n.text,h,A.forward(i,t));(BA.to)&&(B=_),hF=n.text.slice(Math.min(h,B),Math.max(h,B));let q=C==(i?e.length-1:0)?null:e[C+(i?1:-1)];return q&&B==_&&q.level+(i?0:1)n.some(e=>e)}),OF=$t.define({combine:n=>n.some(e=>e)}),SF=$t.define();class Fa{constructor(e,t="nearest",r="nearest",i=5,l=5,h=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=h}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(gt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const su=sr.define({map:(n,e)=>n.map(e)}),EF=sr.define();function Tn(n,e,t){let r=n.facet(yF);r.length?r[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const yi=$t.define({combine:n=>n.length?n[0]:!0});let cV=0;const No=$t.define();class Ur{constructor(e,t,r,i,l){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.extension=l(this)}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:l,decorations:h}=t||{};return new Ur(cV++,e,r,i,C=>{let A=[No.of(C)];return h&&A.push(tl.of(_=>{let B=_.plugin(C);return B?h(B):Ht.none})),l&&A.push(l(C)),A})}static fromClass(e,t){return Ur.define(r=>new e(r),t)}}class Ub{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Tn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Tn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Tn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const CF=$t.define(),zx=$t.define(),tl=$t.define(),wF=$t.define(),Zx=$t.define(),kF=$t.define();function p2(n,e){let t=n.state.facet(kF);if(!t.length)return t;let r=t.map(l=>l instanceof Function?l(n):l),i=[];return gr.spans(r,e.from,e.to,{point(){},span(l,h,C,A){let _=l-e.from,B=h-e.from,q=i;for(let Y=C.length-1;Y>=0;Y--,A--){let ie=C[Y].spec.bidiIsolate,me;if(ie==null&&(ie=uV(e.text,_,B)),A>0&&q.length&&(me=q[q.length-1]).to==_&&me.direction==ie)me.to=B,q=me.inner;else{let _e={from:_,to:B,direction:ie,inner:[]};q.push(_e),q=_e.inner}}}}),i}const AF=$t.define();function PF(n){let e=0,t=0,r=0,i=0;for(let l of n.state.facet(AF)){let h=l(n);h&&(h.left!=null&&(e=Math.max(e,h.left)),h.right!=null&&(t=Math.max(t,h.right)),h.top!=null&&(r=Math.max(r,h.top)),h.bottom!=null&&(i=Math.max(i,h.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Mo=$t.define();class ts{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new ts(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toAB)break;l+=2}if(!A)return r;new ts(A.fromA,A.toA,A.fromB,A.toB).addToSet(r),h=A.toA,C=A.toB}}}class Vu{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=tn.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,h,C,A)=>i.push(new ts(l,h,C,A))),this.changedRanges=i}static create(e,t,r){return new Vu(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class h2 extends Pr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ht.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ts(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:_,toA:B})=>Bthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!yV(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?pV(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:_,to:B}=this.hasComposition;r=new ts(_,B,e.changes.mapPos(_,-1),e.changes.mapPos(B,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(Qt.ie||Qt.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let h=this.decorations,C=this.updateDeco(),A=mV(h,C,e.changes);return r=ts.extendWithRanges(r,A),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=Qt.chrome||Qt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,h),this.flags&=-8,h&&(h.written||i.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(h=>h.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to=0?i[h]:null;if(!C)break;let{fromA:A,toA:_,fromB:B,toB:q}=C,Y,ie,me,_e;if(r&&r.range.fromBB){let yt=zo.build(this.view.state.doc,B,r.range.fromB,this.decorations,this.dynamicDecorationMap),ft=zo.build(this.view.state.doc,r.range.toB,q,this.decorations,this.dynamicDecorationMap);ie=yt.breakAtStart,me=yt.openStart,_e=ft.openEnd;let ot=this.compositionView(r);ft.breakAtStart?ot.breakAfter=1:ft.content.length&&ot.merge(ot.length,ot.length,ft.content[0],!1,ft.openStart,0)&&(ot.breakAfter=ft.content[0].breakAfter,ft.content.shift()),yt.content.length&&ot.merge(0,0,yt.content[yt.content.length-1],!0,0,yt.openEnd)&&yt.content.pop(),Y=yt.content.concat(ot).concat(ft.content)}else({content:Y,breakAtStart:ie,openStart:me,openEnd:_e}=zo.build(this.view.state.doc,B,q,this.decorations,this.dynamicDecorationMap));let{i:$e,off:Qe}=l.findPos(_,1),{i:Je,off:ct}=l.findPos(A,-1);tF(this,Je,ct,$e,Qe,Y,ie,me,_e)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(EF)&&(this.editContextFormatting=r.value)}compositionView(e){let t=new gs(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new ri(i,[t],t.length);let r=new Zr;return r.append(t,0),r}fixCompositionDOM(e){let t=(l,h)=>{h.flags|=8|(h.children.some(A=>A.flags&7)?1:0),this.markedForComposition.add(h);let C=Pr.get(l);C&&C!=h&&(C.dom=null),h.setDOM(l)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];t(e.line,i);for(let l=e.marks.length-1;l>=-1;l--)r=i.childPos(r.off,1),i=i.children[r.i],t(l>=0?e.marks[l].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,l=!i&&Au(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||t||l))return;let h=this.forceSelection;this.forceSelection=!1;let C=this.view.state.selection.main,A=this.moveToLine(this.domAtPos(C.anchor)),_=C.empty?A:this.moveToLine(this.domAtPos(C.head));if(Qt.gecko&&C.empty&&!this.hasComposition&&fV(A)){let q=document.createTextNode("");this.view.observer.ignore(()=>A.node.insertBefore(q,A.node.childNodes[A.offset]||null)),A=_=new yn(q,0),h=!0}let B=this.view.observer.selectionRange;(h||!B.focusNode||(!Go(A.node,A.offset,B.anchorNode,B.anchorOffset)||!Go(_.node,_.offset,B.focusNode,B.focusOffset))&&!this.suppressWidgetCursorChange(B,C))&&(this.view.observer.ignore(()=>{Qt.android&&Qt.chrome&&this.dom.contains(B.focusNode)&&gV(B.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let q=Jo(this.view.root);if(q)if(C.empty){if(Qt.gecko){let Y=hV(A.node,A.offset);if(Y&&Y!=3){let ie=(Y==1?KR:JR)(A.node,A.offset);ie&&(A=new yn(ie.node,ie.offset))}}q.collapse(A.node,A.offset),C.bidiLevel!=null&&q.caretBidiLevel!==void 0&&(q.caretBidiLevel=C.bidiLevel)}else if(q.extend){q.collapse(A.node,A.offset);try{q.extend(_.node,_.offset)}catch{}}else{let Y=document.createRange();C.anchor>C.head&&([A,_]=[_,A]),Y.setEnd(_.node,_.offset),Y.setStart(A.node,A.offset),q.removeAllRanges(),q.addRange(Y)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(A,_)),this.impreciseAnchor=A.precise?null:new yn(B.anchorNode,B.anchorOffset),this.impreciseHead=_.precise?null:new yn(B.focusNode,B.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Go(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Jo(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let h=Zr.find(this,t.head);if(!h)return;let C=h.posAtStart;if(t.head==C||t.head==C+h.length)return;let A=this.coordsAt(t.head,-1),_=this.coordsAt(t.head,1);if(!A||!_||A.bottom>_.top)return;let B=this.domAtPos(t.head+t.assoc);r.collapse(B.node,B.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let q=e.observer.selectionRange;e.docView.posFromDOM(q.anchorNode,q.anchorOffset)!=t.from&&r.collapse(i,l)}moveToLine(e){let t=this.dom,r;if(e.node!=t)return e;for(let i=e.offset;!r&&i=0;i--){let l=Pr.get(t.childNodes[i]);l instanceof Zr&&(r=l.domAtPos(l.length))}return r?new yn(r.node,r.offset,!0):e}nearest(e){for(let t=e;t;){let r=Pr.get(t);if(r&&r.rootView==this)return r;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t=0;h--){let C=this.children[h],A=l-C.breakAfter,_=A-C.length;if(Ae||C.covers(1))&&(!r||C instanceof Zr&&!(r instanceof Zr&&t>=0)))r=C,i=_;else if(r&&_==e&&A==e&&C instanceof ti&&Math.abs(t)<2){if(C.deco.startSide<0)break;h&&(r=null)}l=_}return r?r.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Zr))return null;for(;i.children.length;){let{i:C,off:A}=i.childPos(r,1);for(;;C++){if(C==i.children.length)return null;if((i=i.children[C]).length)break}r=A}if(!(i instanceof gs))return null;let l=pn(i.text,r);if(l==r)return null;let h=la(i.dom,r,l).getClientRects();for(let C=0;CMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,C=-1,A=this.view.textDirection==Rr.LTR;for(let _=0,B=0;Bi)break;if(_>=r){let ie=q.dom.getBoundingClientRect();if(t.push(ie.height),h){let me=q.dom.lastChild,_e=me?el(me):[];if(_e.length){let $e=_e[_e.length-1],Qe=A?$e.right-ie.left:ie.right-$e.left;Qe>C&&(C=Qe,this.minWidth=l,this.minWidthFrom=_,this.minWidthTo=Y)}}}_=Y+q.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Rr.RTL:Rr.LTR}measureTextSize(){for(let l of this.children)if(l instanceof Zr){let h=l.measureTextSize();if(h)return h}let e=document.createElement("div"),t,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=el(e.firstChild)[0];t=e.getBoundingClientRect().height,r=l?l.width/27:7,i=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:r,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new eF(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let l=i==t.viewports.length?null:t.viewports[i],h=l?l.from-1:this.length;if(h>r){let C=(t.lineBlockAt(h).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ht.replace({widget:new Qv(C),block:!0,inclusive:!0,isBlockGap:!0}).range(r,h))}if(!l)break;r=l.to+1}return Ht.set(e)}updateDeco(){let e=1,t=this.view.state.facet(tl).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(wF).map((l,h)=>{let C=typeof l=="function";return C&&(r=!0),C?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(gr.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let l=PF(this.view),h={left:r.left-l.left,top:r.top-l.top,right:r.right+l.right,bottom:r.bottom+l.bottom},{offsetWidth:C,offsetHeight:A}=this.view.scrollDOM;WU(this.view.scrollDOM,h,t.head{re.from&&(t=!0)}),t}function bV(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),l=e-i.from;if(i.length==0)return gt.cursor(e);l==0?t=1:l==i.length&&(t=-1);let h=l,C=l;t<0?h=pn(i.text,l,!1):C=pn(i.text,l);let A=r(i.text.slice(h,C));for(;h>0;){let _=pn(i.text,h,!1);if(r(i.text.slice(_,h))!=A)break;h=_}for(;Cn?e.left-n:Math.max(0,n-e.right)}function xV(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vb(n,e){return n.tope.top+1}function d2(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function zv(n,e,t){let r,i,l,h,C=!1,A,_,B,q;for(let me=n.firstChild;me;me=me.nextSibling){let _e=el(me);for(let $e=0;$e<_e.length;$e++){let Qe=_e[$e];i&&Vb(i,Qe)&&(Qe=d2(m2(Qe,i.bottom),i.top));let Je=vV(e,Qe),ct=xV(t,Qe);if(Je==0&&ct==0)return me.nodeType==3?g2(me,e,t):zv(me,e,t);if(!r||h>ct||h==ct&&l>Je){r=me,i=Qe,l=Je,h=ct;let yt=ct?t0?$e<_e.length-1:$e>0)}Je==0?t>Qe.bottom&&(!B||B.bottomQe.top)&&(_=me,q=Qe):B&&Vb(B,Qe)?B=m2(B,Qe.bottom):q&&Vb(q,Qe)&&(q=d2(q,Qe.top))}}if(B&&B.bottom>=t?(r=A,i=B):q&&q.top<=t&&(r=_,i=q),!r)return{node:n,offset:0};let Y=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return g2(r,Y,t);if(C&&r.contentEditable!="false")return zv(r,Y,t);let ie=Array.prototype.indexOf.call(n.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:n,offset:ie}}function g2(n,e,t){let r=n.nodeValue.length,i=-1,l=1e9,h=0;for(let C=0;Ct?B.top-t:t-B.bottom)-1;if(B.left-1<=e&&B.right+1>=e&&q=(B.left+B.right)/2,ie=Y;if((Qt.chrome||Qt.gecko)&&la(n,C).getBoundingClientRect().left==B.right&&(ie=!Y),q<=0)return{node:n,offset:C+(ie?1:0)};i=C+(ie?1:0),l=q}}}return{node:n,offset:i>-1?i:h>0?n.nodeValue.length:0}}function DF(n,e,t,r=-1){var i,l;let h=n.contentDOM.getBoundingClientRect(),C=h.top+n.viewState.paddingTop,A,{docHeight:_}=n.viewState,{x:B,y:q}=e,Y=q-C;if(Y<0)return 0;if(Y>_)return n.state.doc.length;for(let yt=n.viewState.heightOracle.textHeight/2,ft=!1;A=n.elementAtHeight(Y),A.type!=Dn.Text;)for(;Y=r>0?A.bottom+yt:A.top-yt,!(Y>=0&&Y<=_);){if(ft)return t?null:0;ft=!0,r=-r}q=C+Y;let ie=A.from;if(ien.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:y2(n,h,A,B,q);let me=n.dom.ownerDocument,_e=n.root.elementFromPoint?n.root:me,$e=_e.elementFromPoint(B,q);$e&&!n.contentDOM.contains($e)&&($e=null),$e||(B=Math.max(h.left+1,Math.min(h.right-1,B)),$e=_e.elementFromPoint(B,q),$e&&!n.contentDOM.contains($e)&&($e=null));let Qe,Je=-1;if($e&&((i=n.docView.nearest($e))===null||i===void 0?void 0:i.isEditable)!=!1){if(me.caretPositionFromPoint){let yt=me.caretPositionFromPoint(B,q);yt&&({offsetNode:Qe,offset:Je}=yt)}else if(me.caretRangeFromPoint){let yt=me.caretRangeFromPoint(B,q);yt&&({startContainer:Qe,startOffset:Je}=yt,(!n.contentDOM.contains(Qe)||Qt.safari&&OV(Qe,Je,B)||Qt.chrome&&SV(Qe,Je,B))&&(Qe=void 0))}Qe&&(Je=Math.min($s(Qe),Je))}if(!Qe||!n.docView.dom.contains(Qe)){let yt=Zr.find(n.docView,ie);if(!yt)return Y>A.top+A.height/2?A.to:A.from;({node:Qe,offset:Je}=zv(yt.dom,B,q))}let ct=n.docView.nearest(Qe);if(!ct)return null;if(ct.isWidget&&((l=ct.dom)===null||l===void 0?void 0:l.nodeType)==1){let yt=ct.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let C=n.viewState.heightOracle.textHeight,A=Math.floor((i-t.top-(n.defaultLineHeight-C)*.5)/C);l+=A*n.viewState.heightOracle.lineLength}let h=n.state.sliceDoc(t.from,t.to);return t.from+Rv(h,l,n.state.tabSize)}function OV(n,e,t){let r;if(n.nodeType!=3||e!=(r=n.nodeValue.length))return!1;for(let i=n.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return la(n,r-1,r).getBoundingClientRect().left>t}function SV(n,e,t){if(e!=0)return!1;for(let i=n;;){let l=i.parentNode;if(!l||l.nodeType!=1||l.firstChild!=i)return!1;if(l.classList.contains("cm-line"))break;i=l}let r=n.nodeType==1?n.getBoundingClientRect():la(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-r.left>5}function Zv(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let r of t.type)if(r.to>e||r.to==e&&(r.to==t.to||r.type==Dn.Text))return r}return t}function EV(n,e,t,r){let i=Zv(n,e.head),l=!r||i.type!=Dn.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let h=n.dom.getBoundingClientRect(),C=n.textDirectionAt(i.from),A=n.posAtCoords({x:t==(C==Rr.LTR)?h.right-1:h.left+1,y:(l.top+l.bottom)/2});if(A!=null)return gt.cursor(A,t?-1:1)}return gt.cursor(t?i.to:i.from,t?-1:1)}function b2(n,e,t,r){let i=n.state.doc.lineAt(e.head),l=n.bidiSpans(i),h=n.textDirectionAt(i.from);for(let C=e,A=null;;){let _=lV(i,l,h,C,t),B=hF;if(!_){if(i.number==(t?n.state.doc.lines:1))return C;B=` +`,i=n.state.doc.line(i.number+(t?1:-1)),l=n.bidiSpans(i),_=n.visualLineSide(i,!t)}if(A){if(!A(B))return C}else{if(!r)return _;A=r(B)}C=_}}function CV(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return l=>{let h=r(l);return i==Br.Space&&(i=h),i==h}}function wV(n,e,t,r){let i=e.head,l=t?1:-1;if(i==(t?n.state.doc.length:0))return gt.cursor(i,e.assoc);let h=e.goalColumn,C,A=n.contentDOM.getBoundingClientRect(),_=n.coordsAtPos(i,e.assoc||-1),B=n.documentTop;if(_)h==null&&(h=_.left-A.left),C=l<0?_.top:_.bottom;else{let ie=n.viewState.lineBlockAt(i);h==null&&(h=Math.min(A.right-A.left,n.defaultCharacterWidth*(i-ie.from))),C=(l<0?ie.top:ie.bottom)+B}let q=A.left+h,Y=r??n.viewState.heightOracle.textHeight>>1;for(let ie=0;;ie+=10){let me=C+(Y+ie)*l,_e=DF(n,{x:q,y:me},!1,l);if(meA.bottom||(l<0?_ei)){let $e=n.docView.coordsForChar(_e),Qe=!$e||me<$e.top?-1:1;return gt.cursor(_e,Qe,void 0,h)}}}function Pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(l,h,C)=>{if(e>l&&ei(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:gt.cursor(r,rl)&&this.lineBreak(),i=h}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,h=1,C;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,r),h=this.lineSeparator.length):(C=i.exec(t))&&(l=C.index,h=C[0].length),this.append(t.slice(r,l<0?t.length:l)),l<0)break;if(this.lineBreak(),h>1)for(let A of this.points)A.node==e&&A.pos>this.text.length&&(A.pos-=h-1);r=l+h}}readNode(e){if(e.cmIgnore)return;let t=Pr.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(AV(e,r.node,r.offset)?t:0))}}function AV(n,e,t){for(;;){if(!e||t<$s(e))return!1;if(e==n)return!0;t=oa(e)+1,e=e.parentNode}}class v2{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class PV{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:h}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let C=l||h?[]:IV(e),A=new kV(C,e.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=RV(C,this.bounds.from)}else{let C=e.observer.selectionRange,A=l&&l.node==C.focusNode&&l.offset==C.focusOffset||!Bv(e.contentDOM,C.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(C.focusNode,C.focusOffset),_=h&&h.node==C.anchorNode&&h.offset==C.anchorOffset||!Bv(e.contentDOM,C.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(C.anchorNode,C.anchorOffset),B=e.viewport;if((Qt.ios||Qt.chrome)&&e.state.selection.main.empty&&A!=_&&(B.from>0||B.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:h,to:C}=e.bounds,A=i.from,_=null;(l===8||Qt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:(Qt.mac||Qt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}):Qt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&n.lineWrapping&&(r&&(r=gt.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Or.of([" "])}),t)return Xx(n,t,r,l);if(r&&!r.main.eq(i)){let h=!1,C="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(h=!0),C=n.inputState.lastSelectionOrigin),n.dispatch({selection:r,scrollIntoView:h,userEvent:C}),!0}else return!1}function Xx(n,e,t,r=-1){if(Qt.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ra(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Ra(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ra(n.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let h,C=()=>h||(h=TV(n,e,t));return n.state.facet(bF).some(A=>A(n,e.from,e.to,l,C))||n.dispatch(C()),!0}function TV(n,e,t){let r,i=n.state,l=i.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let C=l.frome.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(n.state.toText(C+e.insert.sliceString(0,void 0,n.state.lineBreak)+A))}else{let C=i.changes(e),A=t&&t.main.to<=C.newLength?t.main:void 0;if(i.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let _=n.state.sliceDoc(e.from,e.to),B,q=t&&TF(n,t.main.head);if(q){let me=e.insert.length-(e.to-e.from);B={from:q.from,to:q.to-me}}else B=n.state.doc.lineAt(l.head);let Y=l.to-e.to,ie=l.to-l.from;r=i.changeByRange(me=>{if(me.from==l.from&&me.to==l.to)return{changes:C,range:A||me.map(C)};let _e=me.to-Y,$e=_e-_.length;if(me.to-me.from!=ie||n.state.sliceDoc($e,_e)!=_||me.to>=B.from&&me.from<=B.to)return{range:me};let Qe=i.changes({from:$e,to:_e,insert:e.insert}),Je=me.to-l.to;return{changes:Qe,range:A?gt.range(Math.max(0,A.anchor+Je),Math.max(0,A.head+Je)):me.map(Qe)}})}else r={changes:C,selection:A&&i.selection.replaceRange(A)}}let h="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:h,scrollIntoView:!0})}function DV(n,e,t,r){let i=Math.min(n.length,e.length),l=0;for(;l0&&C>0&&n.charCodeAt(h-1)==e.charCodeAt(C-1);)h--,C--;if(r=="end"){let A=Math.max(0,l-Math.min(h,C));t-=h+A-l}if(h=h?l-t:0;l-=A,C=l+(C-h),h=l}else if(C=C?l-t:0;l-=A,h=l+(h-C),C=l}return{from:l,toA:h,toB:C}}function IV(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}=n.observer.selectionRange;return t&&(e.push(new v2(t,r)),(i!=t||l!=r)&&e.push(new v2(i,l))),e}function RV(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?gt.single(t+e,r+e):null}class FV{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Qt.safari&&e.contentDOM.addEventListener("input",()=>null),Qt.gecko&&XV(e.contentDOM.ownerDocument)}handleEvent(e){!qV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=_V(e),r=this.handlers,i=this.view.contentDOM;for(let l in t)if(l!="scroll"){let h=!t[l].handlers.length,C=r[l];C&&h!=!C.handlers.length&&(i.removeEventListener(l,this.handleEvent),C=null),C||i.addEventListener(l,this.handleEvent,{passive:h})}for(let l in r)l!="scroll"&&!t[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&FF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qt.android&&Qt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=RF.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BV.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Qt.safari&&!Qt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function x2(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Tn(t.state,i)}}}function _V(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec;if(i&&i.domEventHandlers)for(let l in i.domEventHandlers){let h=i.domEventHandlers[l];h&&t(l).handlers.push(x2(r.value,h))}if(i&&i.domEventObservers)for(let l in i.domEventObservers){let h=i.domEventObservers[l];h&&t(l).observers.push(x2(r.value,h))}}for(let r in ys)t(r).handlers.push(ys[r]);for(let r in ns)t(r).observers.push(ns[r]);return e}const RF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BV="dthko",FF=[16,17,18,20,91,92,224,225],iu=6;function au(n){return Math.max(0,n)*.7+8}function LV(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class NV{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=GU(e.contentDOM),this.atoms=e.state.facet(Zx).map(h=>h(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Sr.allowMultipleSelections)&&MV(e,t),this.dragging=jV(e,t)&&LF(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LV(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,l=0,h=this.view.win.innerWidth,C=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:h}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:C}=this.scrollParents.y.getBoundingClientRect());let A=PF(this.view);e.clientX-A.left<=i+iu?t=-au(i-e.clientX):e.clientX+A.right>=h-iu&&(t=au(e.clientX-h)),e.clientY-A.top<=l+iu?r=-au(l-e.clientY):e.clientY+A.bottom>=C-iu&&(r=au(e.clientY-C)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;rt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MV(n,e){let t=n.state.facet(dF);return t.length?t[0](e):Qt.mac?e.metaKey:e.ctrlKey}function $V(n,e){let t=n.state.facet(mF);return t.length?t[0](e):Qt.mac?!e.altKey:!e.ctrlKey}function jV(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Jo(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l=e.clientX&&h.top<=e.clientY&&h.bottom>=e.clientY)return!0}return!1}function qV(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Pr.get(t))&&r.ignoreEvent(e))return!1;return!0}const ys=Object.create(null),ns=Object.create(null),_F=Qt.ie&&Qt.ie_version<15||Qt.ios&&Qt.webkit_version<604;function QV(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),BF(n,t.value)},50)}function Sc(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function BF(n,e){e=Sc(n.state,Wx,e);let{state:t}=n,r,i=1,l=t.toText(e),h=l.lines==t.selection.ranges.length;if(Xv!=null&&t.selection.ranges.every(A=>A.empty)&&Xv==l.toString()){let A=-1;r=t.changeByRange(_=>{let B=t.doc.lineAt(_.from);if(B.from==A)return{range:_};A=B.from;let q=t.toText((h?l.line(i++).text:e)+t.lineBreak);return{changes:{from:B.from,insert:q},range:gt.cursor(_.from+q.length)}})}else h?r=t.changeByRange(A=>{let _=l.line(i++);return{changes:{from:A.from,to:A.to,insert:_.text},range:gt.cursor(A.from+_.length)}}):r=t.replaceSelection(l);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ys.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ys.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(gF))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=WV(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new NV(n,e,t,r)),r&&n.observer.ignore(()=>{XR(n.contentDOM);let l=n.root.activeElement;l&&!l.contains(n.contentDOM)&&l.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function O2(n,e,t,r){if(r==1)return gt.cursor(e,t);if(r==2)return bV(n.state,e,t);{let i=Zr.find(n.docView,e),l=n.state.doc.lineAt(i?i.posAtEnd:e),h=i?i.posAtStart:l.from,C=i?i.posAtEnd:l.to;return Ce>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function UV(n,e,t,r){let i=Zr.find(n.docView,e);if(!i)return 1;let l=e-i.posAtStart;if(l==0)return 1;if(l==i.length)return-1;let h=i.coordsAt(l,-1);if(h&&S2(t,r,h))return-1;let C=i.coordsAt(l,1);return C&&S2(t,r,C)?1:h&&h.bottom>=r?-1:1}function E2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:UV(n,t,e.clientX,e.clientY)}}const VV=Qt.ie&&Qt.ie_version<=11;let C2=null,w2=0,k2=0;function LF(n){if(!VV)return n.detail;let e=C2,t=k2;return C2=n,k2=Date.now(),w2=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(w2+1)%3:1}function WV(n,e){let t=E2(n,e),r=LF(e),i=n.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),i=i.map(l.changes))},get(l,h,C){let A=E2(n,l),_,B=O2(n,A.pos,A.bias,r);if(t.pos!=A.pos&&!h){let q=O2(n,t.pos,t.bias,r),Y=Math.min(q.from,B.from),ie=Math.max(q.to,B.to);B=Y1&&(_=GV(i,A.pos))?_:C?i.addRange(B):gt.create([B])}}}function GV(n,e){for(let t=0;t=e)return gt.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ys.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.nearest(e.target);if(i&&i.isWidget){let l=i.posAtStart,h=l+i.length;(l>=t.to||h<=t.from)&&(t=gt.range(l,h))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Sc(n.state,Gx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ys.dragend=n=>(n.inputState.draggedContent=null,!1);function A2(n,e,t,r){if(t=Sc(n.state,Wx,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=n.inputState,h=r&&l&&$V(n,e)?{from:l.from,to:l.to}:null,C={from:i,insert:t},A=n.state.changes(h?[h,C]:C);n.focus(),n.dispatch({changes:A,selection:{anchor:A.mapPos(i,-1),head:A.mapPos(i,1)},userEvent:h?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ys.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,l=()=>{++i==t.length&&A2(n,e,r.filter(h=>h!=null).join(n.state.lineBreak),!1)};for(let h=0;h{/[\x00-\x08\x0e-\x1f]{2}/.test(C.result)||(r[h]=C.result),l()},C.readAsText(t[h])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return A2(n,e,r,!0),!0}return!1};ys.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=_F?null:e.clipboardData;return t?(BF(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(QV(n),!1)};function zV(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function ZV(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:l}of n.selection.ranges){let h=n.doc.lineAt(l);h.number>i&&(e.push(h.text),t.push({from:h.from,to:Math.min(n.doc.length,h.to+1)})),i=h.number}r=!0}return{text:Sc(n,Gx,e.join(n.lineBreak)),ranges:t,linewise:r}}let Xv=null;ys.copy=ys.cut=(n,e)=>{let{text:t,ranges:r,linewise:i}=ZV(n.state);if(!t&&!i)return!1;Xv=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=_F?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(zV(n,t),!1)};const NF=ni.define();function MF(n,e){let t=[];for(let r of n.facet(vF)){let i=r(n,e);i&&t.push(i)}return t?n.update({effects:t,annotations:NF.of(!0)}):null}function $F(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=MF(n.state,e);t?n.dispatch(t):n.update([])}},10)}ns.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),$F(n)};ns.blur=n=>{n.observer.clearSelectionRange(),$F(n)};ns.compositionstart=ns.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ns.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qt.chrome&&Qt.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ns.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ys.beforeinput=(n,e)=>{var t,r;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),h=e.getTargetRanges();if(l&&h.length){let C=h[0],A=n.posAtDOM(C.startContainer,C.startOffset),_=n.posAtDOM(C.endContainer,C.endOffset);return Xx(n,{from:A,to:_,insert:n.state.toText(l)},null),!0}}let i;if(Qt.chrome&&Qt.android&&(i=RF.find(l=>l.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>l+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qt.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qt.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ns.compositionend(n,e),20),!1};const P2=new Set;function XV(n){P2.has(n)||(P2.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const T2=["pre-wrap","normal","pre-line","break-spaces"];let za=!1;function D2(){za=!1}class YV{constructor(e){this.lineWrapping=e,this.doc=Or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return T2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r-1,A=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=C;if(this.lineWrapping=C,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=l,A){this.heightSamples={};for(let _=0;_0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Tu&&(za=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let l=this,h=r.doc;for(let C=i.length-1;C>=0;C--){let{fromA:A,toA:_,fromB:B,toB:q}=i[C],Y=l.lineAt(A,Ir.ByPosNoHeight,r.setDoc(t),0,0),ie=Y.to>=_?Y:l.lineAt(_,Ir.ByPosNoHeight,r,0,0);for(q+=ie.to-_,_=ie.to;C>0&&Y.from<=i[C-1].toA;)A=i[C-1].fromA,B=i[C-1].fromB,C--,Al*2){let C=e[t-1];C.break?e.splice(--t,1,C.left,null,C.right):e.splice(--t,1,C.left,C.right),r+=1+C.break,i-=C.size}else if(l>i*2){let C=e[r];C.break?e.splice(r,1,C.left,null,C.right):e.splice(r,1,C.left,C.right),r+=2+C.break,l-=C.size}else break;else if(i=l&&h(this.blockAt(0,r,i,l))}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Vn extends jF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,i){return new Rs(i,this.length,r,this.height,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Vn||i instanceof on&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof on?i=new Vn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class on extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,l=i-r+1,h,C=0;if(e.lineWrapping){let A=Math.min(this.height,e.lineHeight*l);h=A/l,this.length>l+1&&(C=(this.height-A)/(this.length-l-1))}else h=this.height/l;return{firstLine:r,lastLine:i,perLine:h,perChar:C}}blockAt(e,t,r,i){let{firstLine:l,lastLine:h,perLine:C,perChar:A}=this.heightMetrics(t,i);if(t.lineWrapping){let _=i+(e0){let l=r[r.length-1];l instanceof on?r[r.length-1]=new on(l.length+i):r.push(null,new on(i-1))}if(e>0){let l=r[0];l instanceof on?r[0]=new on(e+l.length):r.unshift(new on(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new on(e-1),null)}decomposeRight(e,t){t.push(null,new on(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let l=t+this.length;if(i&&i.from<=t+this.length&&i.more){let h=[],C=Math.max(t,i.from),A=-1;for(i.from>t&&h.push(new on(i.from-t-1).updateHeight(e,t));C<=l&&i.more;){let B=e.doc.lineAt(C).length;h.length&&h.push(null);let q=i.heights[i.index++];A==-1?A=q:Math.abs(q-A)>=Tu&&(A=-2);let Y=new Vn(B,q);Y.outdated=!1,h.push(Y),C+=B+1}C<=l&&h.push(null,new on(l-C).updateHeight(e,C));let _=In.of(h);return(A<0||Math.abs(_.height-this.height)>=Tu||Math.abs(A-this.heightMetrics(e,t).perLine)>=Tu)&&(za=!0),Wu(this,_)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class KV extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let l=r+this.left.height;return eC))return _;let B=t==Ir.ByPosNoHeight?Ir.ByPosNoHeight:Ir.ByPos;return A?_.join(this.right.lineAt(C,B,r,h,C)):this.left.lineAt(C,B,r,i,l).join(_)}forEachLine(e,t,r,i,l,h){let C=i+this.left.height,A=l+this.left.length+this.break;if(this.break)e=A&&this.right.forEachLine(e,t,r,C,A,h);else{let _=this.lineAt(A,Ir.ByPos,r,i,l);e<_.from&&this.left.forEachLine(e,_.from-1,r,i,l,h),_.to>=e&&_.from<=t&&h(_),t>_.to&&this.right.forEachLine(_.to+1,t,r,C,A,h)}}replace(e,t,r){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let h=l.length;for(let C of r)l.push(C);if(e>0&&I2(l,h-1),t=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=Wu(this.left,e),this.right=Wu(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:l,right:h}=this,C=t+l.length+this.break,A=null;return i&&i.from<=t+l.length&&i.more?A=l=l.updateHeight(e,t,r,i):l.updateHeight(e,t,r),i&&i.from<=C+h.length&&i.more?A=h=h.updateHeight(e,C,r,i):h.updateHeight(e,C,r),A?this.balanced(l,h):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I2(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof on&&(r=n[e+1])instanceof on&&n.splice(e-1,3,new on(t.length+1+r.length))}const JV=5;class Yx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Vn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Vn(r-this.pos,-1)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e=JV)&&this.addLineDeco(i,l,h)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Vn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new on(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vn)return e;let t=new Vn(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vn)&&!this.isCovered?this.nodes.push(new Vn(0,-1)):(this.writtenToB.clientHeight||B.scrollWidth>B.clientWidth)&&q.overflow!="visible"){let Y=B.getBoundingClientRect();l=Math.max(l,Y.left),h=Math.min(h,Y.right),C=Math.max(C,Y.top),A=Math.min(_==n.parentNode?i.innerHeight:A,Y.bottom)}_=q.position=="absolute"||q.position=="fixed"?B.offsetParent:B.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:l-t.left,right:Math.max(l,h)-t.left,top:C-(t.top+e),bottom:Math.max(C,A)-(t.top+e)}}function n7(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gb{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new YV(t),this.stateDeco=e.facet(tl).filter(r=>typeof r!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle.setDoc(e.doc),[new ts(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ht.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:l,to:h})=>i>=l&&i<=h)){let{from:l,to:h}=this.lineBlockAt(i);e.push(new ou(l,h))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?F2:new Hx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(jo(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(tl).filter(B=>typeof B!="function");let i=e.changedRanges,l=ts.extendWithRanges(i,e7(r,this.stateDeco,e?e.changes:tn.empty(this.state.doc.length))),h=this.heightMap.height,C=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);D2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||za)&&(e.flags|=2),C?(this.scrollAnchorPos=e.changes.mapPos(C.from,-1),this.scrollAnchorHeight=C.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let A=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headA.to)||!this.viewportIsAppropriate(A))&&(A=this.getViewport(0,t));let _=A.from!=this.viewport.from||A.to!=this.viewport.to;this.viewport=A,e.flags|=this.updateForViewport(),(_||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(OF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Rr.RTL:Rr.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),C=t.getBoundingClientRect(),A=h||this.mustMeasureContent||this.contentDOMHeight!=C.height;this.contentDOMHeight=C.height,this.mustMeasureContent=!1;let _=0,B=0;if(C.width&&C.height){let{scaleX:yt,scaleY:ft}=ZR(t,C);(yt>.005&&Math.abs(this.scaleX-yt)>.005||ft>.005&&Math.abs(this.scaleY-ft)>.005)&&(this.scaleX=yt,this.scaleY=ft,_|=8,h=A=!0)}let q=(parseInt(r.paddingTop)||0)*this.scaleY,Y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=q||this.paddingBottom!=Y)&&(this.paddingTop=q,this.paddingBottom=Y,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(A=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let ie=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=ie&&(this.scrollAnchorHeight=-1,this.scrollTop=ie),this.scrolledToBottom=HR(e.scrollDOM);let me=(this.printing?n7:r7)(t,this.paddingTop),_e=me.top-this.pixelViewport.top,$e=me.bottom-this.pixelViewport.bottom;this.pixelViewport=me;let Qe=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Qe!=this.inView&&(this.inView=Qe,Qe&&(A=!0)),!this.inView&&!this.scrollTarget)return 0;let Je=C.width;if((this.contentDOMWidth!=Je||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=C.width,this.editorHeight=e.scrollDOM.clientHeight,_|=8),A){let yt=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(yt)&&(h=!0),h||i.lineWrapping&&Math.abs(Je-this.contentDOMWidth)>i.charWidth){let{lineHeight:ft,charWidth:ot,textHeight:Ye}=e.docView.measureTextSize();h=ft>0&&i.refresh(l,ft,ot,Ye,Je/ot,yt),h&&(e.docView.minWidth=0,_|=8)}_e>0&&$e>0?B=Math.max(_e,$e):_e<0&&$e<0&&(B=Math.min(_e,$e)),D2();for(let ft of this.viewports){let ot=ft.from==this.viewport.from?yt:e.docView.measureVisibleLineHeights(ft);this.heightMap=(h?In.empty().applyChanges(this.stateDeco,Or.empty,this.heightOracle,[new ts(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,h,new HV(ft.from,ot))}za&&(_|=2)}let ct=!this.viewportIsAppropriate(this.viewport,B)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return ct&&(_&2&&(_|=this.updateScaler()),this.viewport=this.getViewport(B,this.scrollTarget),_|=this.updateForViewport()),(_&2||ct)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,e)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:h,visibleBottom:C}=this,A=new ou(i.lineAt(h-r*1e3,Ir.ByHeight,l,0,0).from,i.lineAt(C+(1-r)*1e3,Ir.ByHeight,l,0,0).to);if(t){let{head:_}=t.range;if(_A.to){let B=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),q=i.lineAt(_,Ir.ByPos,l,0,0),Y;t.y=="center"?Y=(q.top+q.bottom)/2-B/2:t.y=="start"||t.y=="nearest"&&_=C+Math.max(10,Math.min(r,250)))&&i>h-2*1e3&&l>1,h=i<<1;if(this.defaultTextDirection!=Rr.LTR&&!r)return[];let C=[],A=(B,q,Y,ie)=>{if(q-BB&&QeQe.from>=Y.from&&Qe.to<=Y.to&&Math.abs(Qe.from-B)Qe.fromJe));if(!$e){if(qct.from<=q&&ct.to>=q)){let ct=t.moveToLineBoundary(gt.cursor(q),!1,!0).head;ct>B&&(q=ct)}let Qe=this.gapSize(Y,B,q,ie),Je=r||Qe<2e6?Qe:2e6;$e=new Gb(B,q,Qe,Je)}C.push($e)},_=B=>{if(B.length2e6)for(let ot of e)ot.from>=B.from&&ot.fromB.from&&A(B.from,ie,B,q),met.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];gr.spans(e,this.viewport.from,this.viewport.to,{span(i,l){t.push({from:i,to:l})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,l)=>i.from!=t[l].from||i.to!=t[l].to);return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||jo(this.heightMap.lineAt(e,Ir.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||jo(this.heightMap.lineAt(this.scaler.fromDOM(e),Ir.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return jo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ou{constructor(e,t){this.from=e,this.to=t}}function i7(n,e,t){let r=[],i=n,l=0;return gr.spans(t,n,e,{span(){},point(h,C){h>i&&(r.push({from:i,to:h}),l+=h-i),i=C}},20),i=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:l,to:h}=e[i],C=h-l;if(r<=C)return l+r;r-=C}}function uu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function a7(n,e){for(let t of n)if(e(t))return t}const F2={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Hx{constructor(e,t,r){let i=0,l=0,h=0;this.viewports=r.map(({from:C,to:A})=>{let _=t.lineAt(C,Ir.ByPos,e,0,0).top,B=t.lineAt(A,Ir.ByPos,e,0,0).bottom;return i+=B-_,{from:C,to:A,top:_,bottom:B,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let C of this.viewports)C.domTop=h+(C.top-l)*this.scale,h=C.domBottom=C.domTop+(C.bottom-C.top),l=C.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let l=tt.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function jo(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rs(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>jo(i,e)):n._content)}const cu=$t.define({combine:n=>n.join(" ")}),Yv=$t.define({combine:n=>n.indexOf(!0)>-1}),Hv=Ai.newName(),qF=Ai.newName(),QF=Ai.newName(),UF={"&light":"."+qF,"&dark":"."+QF};function Kv(n,e,t){return new Ai(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const o7=Kv("."+Hv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},UF),l7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zb=Qt.ie&&Qt.ie_version<=11;class u7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zU,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Qt.ie&&Qt.ie_version<=11||Qt.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Qt.chrome&&Qt.chrome_version<126)&&(this.editContext=new f7(e),e.state.facet(yi)&&(e.contentDOM.editContext=this.editContext.editContext)),zb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(yi)?r.root.activeElement!=this.dom:!Au(this.dom,i))return;let l=i.anchorNode&&r.docView.nearest(i.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qt.ie&&Qt.ie_version<=11||Qt.android&&Qt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Go(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jo(e.root);if(!t)return!1;let r=Qt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&c7(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Au(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ra(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let l of e){let h=this.readMutation(l);h&&(h.typeOver&&(i=!0),t==-1?{from:t,to:r}=h:(t=Math.min(h.from,t),r=Math.max(h.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Au(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new PV(this.view,e,t,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=IF(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let r=_2(t,e.previousSibling||e.target.previousSibling,-1),i=_2(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(yi)!=e.state.facet(yi)&&(e.view.contentDOM.editContext=e.state.facet(yi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _2(n,e,t){for(;e;){let r=Pr.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function B2(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,h=n.docView.domAtPos(n.state.selection.main.anchor);return Go(h.node,h.offset,i,l)&&([t,r,i,l]=[i,l,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:l}}function c7(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return B2(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?B2(n,t):null}class f7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,l={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Or.of(r.text.split(` +`))};l.from==this.from&&ithis.to&&(l.to=i),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||Xx(e,l,gt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let h=this.toEditorPos(r.rangeStart),C=this.toEditorPos(r.rangeEnd);h{let i=[];for(let l of r.getTextFormats()){let h=l.underlineStyle,C=l.underlineThickness;if(h!="None"&&C!="None"){let A=`text-decoration: underline ${h=="Dashed"?"dashed ":h=="Squiggle"?"wavy ":""}${C=="Thin"?1:2}px`;i.push(Ht.mark({attributes:{style:A}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:EF.of(Ht.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Jo(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,h,C,A,_)=>{if(r)return;let B=_.length-(h-l);if(i&&h>=i.to)if(i.from==l&&i.to==h&&i.insert.eq(_)){i=this.pendingContextChange=null,t+=B,this.to+=B;return}else i=null,this.revertPending(e.state);if(l+=t,h+=t,h<=this.from)this.from+=B,this.to+=B;else if(lthis.to||this.to-this.from+_.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(h),_.toString()),this.to+=B}t+=B}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Mt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZU(e.parent)||document,this.viewState=new R2(e.state||Sr.create(e)),e.scrollTo&&e.scrollTo.is(su)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(No).map(i=>new Ub(i));for(let i of this.plugins)i.update(this);this.observer=new u7(this),this.inputState=new FV(this),this.inputState.ensureHandlers(this.plugins),this.docView=new h2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Xr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,l=this.state;for(let Y of e){if(Y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=Y.state}if(this.destroyed){this.viewState.state=l;return}let h=this.hasFocus,C=0,A=null;e.some(Y=>Y.annotation(NF))?(this.inputState.notifiedFocused=h,C=1):h!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=h,A=MF(l,h),A||(C=1));let _=this.observer.delayedAndroidKey,B=null;if(_?(this.observer.clearDelayedAndroidKey(),B=this.observer.readChange(),(B&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(B=null)):this.observer.clear(),l.facet(Sr.phrases)!=this.state.facet(Sr.phrases))return this.setState(l);i=Vu.create(this,l,e),i.flags|=C;let q=this.viewState.scrollTarget;try{this.updateState=2;for(let Y of e){if(q&&(q=q.map(Y.changes)),Y.scrollIntoView){let{main:ie}=Y.state.selection;q=new Fa(ie.empty?ie:gt.cursor(ie.head,ie.head>ie.anchor?-1:1))}for(let ie of Y.effects)ie.is(su)&&(q=ie.value.clip(this.state))}this.viewState.update(i,q),this.bidiCache=Gu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Mo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(Y=>Y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(cu)!=i.state.facet(cu)&&(this.viewState.mustMeasureContent=!0),(t||r||q||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let Y of this.state.facet(Gv))try{Y(i)}catch(ie){Tn(this.state,ie,"update listener")}(A||B)&&Promise.resolve().then(()=>{A&&this.state==A.startState&&this.dispatch(A),B&&!IF(this,B)&&_.force&&Ra(this.contentDOM,_.key,_.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new R2(e),this.plugins=e.facet(No).map(r=>new Ub(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new h2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(No),r=e.state.facet(No);if(t!=r){let i=[];for(let l of r){let h=t.indexOf(l);if(h<0)i.push(new Ub(l));else{let C=this.plugins[h];C.mustUpdate=e,i.push(C)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:h}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(h=-1),this.viewState.scrollAnchorHeight=-1;try{for(let C=0;;C++){if(h<0)if(HR(r))l=-1,h=this.viewState.heightMap.height;else{let ie=this.viewState.scrollAnchorAt(i);l=ie.from,h=ie.top}this.updateState=1;let A=this.viewState.measure(this);if(!A&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(C>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let _=[];A&4||([this.measureRequests,_]=[_,this.measureRequests]);let B=_.map(ie=>{try{return ie.read(this)}catch(me){return Tn(this.state,me),L2}}),q=Vu.create(this,this.state,[]),Y=!1;q.flags|=A,t?t.flags|=A:t=q,this.updateState=2,q.empty||(this.updatePlugins(q),this.inputState.update(q),this.updateAttrs(),Y=this.docView.update(q),Y&&this.docViewUpdate());for(let ie=0;ie<_.length;ie++)if(B[ie]!=L2)try{let me=_[ie];me.write&&me.write(B[ie],this)}catch(me){Tn(this.state,me)}if(Y&&this.docView.updateSelection(!0),!q.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,h=-1;continue}else{let me=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-h;if(me>1||me<-1){i=i+me,r.scrollTop=i/this.scaleY,h=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let C of this.state.facet(Gv))C(t)}get themeClasses(){return Hv+" "+(this.state.facet(Yv)?QF:qF)+" "+this.state.facet(cu)}updateAttrs(){let e=N2(this,CF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(yi)?"true":"false",class:"cm-content",style:`${Qt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),N2(this,zx,t);let r=this.observer.ignore(()=>{let i=jv(this.contentDOM,this.contentAttrs,t),l=jv(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Mt.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Mo);let e=this.state.facet(Mt.cspNonce);Ai.mount(this.root,this.styleModules.concat(o7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tr.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wb(this,e,b2(this,e,t,r))}moveByGroup(e,t){return Wb(this,e,b2(this,e,t,r=>CV(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[t?r.length-1:0];return gt.cursor(l.side(t,i)+e.from,l.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return EV(this,e,t,r)}moveVertically(e,t,r){return Wb(this,e,wV(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),DF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),h=l[Oi.find(l,e-i.from,-1,t)];return xc(r,h.dir==Rr.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(xF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p7)return pF(e.length);let t=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||fF(l.isolates,r=p2(this,e))))return l.order;r||(r=p2(this,e));let i=oV(e.text,t,r);return this.bidiCache.push(new Gu(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{XR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return su.of(new Fa(typeof e=="number"?gt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return su.of(new Fa(gt.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ur.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ur.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Ai.newName(),i=[cu.of(r),Mo.of(Kv(`.${r}`,e))];return t&&t.dark&&i.push(Yv.of(!0)),i}static baseTheme(e){return _i.lowest(Mo.of(Kv("."+Hv,e,UF)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Pr.get(r)||Pr.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}Mt.styleModule=Mo;Mt.inputHandler=bF;Mt.clipboardInputFilter=Wx;Mt.clipboardOutputFilter=Gx;Mt.scrollHandler=SF;Mt.focusChangeEffect=vF;Mt.perLineTextDirection=xF;Mt.exceptionSink=yF;Mt.updateListener=Gv;Mt.editable=yi;Mt.mouseSelectionStyle=gF;Mt.dragMovesSelection=mF;Mt.clickAddsSelectionRange=dF;Mt.decorations=tl;Mt.outerDecorations=wF;Mt.atomicRanges=Zx;Mt.bidiIsolatedRanges=kF;Mt.scrollMargins=AF;Mt.darkTheme=Yv;Mt.cspNonce=$t.define({combine:n=>n.length?n[0]:""});Mt.contentAttributes=zx;Mt.editorAttributes=CF;Mt.lineWrapping=Mt.contentAttributes.of({class:"cm-lineWrapping"});Mt.announce=sr.define();const p7=4096,L2={};class Gu{constructor(e,t,r,i,l,h){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=l,this.order=h}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Rr.LTR;for(let l=Math.max(0,e.length-10);l=0;i--){let l=r[i],h=typeof l=="function"?l(n):l;h&&$v(h,t)}return t}const h7=Qt.mac?"mac":Qt.windows?"win":Qt.linux?"linux":"key";function d7(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,l,h,C;for(let A=0;Ar.concat(i),[]))),t}function g7(n,e,t){return WF(VF(n.state),e,n,t)}let bi=null;const y7=4e3;function b7(n,e=h7){let t=Object.create(null),r=Object.create(null),i=(h,C)=>{let A=r[h];if(A==null)r[h]=C;else if(A!=C)throw new Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},l=(h,C,A,_,B)=>{var q,Y;let ie=t[h]||(t[h]=Object.create(null)),me=C.split(/ (?!$)/).map(Qe=>d7(Qe,e));for(let Qe=1;Qe{let yt=bi={view:ct,prefix:Je,scope:h};return setTimeout(()=>{bi==yt&&(bi=null)},y7),!0}]})}let _e=me.join(" ");i(_e,!1);let $e=ie[_e]||(ie[_e]={preventDefault:!1,stopPropagation:!1,run:((Y=(q=ie._any)===null||q===void 0?void 0:q.run)===null||Y===void 0?void 0:Y.slice())||[]});A&&$e.run.push(A),_&&($e.preventDefault=!0),B&&($e.stopPropagation=!0)};for(let h of n){let C=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let _ of C){let B=t[_]||(t[_]=Object.create(null));B._any||(B._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:q}=h;for(let Y in B)B[Y].run.push(ie=>q(ie,Jv))}let A=h[e]||h.key;if(A)for(let _ of C)l(_,A,h.run,h.preventDefault,h.stopPropagation),h.shift&&l(_,"Shift-"+A,h.shift,h.preventDefault,h.stopPropagation)}return t}let Jv=null;function WF(n,e,t,r){Jv=e;let i=UU(e),l=ln(i,0),h=Kn(l)==i.length&&i!=" ",C="",A=!1,_=!1,B=!1;bi&&bi.view==t&&bi.scope==r&&(C=bi.prefix+" ",FF.indexOf(e.keyCode)<0&&(_=!0,bi=null));let q=new Set,Y=$e=>{if($e){for(let Qe of $e.run)if(!q.has(Qe)&&(q.add(Qe),Qe(t)))return $e.stopPropagation&&(B=!0),!0;$e.preventDefault&&($e.stopPropagation&&(B=!0),_=!0)}return!1},ie=n[r],me,_e;return ie&&(Y(ie[C+fu(i,e,!h)])?A=!0:h&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qt.windows&&e.ctrlKey&&e.altKey)&&(me=Pi[e.keyCode])&&me!=i?(Y(ie[C+fu(me,e,!0)])||e.shiftKey&&(_e=Ko[e.keyCode])!=i&&_e!=me&&Y(ie[C+fu(_e,e,!1)]))&&(A=!0):h&&e.shiftKey&&Y(ie[C+fu(i,e,!0)])&&(A=!0),!A&&Y(ie._any)&&(A=!0)),_&&(A=!0),A&&B&&e.stopPropagation(),Jv=null,A}class yl{constructor(e,t,r,i,l){this.className=e,this.left=t,this.top=r,this.width=i,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let l=GF(e);return[new yl(t,i.left-l.left,i.top-l.top,null,i.bottom-i.top)]}else return v7(e,t,r)}}function GF(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Rr.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $2(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let l=n.dom.getBoundingClientRect(),h=(i.top+i.bottom)/2,C=n.posAtCoords({x:l.left+1,y:h}),A=n.posAtCoords({x:l.right-1,y:h});return C==null||A==null?r:{from:Math.max(r.from,Math.min(C,A)),to:Math.min(r.to,Math.max(C,A))}}function v7(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),l=n.textDirection==Rr.LTR,h=n.contentDOM,C=h.getBoundingClientRect(),A=GF(n),_=h.querySelector(".cm-line"),B=_&&window.getComputedStyle(_),q=C.left+(B?parseInt(B.paddingLeft)+Math.min(0,parseInt(B.textIndent)):0),Y=C.right-(B?parseInt(B.paddingRight):0),ie=Zv(n,r),me=Zv(n,i),_e=ie.type==Dn.Text?ie:null,$e=me.type==Dn.Text?me:null;if(_e&&(n.lineWrapping||ie.widgetLineBreaks)&&(_e=$2(n,r,1,_e)),$e&&(n.lineWrapping||me.widgetLineBreaks)&&($e=$2(n,i,-1,$e)),_e&&$e&&_e.from==$e.from&&_e.to==$e.to)return Je(ct(t.from,t.to,_e));{let ft=_e?ct(t.from,null,_e):yt(ie,!1),ot=$e?ct(null,t.to,$e):yt(me,!0),Ye=[];return(_e||ie).to<($e||me).from-(_e&&$e?1:0)||ie.widgetLineBreaks>1&&ft.bottom+n.defaultLineHeight/2At&&er.from=$r)break;Sn>yr&&Nt(Math.max(qr,yr),ft==null&&qr<=At,Math.min(Sn,$r),ot==null&&Sn>=Yt,On.dir)}if(yr=Vr.to+1,yr>=$r)break}return _t.length==0&&Nt(At,ft==null,Yt,ot==null,n.textDirection),{top:xt,bottom:It,horizontal:_t}}function yt(ft,ot){let Ye=C.top+(ot?ft.top:ft.bottom);return{top:Ye,bottom:Ye,horizontal:[]}}}function x7(n,e){return n.constructor==e.constructor&&n.eq(e)}class O7{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t!x7(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=$t.define();function zF(n){return[Ur.define(e=>new O7(e,n)),Du.of(n)]}const ZF=!Qt.ios,rl=$t.define({combine(n){return bs(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function S7(n={}){return[rl.of(n),E7,C7,w7,OF.of(!0)]}function XF(n){return n.startState.facet(rl)!=n.state.facet(rl)}const E7=zF({above:!0,markers(n){let{state:e}=n,t=e.facet(rl),r=[];for(let i of e.selection.ranges){let l=i==e.selection.main;if(i.empty?!l||ZF:t.drawRangeCursor){let h=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",C=i.empty?i:gt.cursor(i.head,i.head>i.anchor?-1:1);for(let A of yl.forRange(n,h,C))r.push(A)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=XF(n);return t&&j2(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){j2(e.state,n)},class:"cm-cursorLayer"});function j2(n,e){e.style.animationDuration=n.facet(rl).cursorBlinkRate+"ms"}const C7=zF({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:yl.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||XF(n)},class:"cm-selectionLayer"}),ex={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};ZF&&(ex[".cm-line"].caretColor=ex[".cm-content"].caretColor="transparent !important");const w7=_i.highest(Mt.theme(ex)),YF=sr.define({map(n,e){return n==null?null:e.mapPos(n)}}),qo=Hr.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(YF)?r.value:t,n)}}),k7=Ur.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(qo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(qo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(qo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(qo)!=n&&this.view.dispatch({effects:YF.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function A7(){return[qo,k7]}function q2(n,e,t,r,i){e.lastIndex=0;for(let l=n.iterRange(t,r),h=t,C;!l.next().done;h+=l.value.length)if(!l.lineBreak)for(;C=e.exec(l.value);)i(h+C.index,C)}function P7(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:l}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),l=Math.min(n.state.doc.lineAt(l).to,l+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=l:r.push({from:i,to:l});return r}class T7{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:l,maxLength:h=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(C,A,_,B)=>i(B,_,_+C[0].length,C,A);else if(typeof r=="function")this.addMatch=(C,A,_,B)=>{let q=r(C,A,_);q&&B(_,_+C[0].length,q)};else if(r)this.addMatch=(C,A,_,B)=>B(_,_+C[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=h}createDeco(e){let t=new ki,r=t.add.bind(t);for(let{from:i,to:l}of P7(e,this.maxLength))q2(e.state.doc,this.regexp,i,l,(h,C)=>this.addMatch(C,e,h,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((l,h,C,A)=>{A>e.view.viewport.from&&C1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let l of e.visibleRanges){let h=Math.max(l.from,r),C=Math.min(l.to,i);if(C>h){let A=e.state.doc.lineAt(h),_=A.toA.from;h--)if(this.boundary.test(A.text[h-1-A.from])){B=h;break}for(;C<_.to;C++)if(this.boundary.test(_.text[C-_.from])){q=C;break}}let Y=[],ie,me=(_e,$e,Qe)=>Y.push(Qe.range(_e,$e));if(A==_)for(this.regexp.lastIndex=B-A.from;(ie=this.regexp.exec(A.text))&&ie.indexthis.addMatch($e,e,_e,me));t=t.update({filterFrom:B,filterTo:q,filter:(_e,$e)=>_eq,add:Y})}}return t}}const tx=/x/.unicode!=null?"gu":"g",D7=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,tx),I7={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Zb=null;function R7(){var n;if(Zb==null&&typeof document<"u"&&document.body){let e=document.body.style;Zb=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Zb||!1}const Iu=$t.define({combine(n){let e=bs(n,{render:null,specialChars:D7,addSpecialChars:null});return(e.replaceTabs=!R7())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tx)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tx)),e}});function F7(n={}){return[Iu.of(n),_7()]}let Q2=null;function _7(){return Q2||(Q2=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=Ht.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Iu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new T7({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,l=ln(e[0],0);if(l==9){let h=i.lineAt(r),C=t.state.tabSize,A=ro(h.text,C,r-h.from);return Ht.replace({widget:new M7((C-A%C)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Ht.replace({widget:new N7(n,l)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Iu);n.startState.facet(Iu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const B7="•";function L7(n){return n>=32?B7:n==10?"␤":String.fromCharCode(9216+n)}class N7 extends si{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=L7(this.code),r=e.state.phrase("Control character")+" "+(I7[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let l=document.createElement("span");return l.textContent=t,l.title=r,l.setAttribute("aria-label",r),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class M7 extends si{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $7(){return q7}const j7=Ht.line({class:"cm-activeLine"}),q7=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(j7.range(i.from)),e=i.from)}return Ht.set(t)}},{decorations:n=>n.decorations}),rx=2e3;function Q7(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),l=[];if(e.off>rx||t.off>rx||e.col<0||t.col<0){let h=Math.min(e.off,t.off),C=Math.max(e.off,t.off);for(let A=r;A<=i;A++){let _=n.doc.line(A);_.length<=C&&l.push(gt.range(_.from+h,_.to+C))}}else{let h=Math.min(e.col,t.col),C=Math.max(e.col,t.col);for(let A=r;A<=i;A++){let _=n.doc.line(A),B=Rv(_.text,h,n.tabSize,!0);if(B<0)l.push(gt.cursor(_.to));else{let q=Rv(_.text,C,n.tabSize);l.push(gt.range(_.from+B,_.from+q))}}}return l}function U7(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function U2(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,l=i>rx?-1:i==r.length?U7(n,e.clientX):ro(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:l,off:i}}function V7(n,e){let t=U2(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let l=i.changes.mapPos(i.startState.doc.line(t.line).from),h=i.state.doc.lineAt(l);t={line:h.number,col:t.col,off:Math.min(t.off,h.length)},r=r.map(i.changes)}},get(i,l,h){let C=U2(n,i);if(!C)return r;let A=Q7(n.state,t,C);return A.length?h?gt.create(A.concat(r.ranges)):gt.create(A):r}}:null}function W7(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return Mt.mouseSelectionStyle.of((t,r)=>e(r)?V7(t,r):null)}const G7={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},z7={style:"cursor: crosshair"};function Z7(n={}){let[e,t]=G7[n.key||"Alt"],r=Ur.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,Mt.contentAttributes.of(i=>{var l;return!((l=i.plugin(r))===null||l===void 0)&&l.isDown?z7:null})]}const Io="-10000px";class HF{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(h=>h);let l=null;this.tooltipViews=this.tooltips.map(h=>l=r(h,l))}update(e,t){var r;let i=e.state.facet(this.facet),l=i.filter(A=>A);if(i===this.input){for(let A of this.tooltipViews)A.update&&A.update(e);return!1}let h=[],C=t?[]:null;for(let A=0;At[_]=A),t.length=C.length),this.input=i,this.tooltips=l,this.tooltipViews=h,!0}}function X7(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xb=$t.define({combine:n=>{var e,t,r;return{position:Qt.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||X7}}}),V2=new WeakMap,Kx=Ur.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Xb);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new HF(n,Ec,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Xb);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Io,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Qt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Io&&i.style.left=="0px"){let l=i.getBoundingClientRect();r=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((i,l)=>{let h=this.manager.tooltipViews[l];return h.getCoords?h.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(Xb).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let C of this.manager.tooltipViews)C.dom.style.position="absolute"}let{editor:t,space:r,scaleX:i,scaleY:l}=n,h=[];for(let C=0;C=Math.min(t.bottom,r.bottom)||q.rightMath.min(t.right,r.right)+.1){B.style.top=Io;continue}let ie=A.arrow?_.dom.querySelector(".cm-tooltip-arrow"):null,me=ie?7:0,_e=Y.right-Y.left,$e=(e=V2.get(_))!==null&&e!==void 0?e:Y.bottom-Y.top,Qe=_.offset||H7,Je=this.view.textDirection==Rr.LTR,ct=Y.width>r.right-r.left?Je?r.left:r.right-Y.width:Je?Math.max(r.left,Math.min(q.left-(ie?14:0)+Qe.x,r.right-_e)):Math.min(Math.max(r.left,q.left-_e+(ie?14:0)-Qe.x),r.right-_e),yt=this.above[C];!A.strictSide&&(yt?q.top-(Y.bottom-Y.top)-Qe.yr.bottom)&&yt==r.bottom-q.bottom>q.top-r.top&&(yt=this.above[C]=!yt);let ft=(yt?q.top-r.top:r.bottom-q.bottom)-me;if(ft<$e&&_.resize!==!1){if(ftct&&xt.topot&&(ot=yt?xt.top-$e-2-me:xt.bottom+me+2);if(this.position=="absolute"?(B.style.top=(ot-n.parent.top)/l+"px",B.style.left=(ct-n.parent.left)/i+"px"):(B.style.top=ot/l+"px",B.style.left=ct/i+"px"),ie){let xt=q.left+(Je?Qe.x:-Qe.x)-(ct+14-7);ie.style.left=xt/i+"px"}_.overlap!==!0&&h.push({left:ct,top:ot,right:Ye,bottom:ot+$e}),B.classList.toggle("cm-tooltip-above",yt),B.classList.toggle("cm-tooltip-below",!yt),_.positioned&&_.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Io}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Y7=Mt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),H7={x:0,y:0},Ec=$t.define({enables:[Kx,Y7]}),zu=$t.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Cc{static create(e){return new Cc(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new HF(e,zu,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K7=Ec.compute([zu],n=>{let e=n.facet(zu);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Cc.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class J7{constructor(e,t,r,i,l){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eC.bottom||t.xC.right+e.defaultCharacterWidth)return;let A=e.bidiSpans(e.state.doc.lineAt(i)).find(B=>B.from<=i&&B.to>=i),_=A&&A.dir==Rr.RTL?-1:1;l=t.x{this.pending==C&&(this.pending=null,A&&!(Array.isArray(A)&&!A.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(A)?A:[A])}))},A=>Tn(e.state,A,"hover tooltip"))}else h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])})}get tooltip(){let e=this.view.plugin(Kx),t=e?e.manager.tooltips.findIndex(r=>r.create==Cc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:l}=this;if(i.length&&l&&!eW(l.dom,e)||this.pending){let{pos:h}=i[0]||this.pending,C=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:h;(h==C?this.view.posAtCoords(this.lastMove)!=h:!tW(this.view,h,C,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pu=4;function eW(n,e){let{left:t,right:r,top:i,bottom:l}=n.getBoundingClientRect(),h;if(h=n.querySelector(".cm-tooltip-arrow")){let C=h.getBoundingClientRect();i=Math.min(C.top,i),l=Math.max(C.bottom,l)}return e.clientX>=t-pu&&e.clientX<=r+pu&&e.clientY>=i-pu&&e.clientY<=l+pu}function tW(n,e,t,r,i,l){let h=n.scrollDOM.getBoundingClientRect(),C=n.documentTop+n.documentPadding.top+n.contentHeight;if(h.left>r||h.righti||Math.min(h.bottom,C)=e&&A<=t}function rW(n,e={}){let t=sr.define(),r=Hr.define({create(){return[]},update(i,l){if(i.length&&(e.hideOnChange&&(l.docChanged||l.selection)?i=[]:e.hideOn&&(i=i.filter(h=>!e.hideOn(l,h))),l.docChanged)){let h=[];for(let C of i){let A=l.changes.mapPos(C.pos,-1,cn.TrackDel);if(A!=null){let _=Object.assign(Object.create(null),C);_.pos=A,_.end!=null&&(_.end=l.changes.mapPos(_.end)),h.push(_)}}i=h}for(let h of l.effects)h.is(t)&&(i=h.value),h.is(nW)&&(i=[]);return i},provide:i=>zu.from(i)});return{active:r,extension:[r,Ur.define(i=>new J7(i,n,r,t,e.hoverTime||300)),K7]}}function KF(n,e){let t=n.plugin(Kx);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const nW=sr.define(),W2=$t.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function nl(n,e){let t=n.plugin(JF),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const JF=Ur.fromClass(class{constructor(n){this.input=n.state.facet(sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(W2);this.top=new hu(n,!0,e.topContainer),this.bottom=new hu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(W2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new hu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new hu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(sl);if(t!=this.input){let r=t.filter(A=>A),i=[],l=[],h=[],C=[];for(let A of r){let _=this.specs.indexOf(A),B;_<0?(B=A(n.view),C.push(B)):(B=this.panels[_],B.update&&B.update(n)),i.push(B),(B.top?l:h).push(B)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(h);for(let A of C)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class hu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=G2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=G2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function G2(n){let e=n.nextSibling;return n.remove(),e}const sl=$t.define({enables:JF});class js extends aa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}js.prototype.elementClass="";js.prototype.toDOM=void 0;js.prototype.mapMode=cn.TrackBefore;js.prototype.startSide=js.prototype.endSide=-1;js.prototype.point=!0;const Ru=$t.define(),sW=$t.define(),iW={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>gr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Zo=$t.define();function e_(n){return[t_(),Zo.of(Object.assign(Object.assign({},iW),n))]}const nx=$t.define({combine:n=>n.some(e=>e)});function t_(n){let e=[aW];return n&&n.fixed===!1&&e.push(nx.of(!0)),e}const aW=Ur.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Zo).map(e=>new Z2(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(nx),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(nx)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=gr.iter(this.view.state.facet(Ru),this.view.viewport.from),r=[],i=this.gutters.map(l=>new oW(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let h=!0;for(let C of l.type)if(C.type==Dn.Text&&h){sx(t,r,C.from);for(let A of i)A.line(this.view,C,r);h=!1}else if(C.widget)for(let A of i)A.widget(this.view,C)}else if(l.type==Dn.Text){sx(t,r,l.from);for(let h of i)h.line(this.view,l,r)}else if(l.widget)for(let h of i)h.widget(this.view,l);for(let l of i)l.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Zo),t=n.state.facet(Zo),r=n.docChanged||n.heightChanged||n.viewportChanged||!gr.eq(n.startState.facet(Ru),n.state.facet(Ru),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let l of t){let h=e.indexOf(l);h<0?i.push(new Z2(this.view,l)):(this.gutters[h].update(n),i.push(this.gutters[h]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Mt.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Rr.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function z2(n){return Array.isArray(n)?n:[n]}function sx(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oW{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=gr.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,l=(t.top-this.height)/e.scaleY,h=t.height/e.scaleY;if(this.i==i.elements.length){let C=new r_(e,h,l,r);i.elements.push(C),i.dom.appendChild(C.dom)}else i.elements[this.i].update(e,h,l,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];sx(this.cursor,i,t.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,t,i);l&&i.unshift(l);let h=this.gutter;i.length==0&&!h.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let l of e.state.facet(sW)){let h=l(e,t.widget,t);h&&(i||(i=[])).push(h)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Z2{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,h;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let A=l.getBoundingClientRect();h=(A.top+A.bottom)/2}else h=i.clientY;let C=e.lineBlockAtHeight(h-e.documentTop);t.domEventHandlers[r](e,C,i)&&i.preventDefault()});this.markers=z2(t.markers(e)),t.initialSpacer&&(this.spacer=new r_(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=z2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!gr.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class r_{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lW(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,h=0;;){let C=h,A=ll(C,A,_)||h(C,A,_):h}return r}})}});class Yb extends js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Hb(n,e){return n.state.facet(Aa).formatNumber(e,n.state)}const fW=Zo.compute([Aa],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(uW)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Yb(Hb(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cW)){let l=i(e,t,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Yb(Hb(e,X2(e.state.doc.lines)))},updateSpacer(e,t){let r=Hb(t.view,X2(t.view.state.doc.lines));return r==e.number?e:new Yb(r)},domEventHandlers:n.facet(Aa).domEventHandlers}));function pW(n={}){return[Aa.of(n),t_(),fW]}function X2(n){let e=9;for(;e{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hW.range(i)))}return gr.of(e)});function mW(){return dW}const n_=1024;let gW=0;class Kb{constructor(e,t){this.from=e,this.to=t}}class mr{constructor(e={}){this.id=gW++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Mn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}mr.closedBy=new mr({deserialize:n=>n.split(" ")});mr.openedBy=new mr({deserialize:n=>n.split(" ")});mr.group=new mr({deserialize:n=>n.split(" ")});mr.isolate=new mr({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});mr.contextHash=new mr({perNode:!0});mr.lookAhead=new mr({perNode:!0});mr.mounted=new mr({perNode:!0});class Zu{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[mr.mounted.id]}}const yW=Object.create(null);class Mn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):yW,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Mn(e.name||"",t,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(mr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(mr.group),l=-1;l<(i?i.length:0);l++){let h=t[l<0?r.name:i[l]];if(h)return h}}}}Mn.none=new Mn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let t=0;t0;for(let A=this.cursor(h|rn.IncludeAnonymous);;){let _=!1;if(A.from<=l&&A.to>=i&&(!C&&A.type.isAnonymous||t(A)!==!1)){if(A.firstChild())continue;_=!0}for(;_&&r&&(C||!A.type.isAnonymous)&&r(A),!A.nextSibling();){if(!A.parent())return;_=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rO(Mn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Yr(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Yr(Mn.none,t,r,i)))}static build(e){return OW(e)}}Yr.empty=new Yr(Mn.none,[],[],0);class eO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eO(this.buffer,this.index)}}class Di{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Mn.none}toString(){let e=[];for(let t=0;t0));A=h[A+3]);return C}slice(e,t,r){let i=this.buffer,l=new Uint16Array(t-e),h=0;for(let C=e,A=0;C=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function il(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?C.length:-1;e!=_;e+=t){let B=C[e],q=A[e]+h.from;if(s_(i,r,q,q+B.length)){if(B instanceof Di){if(l&rn.ExcludeBuffers)continue;let Y=B.findChild(0,B.buffer.length,t,r-q,i);if(Y>-1)return new Fs(new bW(h,B,e,q),null,Y)}else if(l&rn.IncludeAnonymous||!B.type.isAnonymous||tO(B)){let Y;if(!(l&rn.IgnoreMounts)&&(Y=Zu.get(B))&&!Y.overlay)return new Nn(Y.tree,q,e,h);let ie=new Nn(B,q,e,h);return l&rn.IncludeAnonymous||!ie.type.isAnonymous?ie:ie.nextChild(t<0?B.children.length-1:0,t,r,i)}}}if(l&rn.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?e=h.index+t:e=t<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&rn.IgnoreOverlays)&&(i=Zu.get(this._tree))&&i.overlay){let l=e-this.from;for(let{from:h,to:C}of i.overlay)if((t>0?h<=l:h=l:C>l))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function H2(n,e,t,r){let i=n.cursor(),l=[];if(!i.firstChild())return l;if(t!=null){for(let h=!1;!h;)if(h=i.type.is(t),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function ix(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class bW{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Fs extends i_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return l<0?null:new Fs(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new Fs(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Fs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Fs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let h=r.buffer[this.index+1];e.push(r.slice(i,l,h)),t.push(0)}return new Yr(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function a_(n){if(!n.length)return null;let e=0,t=n[0];for(let l=1;lt.from||h.to=e){let C=new Nn(h.tree,h.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(il(C,e,t,!1))}}return i?a_(i):r}class ax{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&rn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let l=t+e,h=e<0?-1:r._tree.children.length;l!=h;l+=e){let C=r._tree.children[l];if(this.mode&rn.IncludeAnonymous||C instanceof Di||!C.type.isAnonymous||tO(C))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let h=e;h;h=h._parent)if(h.index==i){if(i==this.index)return h;t=h,r=l+1;break e}i=this.stack[--l]}for(let i=r;i=0;l--){if(l<0)return ix(this._tree,e,i);let h=r[t.buffer[this.stack[l]]];if(!h.isAnonymous){if(e[i]&&e[i]!=h.name)return!1;i--}}return!0}}function tO(n){return n.children.some(e=>e instanceof Di||!e.type.isAnonymous||tO(e))}function OW(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=n_,reused:l=[],minRepeatType:h=r.types.length}=n,C=Array.isArray(t)?new eO(t,t.length):t,A=r.types,_=0,B=0;function q(ft,ot,Ye,xt,It,_t){let{id:Nt,start:At,end:Yt,size:er}=C,yr=B,$r=_;for(;er<0;)if(C.next(),er==-1){let $n=l[Nt];Ye.push($n),xt.push(At-ft);return}else if(er==-3){_=Nt;return}else if(er==-4){B=Nt;return}else throw new RangeError(`Unrecognized record size: ${er}`);let Vr=A[Nt],On,qr,Sn=At-ft;if(Yt-At<=i&&(qr=$e(C.pos-ot,It))){let $n=new Uint16Array(qr.size-qr.skip),hn=C.pos-qr.size,dn=$n.length;for(;C.pos>hn;)dn=Qe(qr.start,$n,dn);On=new Di($n,Yt-qr.start,r),Sn=qr.start-ft}else{let $n=C.pos-er;C.next();let hn=[],dn=[],Us=Nt>=h?Nt:-1,ii=0,is=Yt;for(;C.pos>$n;)Us>=0&&C.id==Us&&C.size>=0?(C.end<=is-i&&(me(hn,dn,At,ii,C.end,is,Us,yr,$r),ii=hn.length,is=C.end),C.next()):_t>2500?Y(At,$n,hn,dn):q(At,$n,hn,dn,Us,_t+1);if(Us>=0&&ii>0&&ii-1&&ii>0){let Cl=ie(Vr,$r);On=rO(Vr,hn,dn,0,hn.length,0,Yt-At,Cl,Cl)}else On=_e(Vr,hn,dn,Yt-At,yr-Yt,$r)}Ye.push(On),xt.push(Sn)}function Y(ft,ot,Ye,xt){let It=[],_t=0,Nt=-1;for(;C.pos>ot;){let{id:At,start:Yt,end:er,size:yr}=C;if(yr>4)C.next();else{if(Nt>-1&&Yt=0;er-=3)At[yr++]=It[er],At[yr++]=It[er+1]-Yt,At[yr++]=It[er+2]-Yt,At[yr++]=yr;Ye.push(new Di(At,It[2]-Yt,r)),xt.push(Yt-ft)}}function ie(ft,ot){return(Ye,xt,It)=>{let _t=0,Nt=Ye.length-1,At,Yt;if(Nt>=0&&(At=Ye[Nt])instanceof Yr){if(!Nt&&At.type==ft&&At.length==It)return At;(Yt=At.prop(mr.lookAhead))&&(_t=xt[Nt]+At.length+Yt)}return _e(ft,Ye,xt,It,_t,ot)}}function me(ft,ot,Ye,xt,It,_t,Nt,At,Yt){let er=[],yr=[];for(;ft.length>xt;)er.push(ft.pop()),yr.push(ot.pop()+Ye-It);ft.push(_e(r.types[Nt],er,yr,_t-It,At-_t,Yt)),ot.push(It-Ye)}function _e(ft,ot,Ye,xt,It,_t,Nt){if(_t){let At=[mr.contextHash,_t];Nt=Nt?[At].concat(Nt):[At]}if(It>25){let At=[mr.lookAhead,It];Nt=Nt?[At].concat(Nt):[At]}return new Yr(ft,ot,Ye,xt,Nt)}function $e(ft,ot){let Ye=C.fork(),xt=0,It=0,_t=0,Nt=Ye.end-i,At={size:0,start:0,skip:0};e:for(let Yt=Ye.pos-ft;Ye.pos>Yt;){let er=Ye.size;if(Ye.id==ot&&er>=0){At.size=xt,At.start=It,At.skip=_t,_t+=4,xt+=4,Ye.next();continue}let yr=Ye.pos-er;if(er<0||yr=h?4:0,Vr=Ye.start;for(Ye.next();Ye.pos>yr;){if(Ye.size<0)if(Ye.size==-3)$r+=4;else break e;else Ye.id>=h&&($r+=4);Ye.next()}It=Vr,xt+=er,_t+=$r}return(ot<0||xt==ft)&&(At.size=xt,At.start=It,At.skip=_t),At.size>4?At:void 0}function Qe(ft,ot,Ye){let{id:xt,start:It,end:_t,size:Nt}=C;if(C.next(),Nt>=0&&xt4){let Yt=C.pos-(Nt-4);for(;C.pos>Yt;)Ye=Qe(ft,ot,Ye)}ot[--Ye]=At,ot[--Ye]=_t-ft,ot[--Ye]=It-ft,ot[--Ye]=xt}else Nt==-3?_=xt:Nt==-4&&(B=xt);return Ye}let Je=[],ct=[];for(;C.pos>0;)q(n.start||0,n.bufferStart||0,Je,ct,-1,0);let yt=(e=n.length)!==null&&e!==void 0?e:Je.length?ct[0]+Je[0].length:0;return new Yr(A[n.topID],Je.reverse(),ct.reverse(),yt)}const K2=new WeakMap;function Fu(n,e){if(!n.isAnonymous||e instanceof Di||e.type!=n)return 1;let t=K2.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Yr)){t=1;break}t+=Fu(n,r)}K2.set(e,t)}return t}function rO(n,e,t,r,i,l,h,C,A){let _=0;for(let me=r;me=B)break;ot+=Ye}if(ct==yt+1){if(ot>B){let Ye=me[yt];ie(Ye.children,Ye.positions,0,Ye.children.length,_e[yt]+Je);continue}q.push(me[yt])}else{let Ye=_e[ct-1]+me[ct-1].length-ft;q.push(rO(n,me,_e,yt,ct,ft,Ye,null,A))}Y.push(ft+Je-l)}}return ie(e,t,r,i,0),(C||A)(q,Y,h)}class SW{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Fs?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof Fs?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ia{constructor(e,t,r,i,l=!1,h=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(l?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ia(0,e.length,e,0,!1,r)];for(let l of t)l.to>e.length&&i.push(l);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],l=1,h=e.length?e[0]:null;for(let C=0,A=0,_=0;;C++){let B=C=r)for(;h&&h.from=Y.from||q<=Y.to||_){let ie=Math.max(Y.from,A)-_,me=Math.min(Y.to,q)-_;Y=ie>=me?null:new ia(ie,me,Y.tree,Y.offset+_,C>0,!!B)}if(Y&&i.push(Y),h.to>q)break;h=lnew Kb(i.from,i.to)):[new Kb(0,0)]:[new Kb(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let l=i.advance();if(l)return l}}}class EW{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new mr({perNode:!0});let CW=0;class Hn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=CW++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Hn&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Hn(r,[],null,[]);if(i.set.push(i),t)for(let l of t.set)i.set.push(l);return i}static defineModifier(e){let t=new Xu(e);return r=>r.modified.indexOf(t)>-1?r:Xu.get(r.base||r,r.modified.concat(t).sort((i,l)=>i.id-l.id))}}let wW=0;class Xu{constructor(e){this.name=e,this.instances=[],this.id=wW++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(C=>C.base==e&&kW(t,C.modified));if(r)return r;let i=[],l=new Hn(e.name,i,e,t);for(let C of t)C.instances.push(l);let h=AW(t);for(let C of e.set)if(!C.modified.length)for(let A of h)i.push(Xu.get(C,A));return l}}function kW(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function AW(n){let e=[[]];for(let t=0;tr.length-t.length)}function l_(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let l=[],h=2,C=i;for(let q=0;;){if(C=="..."&&q>0&&q+3==i.length){h=1;break}let Y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(C);if(!Y)throw new RangeError("Invalid path: "+i);if(l.push(Y[0]=="*"?"":Y[0][0]=='"'?JSON.parse(Y[0]):Y[0]),q+=Y[0].length,q==i.length)break;let ie=i[q++];if(q==i.length&&ie=="!"){h=0;break}if(ie!="/")throw new RangeError("Invalid path: "+i);C=i.slice(q)}let A=l.length-1,_=l[A];if(!_)throw new RangeError("Invalid path: "+i);let B=new Yu(r,h,A>0?l.slice(0,A):null);e[_]=B.sort(e[_])}}return u_.add(e)}const u_=new mr;class Yu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let h=i;for(let C of l)for(let A of C.set){let _=t[A.id];if(_){h=h?h+" "+_:_;break}}return h},scope:r}}function PW(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function TW(n,e,t,r=0,i=n.length){let l=new DW(r,Array.isArray(e)?e:[e],t);l.highlightRange(n.cursor(),r,i,"",l.highlighters),l.flush(i)}class DW{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,l){let{type:h,from:C,to:A}=e;if(C>=r||A<=t)return;h.isTop&&(l=this.highlighters.filter(ie=>!ie.scope||ie.scope(h)));let _=i,B=IW(e)||Yu.empty,q=PW(l,B.tags);if(q&&(_&&(_+=" "),_+=q,B.mode==1&&(i+=(i?" ":"")+q)),this.startSpan(Math.max(t,C),_),B.opaque)return;let Y=e.tree&&e.tree.prop(mr.mounted);if(Y&&Y.overlay){let ie=e.node.enter(Y.overlay[0].from+C,1),me=this.highlighters.filter($e=>!$e.scope||$e.scope(Y.tree.type)),_e=e.firstChild();for(let $e=0,Qe=C;;$e++){let Je=$e=ct||!e.nextSibling())););if(!Je||ct>r)break;Qe=Je.to+C,Qe>t&&(this.highlightRange(ie.cursor(),Math.max(t,Je.from+C),Math.min(r,Qe),"",me),this.startSpan(Math.min(r,Qe),_))}_e&&e.parent()}else if(e.firstChild()){Y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,l),this.startSpan(Math.min(r,e.to),_)}while(e.nextSibling());e.parent()}}}function IW(n){let e=n.type.prop(u_);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Ft=Hn.define,mu=Ft(),di=Ft(),J2=Ft(di),eI=Ft(di),mi=Ft(),gu=Ft(mi),Jb=Ft(mi),Ts=Ft(),Xi=Ft(Ts),As=Ft(),Ps=Ft(),ox=Ft(),Ro=Ft(ox),yu=Ft(),re={comment:mu,lineComment:Ft(mu),blockComment:Ft(mu),docComment:Ft(mu),name:di,variableName:Ft(di),typeName:J2,tagName:Ft(J2),propertyName:eI,attributeName:Ft(eI),className:Ft(di),labelName:Ft(di),namespace:Ft(di),macroName:Ft(di),literal:mi,string:gu,docString:Ft(gu),character:Ft(gu),attributeValue:Ft(gu),number:Jb,integer:Ft(Jb),float:Ft(Jb),bool:Ft(mi),regexp:Ft(mi),escape:Ft(mi),color:Ft(mi),url:Ft(mi),keyword:As,self:Ft(As),null:Ft(As),atom:Ft(As),unit:Ft(As),modifier:Ft(As),operatorKeyword:Ft(As),controlKeyword:Ft(As),definitionKeyword:Ft(As),moduleKeyword:Ft(As),operator:Ps,derefOperator:Ft(Ps),arithmeticOperator:Ft(Ps),logicOperator:Ft(Ps),bitwiseOperator:Ft(Ps),compareOperator:Ft(Ps),updateOperator:Ft(Ps),definitionOperator:Ft(Ps),typeOperator:Ft(Ps),controlOperator:Ft(Ps),punctuation:ox,separator:Ft(ox),bracket:Ro,angleBracket:Ft(Ro),squareBracket:Ft(Ro),paren:Ft(Ro),brace:Ft(Ro),content:Ts,heading:Xi,heading1:Ft(Xi),heading2:Ft(Xi),heading3:Ft(Xi),heading4:Ft(Xi),heading5:Ft(Xi),heading6:Ft(Xi),contentSeparator:Ft(Ts),list:Ft(Ts),quote:Ft(Ts),emphasis:Ft(Ts),strong:Ft(Ts),link:Ft(Ts),monospace:Ft(Ts),strikethrough:Ft(Ts),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:yu,documentMeta:Ft(yu),annotation:Ft(yu),processingInstruction:Ft(yu),definition:Hn.defineModifier("definition"),constant:Hn.defineModifier("constant"),function:Hn.defineModifier("function"),standard:Hn.defineModifier("standard"),local:Hn.defineModifier("local"),special:Hn.defineModifier("special")};for(let n in re){let e=re[n];e instanceof Hn&&(e.name=n)}c_([{tag:re.link,class:"tok-link"},{tag:re.heading,class:"tok-heading"},{tag:re.emphasis,class:"tok-emphasis"},{tag:re.strong,class:"tok-strong"},{tag:re.keyword,class:"tok-keyword"},{tag:re.atom,class:"tok-atom"},{tag:re.bool,class:"tok-bool"},{tag:re.url,class:"tok-url"},{tag:re.labelName,class:"tok-labelName"},{tag:re.inserted,class:"tok-inserted"},{tag:re.deleted,class:"tok-deleted"},{tag:re.literal,class:"tok-literal"},{tag:re.string,class:"tok-string"},{tag:re.number,class:"tok-number"},{tag:[re.regexp,re.escape,re.special(re.string)],class:"tok-string2"},{tag:re.variableName,class:"tok-variableName"},{tag:re.local(re.variableName),class:"tok-variableName tok-local"},{tag:re.definition(re.variableName),class:"tok-variableName tok-definition"},{tag:re.special(re.variableName),class:"tok-variableName2"},{tag:re.definition(re.propertyName),class:"tok-propertyName tok-definition"},{tag:re.typeName,class:"tok-typeName"},{tag:re.namespace,class:"tok-namespace"},{tag:re.className,class:"tok-className"},{tag:re.macroName,class:"tok-macroName"},{tag:re.propertyName,class:"tok-propertyName"},{tag:re.operator,class:"tok-operator"},{tag:re.comment,class:"tok-comment"},{tag:re.meta,class:"tok-meta"},{tag:re.invalid,class:"tok-invalid"},{tag:re.punctuation,class:"tok-punctuation"}]);var ev;const Pa=new mr;function f_(n){return $t.define({combine:n?e=>e.concat(n):void 0})}const nO=new mr;class hs{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Sr.prototype.hasOwnProperty("tree")||Object.defineProperty(Sr.prototype,"tree",{get(){return nn(this)}}),this.parser=t,this.extension=[Ii.of(this),Sr.languageData.of((l,h,C)=>{let A=tI(l,h,C),_=A.type.prop(Pa);if(!_)return[];let B=l.facet(_),q=A.type.prop(nO);if(q){let Y=A.resolve(h-A.from,C);for(let ie of q)if(ie.test(Y,l)){let me=l.facet(ie.facet);return ie.type=="replace"?me:me.concat(B)}}return B})].concat(r)}isActiveAt(e,t,r=-1){return tI(e,t,r).type.prop(Pa)==this.data}findRegions(e){let t=e.facet(Ii);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(l,h)=>{if(l.prop(Pa)==this.data){r.push({from:h,to:h+l.length});return}let C=l.prop(mr.mounted);if(C){if(C.tree.prop(Pa)==this.data){if(C.overlay)for(let A of C.overlay)r.push({from:A.from+h,to:A.to+h});else r.push({from:h,to:h+l.length});return}else if(C.overlay){let A=r.length;if(i(C.tree,C.overlay[0].from+h),r.length>A)return}}for(let A=0;Ar.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nn(n){let e=n.field(hs.state,!1);return e?e.tree:Yr.empty}class RW{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Fo=null;class Ku{constructor(e,t,r=[],i,l,h,C,A){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=h,this.skipped=C,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Ku(e,t,[],Yr.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RW(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Yr.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ia.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fo;Fo=this;try{return e()}finally{Fo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=rI(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:l,viewport:h,skipped:C}=this;if(this.takeTree(),!e.empty){let A=[];if(e.iterChangedRanges((_,B,q,Y)=>A.push({fromA:_,toA:B,fromB:q,toB:Y})),r=ia.applyChanges(r,A),i=Yr.empty,l=0,h={from:e.mapPos(h.from,-1),to:e.mapPos(h.to,1)},this.skipped.length){C=[];for(let _ of this.skipped){let B=e.mapPos(_.from,1),q=e.mapPos(_.to,-1);Be.from&&(this.fragments=rI(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends o_{createParse(t,r,i){let l=i[0].from,h=i[i.length-1].to;return{parsedPos:l,advance(){let A=Fo;if(A){for(let _ of i)A.tempSkipped.push(_);e&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,e]):e)}return this.parsedPos=h,new Yr(Mn.none,[],[],h-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Fo}}function rI(n,e,t){return ia.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Ku.create(e.facet(Ii).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Za(r)}}hs.state=Hr.define({create:Za.init,update(n,e){for(let t of e.effects)if(t.is(hs.setState))return t.value;return e.startState.facet(Ii)!=e.state.facet(Ii)?Za.init(e.state):n.apply(e)}});let p_=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(p_=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const tv=typeof navigator<"u"&&(!((ev=navigator.scheduling)===null||ev===void 0)&&ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,FW=Ur.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=p_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,A=l.context.work(()=>tv&&tv()||Date.now()>h,i+(C?0:1e5));this.chunkBudget-=Date.now()-t,(A||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:hs.setState.of(new Za(l.context))})),this.chunkBudget>0&&!(A&&!C)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ii=$t.define({combine(n){return n.length?n[0]:null},enables:n=>[hs.state,FW,Mt.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class _W{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const BW=$t.define(),wc=$t.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Ju(n){let e=n.facet(wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function al(n,e){let t="",r=n.tabSize,i=n.facet(wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let l=0;l=e?LW(n,t,e):null}class kc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ju(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(t<0?i-1&&(l+=h-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,t=e.length){return ro(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let h=l(i);if(h>-1)return h}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const h_=new mr;function LW(n,e,t){let r=e.resolveStack(t),i=r.node.enterUnfinishedNodesBefore(t);if(i!=r.node){let l=[];for(let h=i;h!=r.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)r={node:l[h],next:r}}return d_(r,n,t)}function d_(n,e,t){for(let r=n;r;r=r.next){let i=MW(r.node);if(i)return i(iO.create(e,t,r))}return 0}function NW(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function MW(n){let e=n.type.prop(h_);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(mr.closedBy))){let i=n.lastChild,l=i&&r.indexOf(i.name)>-1;return h=>m_(h,!0,1,void 0,l&&!NW(h)?i.from:void 0)}return n.parent==null?$W:null}function $W(){return 0}class iO extends kc{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new iO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jW(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return d_(this.context.next,this.base,this.pos)}}function jW(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function qW(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,l=n.state.doc.lineAt(t.from),h=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let C=t.to;;){let A=e.childAfter(C);if(!A||A==r)return null;if(!A.type.isSkipped){if(A.from>=h)return null;let _=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+_}}C=A.to}}function QW({closing:n,align:e=!0,units:t=1}){return r=>m_(r,e,t,n)}function m_(n,e,t,r,i){let l=n.textAfter,h=l.match(/^\s*/)[0].length,C=r&&l.slice(h,h+r.length)==r||i==n.pos+h,A=e?qW(n):null;return A?C?n.column(A.from):n.column(A.to):n.baseIndent+(C?0:n.unit*t)}const UW=n=>n.baseIndent;function rv({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const VW=200;function WW(){return Sr.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+VW)return n;let l=t.sliceString(i.from,r);if(!e.some(_=>_.test(l)))return n;let{state:h}=n,C=-1,A=[];for(let{head:_}of h.selection.ranges){let B=h.doc.lineAt(_);if(B.from==C)continue;C=B.from;let q=sO(h,B.from);if(q==null)continue;let Y=/^\s*/.exec(B.text)[0],ie=al(h,q);Y!=ie&&A.push({from:B.from,to:B.from+Y.length,insert:ie})}return A.length?[n,{changes:A,sequential:!0}]:n})}const GW=$t.define(),g_=new mr;function zW(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(l&&C.from=e&&_.to>t&&(l=_)}}return l}function XW(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function ec(n,e,t){for(let r of n.facet(GW)){let i=r(n,e,t);if(i)return i}return ZW(n,e,t)}function y_(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ac=sr.define({map:y_}),bl=sr.define({map:y_});function b_(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const ca=Hr.define({create(){return Ht.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Ac)&&!YW(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(aO),i=r?Ht.replace({widget:new nG(r(e.state,t.value))}):nI;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(bl)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:r}=e.selection.main;n.between(r,r,(i,l)=>{ir&&(t=!0)}),t&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,l)=>l<=r||i>=r}))}return n},provide:n=>Mt.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>l)&&(i={from:l,to:h})}),i}function YW(n,e,t){let r=!1;return n.between(e,e,(i,l)=>{i==e&&l==t&&(r=!0)}),r}function v_(n,e){return n.field(ca,!1)?e:e.concat(sr.appendConfig.of(O_()))}const HW=n=>{for(let e of b_(n)){let t=ec(n.state,e.from,e.to);if(t)return n.dispatch({effects:v_(n.state,[Ac.of(t),x_(n,t)])}),!0}return!1},KW=n=>{if(!n.state.field(ca,!1))return!1;let e=[];for(let t of b_(n)){let r=tc(n.state,t.from,t.to);r&&e.push(bl.of(r),x_(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function x_(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return Mt.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JW=n=>{let{state:e}=n,t=[];for(let r=0;r{let e=n.state.field(ca,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(bl.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tG=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:HW},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KW},{key:"Ctrl-Alt-[",run:JW},{key:"Ctrl-Alt-]",run:eG}],rG={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aO=$t.define({combine(n){return bs(n,rG)}});function O_(n){let e=[ca,aG];return n&&e.push(aO.of(n)),e}function S_(n,e){let{state:t}=n,r=t.facet(aO),i=h=>{let C=n.lineBlockAt(n.posAtDOM(h.target)),A=tc(n.state,C.from,C.to);A&&n.dispatch({effects:bl.of(A)}),h.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const nI=Ht.replace({widget:new class extends si{toDOM(n){return S_(n,null)}}});class nG extends si{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return S_(e,this.value)}}const sG={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nv extends js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iG(n={}){let e=Object.assign(Object.assign({},sG),n),t=new nv(e,!0),r=new nv(e,!1),i=Ur.fromClass(class{constructor(h){this.from=h.viewport.from,this.markers=this.buildMarkers(h)}update(h){(h.docChanged||h.viewportChanged||h.startState.facet(Ii)!=h.state.facet(Ii)||h.startState.field(ca,!1)!=h.state.field(ca,!1)||nn(h.startState)!=nn(h.state)||e.foldingChanged(h))&&(this.markers=this.buildMarkers(h.view))}buildMarkers(h){let C=new ki;for(let A of h.viewportLineBlocks){let _=tc(h.state,A.from,A.to)?r:ec(h.state,A.from,A.to)?t:null;_&&C.add(A.from,A.from,_)}return C.finish()}}),{domEventHandlers:l}=e;return[i,e_({class:"cm-foldGutter",markers(h){var C;return((C=h.plugin(i))===null||C===void 0?void 0:C.markers)||gr.empty},initialSpacer(){return new nv(e,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(h,C,A)=>{if(l.click&&l.click(h,C,A))return!0;let _=tc(h.state,C.from,C.to);if(_)return h.dispatch({effects:bl.of(_)}),!0;let B=ec(h.state,C.from,C.to);return B?(h.dispatch({effects:Ac.of(B)}),!0):!1}})}),O_()]}const aG=Mt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vl{constructor(e,t){this.specs=e;let r;function i(C){let A=Ai.newName();return(r||(r=Object.create(null)))["."+A]=C,A}const l=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,h=t.scope;this.scope=h instanceof hs?C=>C.prop(Pa)==h.data:h?C=>C==h:void 0,this.style=c_(e.map(C=>({tag:C.tag,class:C.class||i(Object.assign({},C,{tag:null}))})),{all:l}).style,this.module=r?new Ai(r):null,this.themeType=t.themeType}static define(e,t){return new vl(e,t||{})}}const lx=$t.define(),E_=$t.define({combine(n){return n.length?[n[0]]:null}});function sv(n){let e=n.facet(lx);return e.length?e:n.facet(E_)}function C_(n,e){let t=[lG],r;return n instanceof vl&&(n.module&&t.push(Mt.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(E_.of(n)):r?t.push(lx.computeN([Mt.darkTheme],i=>i.facet(Mt.darkTheme)==(r=="dark")?[n]:[])):t.push(lx.of(n)),t}class oG{constructor(e){this.markCache=Object.create(null),this.tree=nn(e.state),this.decorations=this.buildDeco(e,sv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=nn(e.state),r=sv(e.state),i=r!=sv(e.startState),{viewport:l}=e.view,h=e.changes.mapPos(this.decoratedTo,1);t.length=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=h):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ht.none;let r=new ki;for(let{from:i,to:l}of e.visibleRanges)TW(this.tree,t,(h,C,A)=>{r.add(h,C,this.markCache[A]||(this.markCache[A]=Ht.mark({class:A})))},i,l);return r.finish()}}const lG=_i.high(Ur.fromClass(oG,{decorations:n=>n.decorations})),uG=vl.define([{tag:re.meta,color:"#404740"},{tag:re.link,textDecoration:"underline"},{tag:re.heading,textDecoration:"underline",fontWeight:"bold"},{tag:re.emphasis,fontStyle:"italic"},{tag:re.strong,fontWeight:"bold"},{tag:re.strikethrough,textDecoration:"line-through"},{tag:re.keyword,color:"#708"},{tag:[re.atom,re.bool,re.url,re.contentSeparator,re.labelName],color:"#219"},{tag:[re.literal,re.inserted],color:"#164"},{tag:[re.string,re.deleted],color:"#a11"},{tag:[re.regexp,re.escape,re.special(re.string)],color:"#e40"},{tag:re.definition(re.variableName),color:"#00f"},{tag:re.local(re.variableName),color:"#30a"},{tag:[re.typeName,re.namespace],color:"#085"},{tag:re.className,color:"#167"},{tag:[re.special(re.variableName),re.macroName],color:"#256"},{tag:re.definition(re.propertyName),color:"#00c"},{tag:re.comment,color:"#940"},{tag:re.invalid,color:"#f00"}]),cG=Mt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),w_=1e4,k_="()[]{}",A_=$t.define({combine(n){return bs(n,{afterCursor:!0,brackets:k_,maxScanDistance:w_,renderMatch:hG})}}),fG=Ht.mark({class:"cm-matchingBracket"}),pG=Ht.mark({class:"cm-nonmatchingBracket"});function hG(n){let e=[],t=n.matched?fG:pG;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const dG=Hr.define({create(){return Ht.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(A_);for(let i of e.state.selection.ranges){if(!i.empty)continue;let l=_s(e.state,i.head,-1,r)||i.head>0&&_s(e.state,i.head-1,1,r)||r.afterCursor&&(_s(e.state,i.head,1,r)||i.headMt.decorations.from(n)}),mG=[dG,cG];function gG(n={}){return[A_.of(n),mG]}const yG=new mr;function ux(n,e,t){let r=n.prop(e<0?mr.openedBy:mr.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function cx(n){let e=n.type.prop(yG);return e?e(n.node):n}function _s(n,e,t,r={}){let i=r.maxScanDistance||w_,l=r.brackets||k_,h=nn(n),C=h.resolveInner(e,t);for(let A=C;A;A=A.parent){let _=ux(A.type,t,l);if(_&&A.from0?e>=B.from&&eB.from&&e<=B.to))return bG(n,e,t,A,B,_,l)}}return vG(n,e,t,h,C.type,i,l)}function bG(n,e,t,r,i,l,h){let C=r.parent,A={from:i.from,to:i.to},_=0,B=C==null?void 0:C.cursor();if(B&&(t<0?B.childBefore(r.from):B.childAfter(r.to)))do if(t<0?B.to<=r.from:B.from>=r.to){if(_==0&&l.indexOf(B.type.name)>-1&&B.from0)return null;let _={from:t<0?e-1:e,to:t>0?e+1:e},B=n.doc.iterRange(e,t>0?n.doc.length:0),q=0;for(let Y=0;!B.next().done&&Y<=l;){let ie=B.value;t<0&&(Y+=ie.length);let me=e+Y*t;for(let _e=t>0?0:ie.length-1,$e=t>0?ie.length:-1;_e!=$e;_e+=t){let Qe=h.indexOf(ie[_e]);if(!(Qe<0||r.resolveInner(me+_e,1).type!=i))if(Qe%2==0==t>0)q++;else{if(q==1)return{start:_,end:{from:me+_e,to:me+_e+1},matched:Qe>>1==A>>1};q--}}t>0&&(Y+=ie.length)}return B.done?{start:_,matched:!1}:null}const xG=Object.create(null),sI=[Mn.none],iI=[],aI=Object.create(null),OG=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OG[n]=SG(xG,e);function iv(n,e){iI.indexOf(n)>-1||(iI.push(n),console.warn(e))}function SG(n,e){let t=[];for(let C of e.split(" ")){let A=[];for(let _ of C.split(".")){let B=n[_]||re[_];B?typeof B=="function"?A.length?A=A.map(B):iv(_,`Modifier ${_} used at start of tag`):A.length?iv(_,`Tag ${_} used as modifier`):A=Array.isArray(B)?B:[B]:iv(_,`Unknown highlighting tag ${_}`)}for(let _ of A)t.push(_)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(C=>C.id),l=aI[i];if(l)return l.id;let h=aI[i]=Mn.define({id:sI.length,name:r,props:[l_({[r]:t})]});return sI.push(h),h.id}Rr.RTL,Rr.LTR;const EG=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=lO(n.state,t.from);return r.line?CG(n):r.block?kG(n):!1};function oO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const CG=oO(TG,0),wG=oO(P_,0),kG=oO((n,e)=>P_(n,e,PG(e)),0);function lO(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const _o=50;function AG(n,{open:e,close:t},r,i){let l=n.sliceDoc(r-_o,r),h=n.sliceDoc(i,i+_o),C=/\s*$/.exec(l)[0].length,A=/^\s*/.exec(h)[0].length,_=l.length-C;if(l.slice(_-e.length,_)==e&&h.slice(A,A+t.length)==t)return{open:{pos:r-C,margin:C&&1},close:{pos:i+A,margin:A&&1}};let B,q;i-r<=2*_o?B=q=n.sliceDoc(r,i):(B=n.sliceDoc(r,r+_o),q=n.sliceDoc(i-_o,i));let Y=/^\s*/.exec(B)[0].length,ie=/\s*$/.exec(q)[0].length,me=q.length-ie-t.length;return B.slice(Y,Y+e.length)==e&&q.slice(me,me+t.length)==t?{open:{pos:r+Y+e.length,margin:/\s/.test(B.charAt(Y+e.length))?1:0},close:{pos:i-ie-t.length,margin:/\s/.test(q.charAt(me-1))?1:0}}:null}function PG(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function P_(n,e,t=e.selection.ranges){let r=t.map(l=>lO(e,l.from).block);if(!r.every(l=>l))return null;let i=t.map((l,h)=>AG(e,r[h],l.from,l.to));if(n!=2&&!i.every(l=>l))return{changes:e.changes(t.map((l,h)=>i[h]?[]:[{from:l.from,insert:r[h].open+" "},{from:l.to,insert:" "+r[h].close}]))};if(n!=1&&i.some(l=>l)){let l=[];for(let h=0,C;hi&&(l==h||h>q.from)){i=q.from;let Y=/^\s*/.exec(q.text)[0].length,ie=Y==q.length,me=q.text.slice(Y,Y+_.length)==_?Y:-1;Yl.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:C,token:A,indent:_,empty:B,single:q}of r)(q||!B)&&l.push({from:C.from+_,insert:A+" "});let h=e.changes(l);return{changes:h,selection:e.selection.map(h,1)}}else if(n!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:h,comment:C,token:A}of r)if(C>=0){let _=h.from+C,B=_+A.length;h.text[B-h.from]==" "&&B++,l.push({from:_,to:B})}return{changes:l}}return null}const fx=ni.define(),DG=ni.define(),IG=$t.define(),T_=$t.define({combine(n){return bs(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),D_=Hr.define({create(){return Bs.empty},update(n,e){let t=e.state.facet(T_),r=e.annotation(fx);if(r){let A=Ln.fromTransaction(e,r.selection),_=r.side,B=_==0?n.undone:n.done;return A?B=rc(B,B.length,t.minDepth,A):B=F_(B,e.startState.selection),new Bs(_==0?r.rest:B,_==0?B:r.rest)}let i=e.annotation(DG);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Xr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let l=Ln.fromTransaction(e),h=e.annotation(Xr.time),C=e.annotation(Xr.userEvent);return l?n=n.addChanges(l,h,C,t,e):e.selection&&(n=n.addSelection(e.startState.selection,h,C,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Bs(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function RG(n={}){return[D_,T_.of(n),Mt.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?I_:e.inputType=="historyRedo"?px:null;return r?(e.preventDefault(),r(t)):!1}})]}function Pc(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(D_,!1);if(!i)return!1;let l=i.pop(n,t,e);return l?(r(l),!0):!1}}const I_=Pc(0,!1),px=Pc(1,!1),FG=Pc(0,!0),_G=Pc(1,!0);class Ln{constructor(e,t,r,i,l){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&tn.fromJSON(e.changes),[],e.mapped&&Ms.fromJSON(e.mapped),e.startSelection&>.fromJSON(e.startSelection),e.selectionsAfter.map(gt.fromJSON))}static fromTransaction(e,t){let r=Jn;for(let i of e.startState.facet(IG)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Jn)}static selection(e){return new Ln(void 0,Jn,void 0,void 0,e)}}function rc(n,e,t,r){let i=e+1>t+20?e-t-1:0,l=n.slice(i,e);return l.push(r),l}function BG(n,e){let t=[],r=!1;return n.iterChangedRanges((i,l)=>t.push(i,l)),e.iterChangedRanges((i,l,h,C)=>{for(let A=0;A=_&&h<=B&&(r=!0)}}),r}function LG(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function R_(n,e){return n.length?e.length?n.concat(e):n:e}const Jn=[],NG=200;function F_(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-NG));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),rc(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function MG(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function av(n,e){if(!n.length)return n;let t=n.length,r=Jn;for(;t;){let i=$G(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=n.slice(0,t);return l[t-1]=i,l}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:Jn}function $G(n,e,t){let r=R_(n.selectionsAfter.length?n.selectionsAfter.map(C=>C.map(e)):Jn,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),l=e.mapDesc(n.changes,!0),h=n.mapped?n.mapped.composeDesc(l):l;return new Ln(i,sr.mapEffects(n.effects,e),h,n.startSelection.map(l),r)}const jG=/^(input\.type|delete)($|\.)/;class Bs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Bs(this.done,this.undone):this}addChanges(e,t,r,i,l){let h=this.done,C=h[h.length-1];return C&&C.changes&&!C.changes.empty&&e.changes&&(!r||jG.test(r))&&(!C.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tc(t,e))}function vn(n){return n.textDirectionAt(n.state.selection.main.head)==Rr.LTR}const B_=n=>__(n,!vn(n)),L_=n=>__(n,vn(n));function N_(n,e){return vs(n,t=>t.empty?n.moveByGroup(t,e):Tc(t,e))}const QG=n=>N_(n,!vn(n)),UG=n=>N_(n,vn(n));function VG(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dc(n,e,t){let r=nn(n).resolveInner(e.head),i=t?mr.closedBy:mr.openedBy;for(let A=e.head;;){let _=t?r.childAfter(A):r.childBefore(A);if(!_)break;VG(n,_,i)?r=_:A=t?_.to:_.from}let l=r.type.prop(i),h,C;return l&&(h=t?_s(n,r.from,1):_s(n,r.to,-1))&&h.matched?C=t?h.end.to:h.end.from:C=t?r.to:r.from,gt.cursor(C,t?-1:1)}const WG=n=>vs(n,e=>Dc(n.state,e,!vn(n))),GG=n=>vs(n,e=>Dc(n.state,e,vn(n)));function M_(n,e){return vs(n,t=>{if(!t.empty)return Tc(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const $_=n=>M_(n,!1),j_=n=>M_(n,!0);function q_(n){let e=n.scrollDOM.clientHeighth.empty?n.moveVertically(h,e,t.height):Tc(h,e));if(i.eq(r.selection))return!1;let l;if(t.selfScroll){let h=n.coordsAtPos(r.selection.main.head),C=n.scrollDOM.getBoundingClientRect(),A=C.top+t.marginTop,_=C.bottom-t.marginBottom;h&&h.top>A&&h.bottom<_&&(l=Mt.scrollIntoView(i.main.head,{y:"start",yMargin:h.top-A}))}return n.dispatch(Qs(r,i),{effects:l}),!0}const oI=n=>Q_(n,!1),hx=n=>Q_(n,!0);function Bi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let l=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=gt.cursor(r.from+l))}return i}const zG=n=>vs(n,e=>Bi(n,e,!0)),ZG=n=>vs(n,e=>Bi(n,e,!1)),XG=n=>vs(n,e=>Bi(n,e,!vn(n))),YG=n=>vs(n,e=>Bi(n,e,vn(n))),HG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).from,1)),KG=n=>vs(n,e=>gt.cursor(n.lineBlockAt(e.head).to,-1));function JG(n,e,t){let r=!1,i=no(n.selection,l=>{let h=_s(n,l.head,-1)||_s(n,l.head,1)||l.head>0&&_s(n,l.head-1,1)||l.headJG(n,e,!1);function ss(n,e){let t=no(n.state.selection,r=>{let i=e(r);return gt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qs(n.state,t)),!0)}function U_(n,e){return ss(n,t=>n.moveByChar(t,e))}const V_=n=>U_(n,!vn(n)),W_=n=>U_(n,vn(n));function G_(n,e){return ss(n,t=>n.moveByGroup(t,e))}const tz=n=>G_(n,!vn(n)),rz=n=>G_(n,vn(n)),nz=n=>ss(n,e=>Dc(n.state,e,!vn(n))),sz=n=>ss(n,e=>Dc(n.state,e,vn(n)));function z_(n,e){return ss(n,t=>n.moveVertically(t,e))}const Z_=n=>z_(n,!1),X_=n=>z_(n,!0);function Y_(n,e){return ss(n,t=>n.moveVertically(t,e,q_(n).height))}const lI=n=>Y_(n,!1),uI=n=>Y_(n,!0),iz=n=>ss(n,e=>Bi(n,e,!0)),az=n=>ss(n,e=>Bi(n,e,!1)),oz=n=>ss(n,e=>Bi(n,e,!vn(n))),lz=n=>ss(n,e=>Bi(n,e,vn(n))),uz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).from)),cz=n=>ss(n,e=>gt.cursor(n.lineBlockAt(e.head).to)),cI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:0})),!0),fI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.doc.length})),!0),pI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:0})),!0),hI=({state:n,dispatch:e})=>(e(Qs(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),fz=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),pz=({state:n,dispatch:e})=>{let t=Ic(n).map(({from:r,to:i})=>gt.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:gt.create(t),userEvent:"select"})),!0},hz=({state:n,dispatch:e})=>{let t=no(n.selection,r=>{let i=nn(n),l=i.resolveStack(r.from,1);if(r.empty){let h=i.resolveStack(r.from,-1);h.node.from>=l.node.from&&h.node.to<=l.node.to&&(l=h)}for(let h=l;h;h=h.next){let{node:C}=h;if((C.from=r.to||C.to>r.to&&C.from<=r.from)&&h.next)return gt.range(C.to,C.from)}return r});return t.eq(n.selection)?!1:(e(Qs(n,t)),!0)},dz=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=gt.create([t.main]):t.main.empty||(r=gt.create([gt.cursor(t.main.head)])),r?(e(Qs(n,r)),!0):!1};function xl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(l=>{let{from:h,to:C}=l;if(h==C){let A=e(l);Ah&&(t="delete.forward",A=bu(n,A,!0)),h=Math.min(h,A),C=Math.max(C,A)}else h=bu(n,h,!1),C=bu(n,C,!0);return h==C?{range:l}:{changes:{from:h,to:C},range:gt.cursor(h,hi(n)))r.between(e,e,(i,l)=>{ie&&(e=t?l:i)});return e}const H_=(n,e,t)=>xl(n,r=>{let i=r.from,{state:l}=n,h=l.doc.lineAt(i),C,A;if(t&&!e&&i>h.from&&iH_(n,!1,!0),K_=n=>H_(n,!0,!1),J_=(n,e)=>xl(n,t=>{let r=t.head,{state:i}=n,l=i.doc.lineAt(r),h=i.charCategorizer(r);for(let C=null;;){if(r==(e?l.to:l.from)){r==t.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let A=pn(l.text,r-l.from,e)+l.from,_=l.text.slice(Math.min(r,A)-l.from,Math.max(r,A)-l.from),B=h(_);if(C!=null&&B!=C)break;(_!=" "||r!=t.head)&&(C=B),r=A}return r}),eB=n=>J_(n,!1),mz=n=>J_(n,!0),gz=n=>xl(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headxl(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bz=n=>xl(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Or.of(["",""])},range:gt.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},xz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,l=n.doc.lineAt(i),h=i==l.from?i-1:pn(l.text,i-l.from,!1)+l.from,C=i==l.to?i+1:pn(l.text,i-l.from,!0)+l.from;return{changes:{from:h,to:C,insert:n.doc.slice(i,C).append(n.doc.slice(h,i))},range:gt.cursor(C)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ic(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),l=n.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=n.doc.lineAt(r.to-1)),t>=i.number){let h=e[e.length-1];h.to=l.to,h.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});t=l.number+1}return e}function tB(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let l of Ic(n)){if(t?l.to==n.doc.length:l.from==0)continue;let h=n.doc.lineAt(t?l.to+1:l.from-1),C=h.length+1;if(t){r.push({from:l.to,to:h.to},{from:l.from,insert:h.text+n.lineBreak});for(let A of l.ranges)i.push(gt.range(Math.min(n.doc.length,A.anchor+C),Math.min(n.doc.length,A.head+C)))}else{r.push({from:h.from,to:l.from},{from:l.to,insert:n.lineBreak+h.text});for(let A of l.ranges)i.push(gt.range(A.anchor-C,A.head-C))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:gt.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Oz=({state:n,dispatch:e})=>tB(n,e,!1),Sz=({state:n,dispatch:e})=>tB(n,e,!0);function rB(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of Ic(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ez=({state:n,dispatch:e})=>rB(n,e,!1),Cz=({state:n,dispatch:e})=>rB(n,e,!0),wz=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ic(e).map(({from:i,to:l})=>(i>0?i--:l{let l;if(n.lineWrapping){let h=n.lineBlockAt(i.head),C=n.coordsAtPos(i.head,i.assoc||1);C&&(l=h.bottom+n.documentTop-C.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,l)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function kz(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=nn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(mr.closedBy))&&l.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const dI=nB(!1),Az=nB(!0);function nB(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:h}=i,C=e.doc.lineAt(l),A=!n&&l==h&&kz(e,l);n&&(l=h=(h<=C.to?C:e.doc.lineAt(h)).to);let _=new kc(e,{simulateBreak:l,simulateDoubleBreak:!!A}),B=sO(_,l);for(B==null&&(B=ro(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));hC.from&&l{let i=[];for(let h=r.from;h<=r.to;){let C=n.doc.lineAt(h);C.number>t&&(r.empty||r.to>C.from)&&(e(C,i,r),t=C.number),h=C.to+1}let l=n.changes(i);return{changes:i,range:gt.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const Pz=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new kc(n,{overrideIndentation:l=>{let h=t[l];return h??-1}}),i=uO(n,(l,h,C)=>{let A=sO(r,l.from);if(A==null)return;/\S/.test(l.text)||(A=0);let _=/^\s*/.exec(l.text)[0],B=al(n,A);(_!=B||C.fromn.readOnly?!1:(e(n.update(uO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(wc)})}),{userEvent:"input.indent"})),!0),iB=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(uO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let l=ro(i,n.tabSize),h=0,C=al(n,Math.max(0,l-Ju(n)));for(;h(n.setTabFocusMode(),!0),Dz=[{key:"Ctrl-b",run:B_,shift:V_,preventDefault:!0},{key:"Ctrl-f",run:L_,shift:W_},{key:"Ctrl-p",run:$_,shift:Z_},{key:"Ctrl-n",run:j_,shift:X_},{key:"Ctrl-a",run:HG,shift:uz},{key:"Ctrl-e",run:KG,shift:cz},{key:"Ctrl-d",run:K_},{key:"Ctrl-h",run:dx},{key:"Ctrl-k",run:gz},{key:"Ctrl-Alt-h",run:eB},{key:"Ctrl-o",run:vz},{key:"Ctrl-t",run:xz},{key:"Ctrl-v",run:hx}],Iz=[{key:"ArrowLeft",run:B_,shift:V_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:QG,shift:tz,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:XG,shift:oz,preventDefault:!0},{key:"ArrowRight",run:L_,shift:W_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:UG,shift:rz,preventDefault:!0},{mac:"Cmd-ArrowRight",run:YG,shift:lz,preventDefault:!0},{key:"ArrowUp",run:$_,shift:Z_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cI,shift:pI},{mac:"Ctrl-ArrowUp",run:oI,shift:lI},{key:"ArrowDown",run:j_,shift:X_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fI,shift:hI},{mac:"Ctrl-ArrowDown",run:hx,shift:uI},{key:"PageUp",run:oI,shift:lI},{key:"PageDown",run:hx,shift:uI},{key:"Home",run:ZG,shift:az,preventDefault:!0},{key:"Mod-Home",run:cI,shift:pI},{key:"End",run:zG,shift:iz,preventDefault:!0},{key:"Mod-End",run:fI,shift:hI},{key:"Enter",run:dI,shift:dI},{key:"Mod-a",run:fz},{key:"Backspace",run:dx,shift:dx},{key:"Delete",run:K_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:eB},{key:"Mod-Delete",mac:"Alt-Delete",run:mz},{mac:"Mod-Backspace",run:yz},{mac:"Mod-Delete",run:bz}].concat(Dz.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Rz=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:WG,shift:nz},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GG,shift:sz},{key:"Alt-ArrowUp",run:Oz},{key:"Shift-Alt-ArrowUp",run:Ez},{key:"Alt-ArrowDown",run:Sz},{key:"Shift-Alt-ArrowDown",run:Cz},{key:"Escape",run:dz},{key:"Mod-Enter",run:Az},{key:"Alt-l",mac:"Ctrl-l",run:pz},{key:"Mod-i",run:hz,preventDefault:!0},{key:"Mod-[",run:iB},{key:"Mod-]",run:sB},{key:"Mod-Alt-\\",run:Pz},{key:"Shift-Mod-k",run:wz},{key:"Shift-Mod-\\",run:ez},{key:"Mod-/",run:EG},{key:"Alt-A",run:wG},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Tz}].concat(Iz),Fz={key:"Tab",run:sB,shift:iB};function Tr(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Xa{constructor(e,t,r=0,i=e.length,l,h){this.test=h,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?C=>l(mI(C)):mI,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=$x(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Kn(e);let i=this.normalize(t);for(let l=0,h=r;;l++){let C=i.charCodeAt(l),A=this.match(C,h,this.bufferPos+this.bufferStart);if(l==i.length-1){if(A)return this.value=A,this;break}h==r&&lthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=nc(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let C=new _a(t,e.sliceString(t,r));return ov.set(e,C),C}if(i.from==t&&i.to==r)return i;let{text:l,from:h}=i;return h>t&&(l=e.sliceString(t,h)+l,h=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=nc(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(lB.prototype[Symbol.iterator]=uB.prototype[Symbol.iterator]=function(){return this});function _z(n){try{return new RegExp(n,cO),!0}catch{return!1}}function nc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function mx(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Tr("input",{class:"cm-textfield",name:"line",value:e}),r=Tr("form",{class:"cm-gotoLine",onkeydown:l=>{l.keyCode==27?(l.preventDefault(),n.dispatch({effects:sc.of(!1)}),n.focus()):l.keyCode==13&&(l.preventDefault(),i())},onsubmit:l=>{l.preventDefault(),i()}},Tr("label",n.state.phrase("Go to line"),": ",t)," ",Tr("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!l)return;let{state:h}=n,C=h.doc.lineAt(h.selection.main.head),[,A,_,B,q]=l,Y=B?+B.slice(1):0,ie=_?+_:C.number;if(_&&q){let $e=ie/100;A&&($e=$e*(A=="-"?-1:1)+C.number/h.doc.lines),ie=Math.round(h.doc.lines*$e)}else _&&A&&(ie=ie*(A=="-"?-1:1)+C.number);let me=h.doc.line(Math.max(1,Math.min(h.doc.lines,ie))),_e=gt.cursor(me.from+Math.max(0,Math.min(Y,me.length)));n.dispatch({effects:[sc.of(!1),Mt.scrollIntoView(_e.from,{y:"center"})],selection:_e}),n.focus()}return{dom:r}}const sc=sr.define(),gI=Hr.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(sc)&&(n=t.value);return n},provide:n=>sl.from(n,e=>e?mx:null)}),Bz=n=>{let e=nl(n,mx);if(!e){let t=[sc.of(!0)];n.state.field(gI,!1)==null&&t.push(sr.appendConfig.of([gI,Lz])),n.dispatch({effects:t}),e=nl(n,mx)}return e&&e.dom.querySelector("input").select(),!0},Lz=Mt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Nz={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cB=$t.define({combine(n){return bs(n,Nz,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mz(n){let e=[Uz,Qz];return n&&e.push(cB.of(n)),e}const $z=Ht.mark({class:"cm-selectionMatch"}),jz=Ht.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yI(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Br.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Br.Word)}function qz(n,e,t,r){return n(e.sliceDoc(t,t+1))==Br.Word&&n(e.sliceDoc(r-1,r))==Br.Word}const Qz=Ur.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(cB),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ht.none;let i=r.main,l,h=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ht.none;let A=t.wordAt(i.head);if(!A)return Ht.none;h=t.charCategorizer(i.head),l=t.sliceDoc(A.from,A.to)}else{let A=i.to-i.from;if(A200)return Ht.none;if(e.wholeWords){if(l=t.sliceDoc(i.from,i.to),h=t.charCategorizer(i.head),!(yI(h,t,i.from,i.to)&&qz(h,t,i.from,i.to)))return Ht.none}else if(l=t.sliceDoc(i.from,i.to),!l)return Ht.none}let C=[];for(let A of n.visibleRanges){let _=new Xa(t.doc,l,A.from,A.to);for(;!_.next().done;){let{from:B,to:q}=_.value;if((!h||yI(h,t,B,q))&&(i.empty&&B<=i.from&&q>=i.to?C.push(jz.range(B,q)):(B>=i.to||q<=i.from)&&C.push($z.range(B,q)),C.length>e.maxMatches))return Ht.none}}return Ht.set(C)}},{decorations:n=>n.decorations}),Uz=Mt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Vz=({state:n,dispatch:e})=>{let{selection:t}=n,r=gt.create(t.ranges.map(i=>n.wordAt(i.head)||gt.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function Wz(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),l=i&&i.from==t.from&&i.to==t.to;for(let h=!1,C=new Xa(n.doc,e,r[r.length-1].to);;)if(C.next(),C.done){if(h)return null;C=new Xa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),h=!0}else{if(h&&r.some(A=>A.from==C.value.from))continue;if(l){let A=n.wordAt(C.value.from);if(!A||A.from!=C.value.from||A.to!=C.value.to)continue}return C.value}}const Gz=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(l=>l.from===l.to))return Vz({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(l=>n.sliceDoc(l.from,l.to)!=r))return!1;let i=Wz(n,r);return i?(e(n.update({selection:n.selection.addRange(gt.range(i.from,i.to),!1),effects:Mt.scrollIntoView(i.to)})),!0):!1},so=$t.define({combine(n){return bs(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sZ(e),scrollToMatch:e=>Mt.scrollIntoView(e)})}});class fB{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||_z(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Yz(this):new Zz(this)}getCursor(e,t=0,r){let i=e.doc?e:Sr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ka(this,i,t,r):wa(this,i,t,r)}}class pB{constructor(e){this.spec=e}}function wa(n,e,t,r){return new Xa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?zz(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function zz(n,e){return(t,r,i,l)=>((l>t||l+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=wa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function ka(n,e,t,r){return new lB(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Xz(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function ic(n,e){return n.slice(pn(n,e,!1),e)}function ac(n,e){return n.slice(e,pn(n,e))}function Xz(n){return(e,t,r)=>!r[0].length||(n(ic(r.input,r.index))!=Br.Word||n(ac(r.input,r.index))!=Br.Word)&&(n(ac(r.input,r.index+r[0].length))!=Br.Word||n(ic(r.input,r.index+r[0].length))!=Br.Word)}class Yz extends pB{nextMatch(e,t,r){let i=ka(this.spec,e,r,e.doc.length).next();return i.done&&(i=ka(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let l=Math.max(t,r-i*1e4),h=ka(this.spec,e,l,r),C=null;for(;!h.next().done;)C=h.value;if(C&&(l==t||C.from>l+10))return C;if(l==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let l=ka(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const ol=sr.define(),fO=sr.define(),Ei=Hr.define({create(n){return new lv(gx(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ol)?n=new lv(t.value.create(),n.panel):t.is(fO)&&(n=new lv(n.query,t.value?pO:null));return n},provide:n=>sl.from(n,e=>e.panel)});class lv{constructor(e,t){this.query=e,this.panel=t}}const Hz=Ht.mark({class:"cm-searchMatch"}),Kz=Ht.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Jz=Ur.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Ei))}update(n){let e=n.state.field(Ei);(e!=n.startState.field(Ei)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ht.none;let{view:t}=this,r=new ki;for(let i=0,l=t.visibleRanges,h=l.length;il[i+1].from-2*250;)A=l[++i].to;n.highlight(t.state,C,A,(_,B)=>{let q=t.state.selection.ranges.some(Y=>Y.from==_&&Y.to==B);r.add(_,B,q?Kz:Hz)})}return r.finish()}},{decorations:n=>n.decorations});function Ol(n){return e=>{let t=e.state.field(Ei,!1);return t&&t.query.spec.valid?n(e,t):mB(e)}}const oc=Ol((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=gt.single(r.from,r.to),l=n.state.facet(so);return n.dispatch({selection:i,effects:[hO(n,r),l.scrollToMatch(i.main,n)],userEvent:"select.search"}),dB(n),!0}),lc=Ol((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let l=gt.single(i.from,i.to),h=n.state.facet(so);return n.dispatch({selection:l,effects:[hO(n,i),h.scrollToMatch(l.main,n)],userEvent:"select.search"}),dB(n),!0}),eZ=Ol((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:gt.create(t.map(r=>gt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),tZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,l=[],h=0;for(let C=new Xa(n.doc,n.sliceDoc(r,i));!C.next().done;){if(l.length>1e3)return!1;C.value.from==r&&(h=l.length),l.push(gt.range(C.value.from,C.value.to))}return e(n.update({selection:gt.create(l,h),userEvent:"select.search.matches"})),!0},bI=Ol((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,r,r);if(!l)return!1;let h=[],C,A,_=[];if(l.from==r&&l.to==i&&(A=t.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:A}),l=e.nextMatch(t,l.from,l.to),_.push(Mt.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))),l){let B=h.length==0||h[0].from>=l.to?0:l.to-l.from-A.length;C=gt.single(l.from-B,l.to-B),_.push(hO(n,l)),_.push(t.facet(so).scrollToMatch(C.main,n))}return n.dispatch({changes:h,selection:C,effects:_,userEvent:"input.replace"}),!0}),rZ=Ol((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:l,to:h}=i;return{from:l,to:h,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Mt.announce.of(r),userEvent:"input.replace.all"}),!0});function pO(n){return n.state.facet(so).createPanel(n)}function gx(n,e){var t,r,i,l,h;let C=n.selection.main,A=C.empty||C.to>C.from+100?"":n.sliceDoc(C.from,C.to);if(e&&!A)return e;let _=n.facet(so);return new fB({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:_.literal)?A:A.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:_.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:_.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:_.regexp,wholeWord:(h=e==null?void 0:e.wholeWord)!==null&&h!==void 0?h:_.wholeWord})}function hB(n){let e=nl(n,pO);return e&&e.dom.querySelector("[main-field]")}function dB(n){let e=hB(n);e&&e==n.root.activeElement&&e.select()}const mB=n=>{let e=n.state.field(Ei,!1);if(e&&e.panel){let t=hB(n);if(t&&t!=n.root.activeElement){let r=gx(n.state,e.query.spec);r.valid&&n.dispatch({effects:ol.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fO.of(!0),e?ol.of(gx(n.state,e.query.spec)):sr.appendConfig.of(aZ)]});return!0},gB=n=>{let e=n.state.field(Ei,!1);if(!e||!e.panel)return!1;let t=nl(n,pO);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fO.of(!1)}),!0},nZ=[{key:"Mod-f",run:mB,scope:"editor search-panel"},{key:"F3",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:oc,shift:lc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gB,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tZ},{key:"Mod-Alt-g",run:Bz},{key:"Mod-d",run:Gz,preventDefault:!0}];class sZ{constructor(e){this.view=e;let t=this.query=e.state.field(Ei).query.spec;this.commit=this.commit.bind(this),this.searchField=Tr("input",{value:t.search,placeholder:Qn(e,"Find"),"aria-label":Qn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tr("input",{value:t.replace,placeholder:Qn(e,"Replace"),"aria-label":Qn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,l,h){return Tr("button",{class:"cm-button",name:i,onclick:l,type:"button"},h)}this.dom=Tr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>oc(e),[Qn(e,"next")]),r("prev",()=>lc(e),[Qn(e,"previous")]),r("select",()=>eZ(e),[Qn(e,"all")]),Tr("label",null,[this.caseField,Qn(e,"match case")]),Tr("label",null,[this.reField,Qn(e,"regexp")]),Tr("label",null,[this.wordField,Qn(e,"by word")]),...e.state.readOnly?[]:[Tr("br"),this.replaceField,r("replace",()=>bI(e),[Qn(e,"replace")]),r("replaceAll",()=>rZ(e),[Qn(e,"replace all")])],Tr("button",{name:"close",onclick:()=>gB(e),"aria-label":Qn(e,"close"),type:"button"},["×"])])}commit(){let e=new fB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ol.of(e)}))}keydown(e){g7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?lc:oc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bI(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(ol)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(so).top}}function Qn(n,e){return n.state.phrase(e)}const vu=30,xu=/[\s\.,:;?!]/;function hO(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,l=Math.max(r.from,e-vu),h=Math.min(i,t+vu),C=n.state.sliceDoc(l,h);if(l!=r.from){for(let A=0;AC.length-vu;A--)if(!xu.test(C[A-1])&&xu.test(C[A])){C=C.slice(0,A);break}}return Mt.announce.of(`${n.state.phrase("current match")}. ${C} ${n.state.phrase("on line")} ${r.number}.`)}const iZ=Mt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aZ=[Ei,_i.low(Jz),iZ];class yB{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=nn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),l=i.search(vB(e,!1));return l<0?null:{from:r+l,to:this.pos,text:i.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function vI(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function oZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let l=1;ltypeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:oZ(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:t}:null}}function lZ(n,e){return t=>{for(let r=nn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class xI{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Ci(n){return n.selection.main.from}function vB(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",l=r[r.length-1]!="$";return!i&&!l?n:new RegExp(`${i?"^":""}(?:${r})${l?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const dO=ni.define();function uZ(n,e,t,r){let{main:i}=n.selection,l=t-i.from,h=r-i.from;return Object.assign(Object.assign({},n.changeByRange(C=>{if(C!=i&&t!=r&&n.sliceDoc(C.from+l,C.from+h)!=n.sliceDoc(t,r))return{range:C};let A=n.toText(e);return{changes:{from:C.from+l,to:r==i.from?C.to:C.from+h,insert:A},range:gt.cursor(C.from+l+A.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const OI=new WeakMap;function cZ(n){if(!Array.isArray(n))return n;let e=OI.get(n);return e||OI.set(n,e=bB(n)),e}const uc=sr.define(),ll=sr.define();class fZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&ft<=57||ft>=97&&ft<=122?2:ft>=65&&ft<=90?1:0:(ot=$x(ft))!=ot.toLowerCase()?1:ot!=ot.toUpperCase()?2:0;(!Je||Ye==1&&$e||yt==0&&Ye!=0)&&(t[q]==ft||r[q]==ft&&(Y=!0)?h[q++]=Je:h.length&&(Qe=!1)),yt=Ye,Je+=Kn(ft)}return q==A&&h[0]==0&&Qe?this.result(-100+(Y?-200:0),h,e):ie==A&&me==0?this.ret(-200-e.length+(_e==e.length?0:-100),[0,_e]):C>-1?this.ret(-700-e.length,[C,C+this.pattern.length]):ie==A?this.ret(-200+-700-e.length,[me,_e]):q==A?this.result(-100+(Y?-200:0)+-700+(Qe?0:-1100),h,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],l=0;for(let h of t){let C=h+(this.astral?Kn(ln(r,h)):1);l&&i[l-1]==h?i[l-1]=C:(i[l++]=h,i[l++]=C)}return this.ret(e-r.length,i)}}class pZ{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hZ,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>SI(e(r),t(r)),optionClass:(e,t)=>r=>SI(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function SI(n,e){return n?e?n+" "+e:n:e}function hZ(n,e,t,r,i,l){let h=n.textDirection==Rr.RTL,C=h,A=!1,_="top",B,q,Y=e.left-i.left,ie=i.right-e.right,me=r.right-r.left,_e=r.bottom-r.top;if(C&&Y=_e||Je>e.top?B=t.bottom-e.top:(_="bottom",B=e.bottom-t.top)}let $e=(e.bottom-e.top)/l.offsetHeight,Qe=(e.right-e.left)/l.offsetWidth;return{style:`${_}: ${B/$e}px; max-width: ${q/Qe}px`,class:"cm-completionInfo-"+(A?h?"left-narrow":"right-narrow":C?"left":"right")}}function dZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,l){let h=document.createElement("span");h.className="cm-completionLabel";let C=t.displayLabel||t.label,A=0;for(let _=0;_A&&h.appendChild(document.createTextNode(C.slice(A,B)));let Y=h.appendChild(document.createElement("span"));Y.appendChild(document.createTextNode(C.slice(B,q))),Y.className="cm-completionMatchedText",A=q}return At.position-r.position).map(t=>t.render)}function uv(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class mZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:A=>this.placeInfo(A),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:l,selected:h}=i.open,C=e.state.facet(fn);this.optionContent=dZ(C),this.optionClass=C.optionClass,this.tooltipClass=C.tooltipClass,this.range=uv(l.length,h,C.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",A=>{let{options:_}=e.state.field(t).open;for(let B=A.target,q;B&&B!=this.dom;B=B.parentNode)if(B.nodeName=="LI"&&(q=/-(\d+)$/.exec(B.id))&&+q[1]<_.length){this.applyCompletion(e,_[+q[1]]),A.preventDefault();return}}),this.dom.addEventListener("focusout",A=>{let _=e.state.field(this.stateField,!1);_&&_.tooltip&&e.state.facet(fn).closeOnBlur&&A.relatedTarget!=e.contentDOM&&e.dispatch({effects:ll.of(null)})}),this.showOptions(l,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:l,selected:h,disabled:C}=r.open;(!i.open||i.open.options!=l)&&(this.range=uv(l.length,h,e.state.facet(fn).maxRenderedOptions),this.showOptions(l,r.id)),this.updateSel(),C!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!C)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=uv(t.options.length,t.selected,this.view.state.facet(fn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let l=typeof i=="string"?document.createTextNode(i):i(r);if(!l)return;"then"in l?l.then(h=>{h&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(h,r)}).catch(h=>Tn(this.view.state,h,"completion info")):this.addInfoPane(l,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:l}=e;r.appendChild(i),this.infoDestroy=l||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return t&&yZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),l=this.space;if(!l){let h=this.dom.ownerDocument.defaultView||window;l={left:0,top:0,right:h.innerWidth,bottom:h.innerHeight}}return i.top>Math.min(l.bottom,t.bottom)-10||i.bottomr.from||r.from==0))if(l=Y,typeof _!="string"&&_.header)i.appendChild(_.header(_));else{let ie=i.appendChild(document.createElement("completion-section"));ie.textContent=Y}}const B=i.appendChild(document.createElement("li"));B.id=t+"-"+h,B.setAttribute("role","option");let q=this.optionClass(C);q&&(B.className=q);for(let Y of this.optionContent){let ie=Y(C,this.view.state,this.view,A);ie&&B.appendChild(ie)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew mZ(t,n,e)}function yZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.topt.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function EI(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function bZ(n,e){let t=[],r=null,i=_=>{t.push(_);let{section:B}=_.completion;if(B){r||(r=[]);let q=typeof B=="string"?B:B.name;r.some(Y=>Y.name==q)||r.push(typeof B=="string"?{name:q}:B)}},l=e.facet(fn);for(let _ of n)if(_.hasResult()){let B=_.result.getMatch;if(_.result.filter===!1)for(let q of _.result.options)i(new xI(q,_.source,B?B(q):[],1e9-t.length));else{let q=e.sliceDoc(_.from,_.to),Y,ie=l.filterStrict?new pZ(q):new fZ(q);for(let me of _.result.options)if(Y=ie.match(me.label)){let _e=me.displayLabel?B?B(me,Y.matched):[]:Y.matched;i(new xI(me,_.source,_e,Y.score+(me.boost||0)))}}}if(r){let _=Object.create(null),B=0,q=(Y,ie)=>{var me,_e;return((me=Y.rank)!==null&&me!==void 0?me:1e9)-((_e=ie.rank)!==null&&_e!==void 0?_e:1e9)||(Y.nameq.score-B.score||A(B.completion,q.completion))){let B=_.completion;!C||C.label!=B.label||C.detail!=B.detail||C.type!=null&&B.type!=null&&C.type!=B.type||C.apply!=B.apply||C.boost!=B.boost?h.push(_):EI(_.completion)>EI(C)&&(h[h.length-1]=_),C=_.completion}return h}class Ta{constructor(e,t,r,i,l,h){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=l,this.disabled=h}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ta(this.options,CI(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,l){let h=bZ(e,t);if(!h.length)return i&&e.some(A=>A.state==1)?new Ta(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let C=t.facet(fn).selectOnOpen?0:-1;if(i&&i.selected!=C&&i.selected!=-1){let A=i.options[i.selected].completion;for(let _=0;__.hasResult()?Math.min(A,_.from):A,1e8),create:CZ,above:l.aboveCursor},i?i.timestamp:Date.now(),C,!1)}map(e){return new Ta(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class cc{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new cc(SZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(fn),l=(r.override||t.languageDataAt("autocomplete",Ci(t)).map(cZ)).map(C=>(this.active.find(_=>_.source==C)||new Wn(C,this.active.some(_=>_.state!=0)?1:0)).update(e,r));l.length==this.active.length&&l.every((C,A)=>C==this.active[A])&&(l=this.active);let h=this.open;h&&e.docChanged&&(h=h.map(e.changes)),e.selection||l.some(C=>C.hasResult()&&e.changes.touchesRange(C.from,C.to))||!vZ(l,this.active)?h=Ta.build(l,t,this.id,h,r):h&&h.disabled&&!l.some(C=>C.state==1)&&(h=null),!h&&l.every(C=>C.state!=1)&&l.some(C=>C.hasResult())&&(l=l.map(C=>C.hasResult()?new Wn(C.source,0):C));for(let C of e.effects)C.is(SB)&&(h=h&&h.setSelected(C.value,this.id));return l==this.active&&h==this.open?this:new cc(l,this.id,h)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xZ:OZ}}function vZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const SZ=[];function xB(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Wn{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=xB(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Wn(i.source,0)),r&4&&i.state==0&&(i=new Wn(this.source,1)),i=i.updateFor(e,r);for(let l of e.effects)if(l.is(uc))i=new Wn(i.source,1,l.value?Ci(e.state):-1);else if(l.is(ll))i=new Wn(i.source,0);else if(l.is(OB))for(let h of l.value)h.source==i.source&&(i=h);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Wn(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(Ci(e.state))}}class Ba extends Wn{constructor(e,t,r,i,l){super(e,2,t),this.result=r,this.from=i,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let l=e.changes.mapPos(this.from),h=e.changes.mapPos(this.to,1),C=Ci(e.state);if((this.explicitPos<0?C<=l:Ch||!i||t&2&&Ci(e.startState)==this.from)return new Wn(this.source,t&4?1:0);let A=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return EZ(i.validFor,e.state,l,h)?new Ba(this.source,A,i,l,h):i.update&&(i=i.update(i,l,h,new yB(e.state,C,A>=0)))?new Ba(this.source,A,i,i.from,(r=i.to)!==null&&r!==void 0?r:Ci(e.state)):new Wn(this.source,1,A)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ba(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function EZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):vB(n,!0).test(i)}const OB=sr.define({map(n,e){return n.map(t=>t.map(e))}}),SB=sr.define(),Bn=Hr.define({create(){return cc.start()},update(n,e){return n.update(e)},provide:n=>[Ec.from(n,e=>e.tooltip),Mt.contentAttributes.from(n,e=>e.attrs)]});function mO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(Bn).active.find(i=>i.source==e.source);return r instanceof Ba?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},uZ(n.state,t,r.from,r.to)),{annotations:dO.of(e.completion)})):t(n,e.completion,r.from,r.to),!0):!1}const CZ=gZ(Bn,mO);function Ou(n,e="option"){return t=>{let r=t.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(n?1:-1):n?0:h-1;return C<0?C=e=="page"?0:h-1:C>=h&&(C=e=="page"?h-1:0),t.dispatch({effects:SB.of(C)}),!0}}const wZ=n=>{let e=n.state.field(Bn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Bn,!1)?(n.dispatch({effects:uc.of(!0)}),!0):!1,kZ=n=>{let e=n.state.field(Bn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:ll.of(null)}),!0)};class AZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const PZ=50,TZ=1e3,DZ=Ur.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Bn),t=n.state.facet(fn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Bn)==e)return;let r=n.transactions.some(l=>{let h=xB(l,t);return h&8||(l.selection||l.docChanged)&&!(h&3)});for(let l=0;lPZ&&Date.now()-h.time>TZ){for(let C of h.context.abortListeners)try{C()}catch(A){Tn(this.view.state,A)}h.context.abortListeners=null,this.running.splice(l--,1)}else h.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(l=>l.effects.some(h=>h.is(uc)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.state==1&&!this.running.some(h=>h.active.source==l.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let l of n.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Bn);for(let t of e.active)t.state==1&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Ci(e),r=new yB(e,t,n.explicitPos==t,this.view),i=new AZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(l=>{i.context.aborted||(i.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:ll.of(null)}),Tn(this.view.state,l)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(fn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(fn);for(let r=0;rh.source==i.active.source);if(l&&l.state==1)if(i.done==null){let h=new Wn(i.active.source,0);for(let C of i.updates)h=h.update(C,t);h.state!=1&&e.push(h)}else this.startQuery(l)}e.length&&this.view.dispatch({effects:OB.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(fn).closeOnBlur){let t=e.open&&KF(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ll.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uc.of(!1)}),20),this.composing=0}}}),IZ=typeof navigator=="object"&&/Win/.test(navigator.platform),RZ=_i.highest(Mt.domEventHandlers({keydown(n,e){let t=e.state.field(Bn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(IZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(h=>h.source==r.source),l=r.completion.commitCharacters||i.result.commitCharacters;return l&&l.indexOf(n.key)>-1&&mO(e,r),!1}})),EB=Mt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class gO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),r=e.mapPos(this.to,1,cn.TrackDel);return t==null||r==null?null:new gO(this.field,t,r)}}class yO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],l=e.doc.lineAt(t),h=/^\s*/.exec(l.text)[0];for(let A of this.lines){if(r.length){let _=h,B=/^\t*/.exec(A)[0].length;for(let q=0;qnew gO(A.field,i[A.line]+A.from,i[A.line]+A.to));return{text:r,ranges:C}}static parse(e){let t=[],r=[],i=[],l;for(let h of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(h);){let C=l[1]?+l[1]:null,A=l[2]||l[3]||"",_=-1,B=A.replace(/\\[{}]/g,q=>q[1]);for(let q=0;q=_&&Y.field++}i.push(new FZ(_,r.length,l.index,l.index+B.length)),h=h.slice(0,l.index)+A+h.slice(l.index+l[0].length)}h=h.replace(/\\([{}])/g,(C,A,_)=>{for(let B of i)B.line==r.length&&B.from>_&&(B.from--,B.to--);return A}),r.push(h)}return new yO(r,i)}}let _Z=Ht.widget({widget:new class extends si{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),BZ=Ht.mark({class:"cm-snippetField"});class io{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ht.set(e.map(r=>(r.from==r.to?_Z:BZ).range(r.from,r.to)))}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new io(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Sl=sr.define({map(n,e){return n&&n.map(e)}}),LZ=sr.define(),ul=Hr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Sl))return t.value;if(t.is(LZ)&&n)return new io(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Mt.decorations.from(n,e=>e?e.deco:Ht.none)});function bO(n,e){return gt.create(n.filter(t=>t.field==e).map(t=>gt.range(t.from,t.to)))}function NZ(n){let e=yO.parse(n);return(t,r,i,l)=>{let{text:h,ranges:C}=e.instantiate(t.state,i),A={changes:{from:i,to:l,insert:Or.of(h)},scrollIntoView:!0,annotations:r?[dO.of(r),Xr.userEvent.of("input.complete")]:void 0};if(C.length&&(A.selection=bO(C,0)),C.some(_=>_.field>0)){let _=new io(C,0),B=A.effects=[Sl.of(_)];t.state.field(ul,!1)===void 0&&B.push(sr.appendConfig.of([ul,QZ,UZ,EB]))}t.dispatch(t.state.update(A))}}function CB(n){return({state:e,dispatch:t})=>{let r=e.field(ul,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,l=n>0&&!r.ranges.some(h=>h.field==i+n);return t(e.update({selection:bO(r.ranges,i),effects:Sl.of(l?null:new io(r.ranges,i)),scrollIntoView:!0})),!0}}const MZ=({state:n,dispatch:e})=>n.field(ul,!1)?(e(n.update({effects:Sl.of(null)})),!0):!1,$Z=CB(1),jZ=CB(-1),qZ=[{key:"Tab",run:$Z,shift:jZ},{key:"Escape",run:MZ}],kI=$t.define({combine(n){return n.length?n[0]:qZ}}),QZ=_i.highest(gl.compute([kI],n=>n.facet(kI)));function Fn(n,e){return Object.assign(Object.assign({},e),{apply:NZ(n)})}const UZ=Mt.domEventHandlers({mousedown(n,e){let t=e.state.field(ul,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:bO(t.ranges,i.field),effects:Sl.of(t.ranges.some(l=>l.field>i.field)?new io(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ra=sr.define({map(n,e){let t=e.mapPos(n,-1,cn.TrackAfter);return t??void 0}}),vO=new class extends aa{};vO.startSide=1;vO.endSide=-1;const wB=Hr.define({create(){return gr.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ra)&&(n=n.update({add:[vO.range(t.value,t.value+1)]}));return n}});function VZ(){return[GZ,wB]}const cv="()[]{}<>";function kB(n){for(let e=0;e{if((WZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Kn(ln(r,0))==1||e!=i.from||t!=i.to)return!1;let l=XZ(n.state,r);return l?(n.dispatch(l),!0):!1}),zZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=AB(n,n.selection.main.head).brackets||cl.brackets,i=null,l=n.changeByRange(h=>{if(h.empty){let C=YZ(n.doc,h.head);for(let A of r)if(A==C&&Rc(n.doc,h.head)==kB(ln(A,0)))return{changes:{from:h.head-A.length,to:h.head+A.length},range:gt.cursor(h.head-A.length)}}return{range:i=h}});return i||e(n.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},ZZ=[{key:"Backspace",run:zZ}];function XZ(n,e){let t=AB(n,n.selection.main.head),r=t.brackets||cl.brackets;for(let i of r){let l=kB(ln(i,0));if(e==i)return l==i?JZ(n,i,r.indexOf(i+i+i)>-1,t):HZ(n,i,l,t.before||cl.before);if(e==l&&PB(n,n.selection.main.from))return KZ(n,i,l)}return null}function PB(n,e){let t=!1;return n.field(wB).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Rc(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Kn(ln(t,0)))}function YZ(n,e){let t=n.sliceString(e-2,e);return Kn(ln(t,0))==t.length?t:t.slice(1)}function HZ(n,e,t,r){let i=null,l=n.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:t,from:h.to}],effects:ra.of(h.to+e.length),range:gt.range(h.anchor+e.length,h.head+e.length)};let C=Rc(n.doc,h.head);return!C||/\s/.test(C)||r.indexOf(C)>-1?{changes:{insert:e+t,from:h.head},effects:ra.of(h.head+e.length),range:gt.cursor(h.head+e.length)}:{range:i=h}});return i?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function KZ(n,e,t){let r=null,i=n.changeByRange(l=>l.empty&&Rc(n.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:gt.cursor(l.head+t.length)}:r={range:l});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function JZ(n,e,t,r){let i=r.stringPrefixes||cl.stringPrefixes,l=null,h=n.changeByRange(C=>{if(!C.empty)return{changes:[{insert:e,from:C.from},{insert:e,from:C.to}],effects:ra.of(C.to+e.length),range:gt.range(C.anchor+e.length,C.head+e.length)};let A=C.head,_=Rc(n.doc,A),B;if(_==e){if(AI(n,A))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(PB(n,A)){let Y=t&&n.sliceDoc(A,A+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:A,to:A+Y.length,insert:Y},range:gt.cursor(A+Y.length)}}}else{if(t&&n.sliceDoc(A-2*e.length,A)==e+e&&(B=PI(n,A-2*e.length,i))>-1&&AI(n,B))return{changes:{insert:e+e+e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)};if(n.charCategorizer(A)(_)!=Br.Word&&PI(n,A,i)>-1&&!eX(n,A,e,i))return{changes:{insert:e+e,from:A},effects:ra.of(A+e.length),range:gt.cursor(A+e.length)}}return{range:l=C}});return l?null:n.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function AI(n,e){let t=nn(n).resolveInner(e+1);return t.parent&&t.from==e}function eX(n,e,t,r){let i=nn(n).resolveInner(e,-1),l=r.reduce((h,C)=>Math.max(h,C.length),0);for(let h=0;h<5;h++){let C=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+l)),A=C.indexOf(t);if(!A||A>-1&&r.indexOf(C.slice(0,A))>-1){let B=i.firstChild;for(;B&&B.from==i.from&&B.to-B.from>t.length+A;){if(n.sliceDoc(B.to-t.length,B.to)==t)return!1;B=B.firstChild}return!0}let _=i.to==e&&i.parent;if(!_)break;i=_}return!1}function PI(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Br.Word)return e;for(let i of t){let l=e-i.length;if(n.sliceDoc(l,e)==i&&r(n.sliceDoc(l-1,l))!=Br.Word)return l}return-1}function tX(n={}){return[RZ,Bn,fn.of(n),DZ,rX,EB]}const TB=[{key:"Ctrl-Space",run:wI},{mac:"Alt-`",run:wI},{key:"Escape",run:kZ},{key:"ArrowDown",run:Ou(!0)},{key:"ArrowUp",run:Ou(!1)},{key:"PageDown",run:Ou(!0,"page")},{key:"PageUp",run:Ou(!1,"page")},{key:"Enter",run:wZ}],rX=_i.highest(gl.computeN([fn],n=>n.facet(fn).defaultKeymap?[TB]:[]));class nX{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Ki{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,l=r.facet(Ls).markerFilter;l&&(i=l(i,r));let h=Ht.set(i.map(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from?Ht.widget({widget:new hX(C),diagnostic:C}).range(C.from):Ht.mark({attributes:{class:"cm-lintRange cm-lintRange-"+C.severity+(C.markClass?" "+C.markClass:"")},diagnostic:C}).range(C.from,C.to)),!0);return new Ki(h,t,Ya(h))}}function Ya(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,l,{spec:h})=>{if(!(e&&h.diagnostic!=e))return r=new nX(i,l,h.diagnostic),!1}),r}function DB(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(Ls).hideOn(n,t,r);if(i!=null)return i;let l=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(h=>h.is(Fc))||n.changes.touchesRange(l.from,Math.max(l.to,r)))}function IB(n,e){return n.field(Gn,!1)?e:e.concat(sr.appendConfig.of(MB))}function sX(n,e){return{effects:IB(n,[Fc.of(e)])}}const Fc=sr.define(),xO=sr.define(),RB=sr.define(),Gn=Hr.define({create(){return new Ki(Ht.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let l=e.changes.mapPos(n.selected.from,1);r=Ya(t,n.selected.diagnostic,l)||Ya(t,null,l)}!t.size&&i&&e.state.facet(Ls).autoPanel&&(i=null),n=new Ki(t,i,r)}for(let t of e.effects)if(t.is(Fc)){let r=e.state.facet(Ls).autoPanel?t.value.length?fl.open:null:n.panel;n=Ki.init(t.value,r,e.state)}else t.is(xO)?n=new Ki(n.diagnostics,t.value?fl.open:null,n.selected):t.is(RB)&&(n=new Ki(n.diagnostics,n.panel,t.value));return n},provide:n=>[sl.from(n,e=>e.panel),Mt.decorations.from(n,e=>e.diagnostics)]}),iX=Ht.mark({class:"cm-lintRange cm-lintRange-active"});function aX(n,e,t){let{diagnostics:r}=n.state.field(Gn),i=[],l=2e8,h=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(A,_,{spec:B})=>{e>=A&&e<=_&&(A==_||(e>A||t>0)&&(e<_||t<0))&&(i.push(B.diagnostic),l=Math.min(A,l),h=Math.max(_,h))});let C=n.state.facet(Ls).tooltipFilter;return C&&(i=C(i,n.state)),i.length?{pos:l,end:h,above:n.state.doc.lineAt(l).toBB(n,t,!1)))}const oX=n=>{let e=n.state.field(Gn,!1);(!e||!e.panel)&&n.dispatch({effects:IB(n.state,[xO.of(!0)])});let t=nl(n,fl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},TI=n=>{let e=n.state.field(Gn,!1);return!e||!e.panel?!1:(n.dispatch({effects:xO.of(!1)}),!0)},lX=n=>{let e=n.state.field(Gn,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uX=[{key:"Mod-Shift-m",run:oX,preventDefault:!0},{key:"F8",run:lX}],cX=Ur.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Ls);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(nPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(sX(this.view.state,r.reduce((i,l)=>i.concat(l))))},r=>{Tn(this.view.state,r)})}}update(n){let e=n.state.facet(Ls);(n.docChanged||e!=n.startState.facet(Ls)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function fX(n,e,t){let r=[],i=-1;for(let l of n)l.then(h=>{r.push(h),clearTimeout(i),r.length==n.length?e(r):setTimeout(()=>e(r),200)},t)}const Ls=$t.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bs(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function pX(n,e={}){return[Ls.of({source:n,config:e}),cX,MB]}function _B(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;rl.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function BB(n,e,t){var r;let i=t?_B(e.actions):[];return Tr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((l,h)=>{let C=!1,A=Y=>{if(Y.preventDefault(),C)return;C=!0;let ie=Ya(n.state.field(Gn).diagnostics,e);ie&&l.apply(n,ie.from,ie.to)},{name:_}=l,B=i[h]?_.indexOf(i[h]):-1,q=B<0?_:[_.slice(0,B),Tr("u",_.slice(B,B+1)),_.slice(B+1)];return Tr("button",{type:"button",class:"cm-diagnosticAction",onclick:A,onmousedown:A,"aria-label":` Action: ${_}${B<0?"":` (access key "${i[h]})"`}.`},q)}),e.source&&Tr("div",{class:"cm-diagnosticSource"},e.source))}class hX extends si{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class DI{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=BB(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)TI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],h=_B(l.actions);for(let C=0;C{for(let l=0;lTI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let t=0;t{let _=-1,B;for(let q=r;qr&&(this.items.splice(r,_-r),i=!0)),t&&B.diagnostic==t.diagnostic?B.dom.hasAttribute("aria-selected")||(B.dom.setAttribute("aria-selected","true"),l=B):B.dom.hasAttribute("aria-selected")&&B.dom.removeAttribute("aria-selected"),r++});r({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:C})=>{let A=C.height/this.list.offsetHeight;h.topC.bottom&&(this.list.scrollTop+=(h.bottom-C.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Gn),r=Ya(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:RB.of(r)})}static open(e){return new fl(e)}}function _u(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Su(n){return _u(``,'width="6" height="3"')}const dX=Mt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function II(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}class LB extends js{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce((t,r)=>II(t)gX(e,t,r)),t}}function mX(n,e){let t=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mX(n,e)}let{hoverTime:i}=n.state.facet(_c),l=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(l),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(l),l=setTimeout(r,i)}}function yX(n,e){let t=Object.create(null);for(let i of e){let l=n.lineAt(i.from);(t[l.from]||(t[l.from]=[])).push(i)}let r=[];for(let i in t)r.push(new LB(t[i]).range(+i));return gr.of(r,!0)}const bX=e_({class:"cm-gutter-lint",markers:n=>n.state.field(yx),widgetMarker:(n,e,t)=>{let r=[];return n.state.field(yx).between(t.from,t.to,(i,l,h)=>{r.push(...h.diagnostics)}),r.length?new LB(r):null}}),yx=Hr.define({create(){return gr.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(_c).markerFilter;for(let r of e.effects)if(r.is(Fc)){let i=r.value;t&&(i=t(i||[],e.state)),n=yX(e.state.doc,i.slice(0))}return n}}),OO=sr.define(),NB=Hr.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=DB(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,r)=>r.is(OO)?r.value:t,n)},provide:n=>Ec.from(n)}),vX=Mt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:_u('')},".cm-lint-marker-warning":{content:_u('')},".cm-lint-marker-error":{content:_u('')}}),MB=[Gn,Mt.decorations.compute([Gn],n=>{let{selected:e,panel:t}=n.field(Gn);return!e||!t||e.from==e.to?Ht.none:Ht.set([iX.range(e.from,e.to)])}),rW(aX,{hideOn:DB}),dX],_c=$t.define({combine(n){return bs(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function xX(n={}){return[_c.of(n),yx,bX,vX,NB]}const OX=(()=>[pW(),mW(),F7(),RG(),iG(),S7(),A7(),Sr.allowMultipleSelections.of(!0),WW(),C_(uG,{fallback:!0}),gG(),VZ(),tX(),W7(),Z7(),$7(),Mz(),gl.of([...ZZ,...Rz,...nZ,...qG,...tG,...TB,...uX])])();class fc{constructor(e,t,r,i,l,h,C,A,_,B=0,q){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=l,this.score=h,this.buffer=C,this.bufferBase=A,this.curContext=_,this.lookAhead=B,this.parent=q}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new fc(e,[],t,r,r,0,[],0,i?new RI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:l}=this.p,h=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(_==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=B):this.p.lastBigReductionSizeA;)this.stack.pop();this.reduceContext(i,_)}storeNode(e,t,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&h.buffer[C-4]==0&&h.buffer[C-1]>-1){if(t==r)return;if(h.buffer[C-2]>=t){h.buffer[C-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,t,r,i);else{let h=this.buffer.length;if(h>0&&this.buffer[h-4]!=0){let C=!1;for(let A=h;A>0&&this.buffer[A-2]>r;A-=4)if(this.buffer[A-1]>=0){C=!0;break}if(C)for(;h>0&&this.buffer[h-2]>r;)this.buffer[h]=this.buffer[h-4],this.buffer[h+1]=this.buffer[h-3],this.buffer[h+2]=this.buffer[h-2],this.buffer[h+3]=this.buffer[h-1],h-=4,i>4&&(i-=4)}this.buffer[h]=e,this.buffer[h+1]=t,this.buffer[h+2]=r,this.buffer[h+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4);else{let l=e,{parser:h}=this.p;(i>this.pos||t<=h.maxNode)&&(this.pos=i,h.stateFlag(l,1)||(this.reducePos=i)),this.pushState(l,r),this.shiftContext(t,r),t<=h.maxNode&&this.buffer.push(t,r,i,4)}}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new fc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new SX(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if(!(r&65536))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let l=0,h;lA&1&&C==h)||i.push(t[l],h)}t=i}let r=[];for(let i=0;i>19,i=t&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let h=this.findForcedReduction();if(h==null)return!1;t=h}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,l)=>{if(!t.includes(i))return t.push(i),e.allActions(i,h=>{if(!(h&393216))if(h&65536){let C=(h>>19)-l;if(C>1){let A=h&65535,_=this.stack.length-C*3;if(_>=0&&e.getGoto(this.stack[_],A,!1)>=0)return C<<19|65536|A}}else{let C=r(h,l+1);if(C!=null)return C}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RI{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class SX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class pc{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pc(this.stack,this.pos,this.index)}}function Qo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r=92&&h--,h>=34&&h--;let A=h-32;if(A>=46&&(A-=46,C=!0),l+=A,C)break;l*=46}t?t[i++]=l:t=new e(l)}return t}class Bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FI=new Bu;class EX{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;lr.to:l>=r.to;){if(i==this.ranges.length-1)return null;let h=this.ranges[++i];l+=h.from-r.to,r=h}return l}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t=this.chunk2Pos&&rC.to&&(this.chunk2=this.chunk2.slice(0,C.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=FI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class La{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;$B(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}La.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class bx{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Qo(e):e}token(e,t){let r=e.pos,i=0;for(;;){let l=e.next<0,h=e.resolveOffset(1,1);if($B(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,h==null)break;e.reset(h,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}bx.prototype.contextual=La.prototype.fallback=La.prototype.extend=!1;class El{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function $B(n,e,t,r,i,l){let h=0,C=1<0){let me=n[ie];if(A.allows(me)&&(e.token.value==-1||e.token.value==me||CX(me,e.token.value,i,l))){e.acceptToken(me);break}}let B=e.next,q=0,Y=n[h+2];if(e.next<0&&Y>q&&n[_+Y*3-3]==65535){h=n[_+Y*3-1];continue e}for(;q>1,me=_+ie+(ie<<1),_e=n[me],$e=n[me+1]||65536;if(B<_e)Y=ie;else if(B>=$e)q=ie+1;else{h=n[me+2],e.advance();continue e}}break}}function _I(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function CX(n,e,t,r){let i=_I(t,r,e);return i<0||_I(t,r,n)e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class wX{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=h,null;if(l instanceof Yr){if(h==e){if(h=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(h),this.index.push(0))}else this.index[t]++,this.nextStart=h+l.length}}}class kX{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Bu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,h=i.stateSlot(e.state,3),C=e.curContext?e.curContext.hash:0,A=0;for(let _=0;_q.end+25&&(A=Math.max(q.lookAhead,A)),q.value!=0)){let Y=t;if(q.extended>-1&&(t=this.addActions(e,q.extended,q.end,t)),t=this.addActions(e,q.value,q.end,t),!B.extend&&(r=q,t>Y))break}}for(;this.actions.length>t;)this.actions.pop();return A&&e.setLookAhead(A),!r&&e.pos==this.stream.end&&(r=new Bu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Bu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let h=0;h=0&&r.p.parser.dialect.allows(C>>1)){C&1?e.extended=C>>1:e.value=C>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let l=0;le.bufferLength*4?new wX(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[h]=e;for(;h.forceReduce()&&h.stack.length&&h.stack[h.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;ht)r.push(C);else{if(this.advanceStack(C,r,e))continue;{i||(i=[],l=[]),i.push(C);let A=this.tokens.getMainToken(C);l.push(A.value,A.end)}}break}}if(!r.length){let h=i&&DX(i);if(h)return Un&&console.log("Finish with "+this.stackID(h)),this.stackToTree(h);if(this.parser.strict)throw Un&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let h=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(h)return Un&&console.log("Force-finish "+this.stackID(h)),this.stackToTree(h.forceAll())}if(this.recovering){let h=this.recovering==1?1:this.recovering*3;if(r.length>h)for(r.sort((C,A)=>A.score-C.score);r.length>h;)r.pop();r.some(C=>C.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let h=0;h500&&_.buffer.length>500)if((C.score-_.score||C.buffer.length-_.buffer.length)>0)r.splice(A--,1);else{r.splice(h--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let h=1;h ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let _=e.curContext&&e.curContext.tracker.strict,B=_?e.curContext.hash:0;for(let q=this.fragments.nodeAt(i);q;){let Y=this.parser.nodeSet.types[q.type.id]==q.type?l.getGoto(e.state,q.type.id):-1;if(Y>-1&&q.length&&(!_||(q.prop(mr.contextHash)||0)==B))return e.useNode(q,Y),Un&&console.log(h+this.stackID(e)+` (via reuse of ${l.getName(q.type.id)})`),!0;if(!(q instanceof Yr)||q.children.length==0||q.positions[0]>0)break;let ie=q.children[0];if(ie instanceof Yr&&q.positions[0]==0)q=ie;else break}}let C=l.stateSlot(e.state,4);if(C>0)return e.reduce(C),Un&&console.log(h+this.stackID(e)+` (via always-reduce ${l.getName(C&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let A=this.tokens.getActions(e);for(let _=0;_i?t.push(me):r.push(me)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return LI(e,t),!0}}runRecovery(e,t,r){let i=null,l=!1;for(let h=0;h ":"";if(C.deadEnd&&(l||(l=!0,C.restart(),Un&&console.log(B+this.stackID(C)+" (restarted)"),this.advanceFully(C,r))))continue;let q=C.split(),Y=B;for(let ie=0;q.forceReduce()&&ie<10&&(Un&&console.log(Y+this.stackID(q)+" (via force-reduce)"),!this.advanceFully(q,r));ie++)Un&&(Y=this.stackID(q)+" -> ");for(let ie of C.recoverByInsert(A))Un&&console.log(B+this.stackID(ie)+" (via recover-insert)"),this.advanceFully(ie,r);this.stream.end>C.pos?(_==C.pos&&(_++,A=0),C.recoverByDelete(A,_),Un&&console.log(B+this.stackID(C)+` (via recover-delete ${this.parser.getName(A)})`),LI(C,r)):(!i||i.scoren;class TX{constructor(e){this.start=e.start,this.shift=e.shift||pv,this.reduce=e.reduce||pv,this.reuse=e.reuse||pv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class hc extends o_{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let C=0;Ce.topRules[C][1]),i=[];for(let C=0;C=0)l(B,A,C[_++]);else{let q=C[_+-B];for(let Y=-B;Y>0;Y--)l(C[_++],A,q);_++}}}this.nodeSet=new Jx(t.map((C,A)=>Mn.define({name:A>=this.minRepeatTerm?void 0:C,id:A,props:i[A],top:r.indexOf(A)>-1,error:A==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(A)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=n_;let h=Qo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let C=0;Ctypeof C=="number"?new La(h,C):C),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new AX(this,e,t,r);for(let l of this.wrappers)i=l(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let l=i[t+1];;){let h=i[l++],C=h&1,A=i[l++];if(C&&r)return A;for(let _=l+(h>>1);l<_;l++)if(i[l]==e)return A;if(C)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),h;;l+=3){if((h=r[l])==65535)if(r[l+1]==1)h=r[l=Hs(r,l+2)];else{if(r[l+1]==2)return Hs(r,l+2);break}if(h==t||h==0)return Hs(r,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Hs(this.data,l+2);else break;i=t(Hs(this.data,l+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Hs(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];t.some((l,h)=>h&1&&l==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(hc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(C=>C.from==r.external);if(!l)return r;let h=Object.assign(Object.assign({},r),{external:l.to});return t.specializers[i]=NI(h),h})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let l of e.split(" ")){let h=t.indexOf(l);h>=0&&(r[h]=!0)}let i=null;for(let l=0;lr)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,r)<<1|e}return n.get}const IX=312,RX=313,MI=1,FX=2,_X=3,BX=4,LX=314,NX=316,MX=317,$X=5,jX=6,qX=0,vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],jB=125,QX=59,xx=47,UX=42,VX=43,WX=45,GX=60,zX=44,ZX=63,XX=46,YX=91,HX=new TX({start:!1,shift(n,e){return e==$X||e==jX||e==NX?n:e==MX},strict:!1}),KX=new El((n,e)=>{let{next:t}=n;(t==jB||t==-1||e.context)&&n.acceptToken(LX)},{contextual:!0,fallback:!0}),JX=new El((n,e)=>{let{next:t}=n,r;vx.indexOf(t)>-1||t==xx&&((r=n.peek(1))==xx||r==UX)||t!=jB&&t!=QX&&t!=-1&&!e.context&&n.acceptToken(IX)},{contextual:!0}),eY=new El((n,e)=>{n.next==YX&&!e.context&&n.acceptToken(RX)},{contextual:!0}),tY=new El((n,e)=>{let{next:t}=n;if(t==VX||t==WX){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(MI);n.acceptToken(r?MI:FX)}}else t==ZX&&n.peek(1)==XX&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(_X))},{contextual:!0});function hv(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const rY=new El((n,e)=>{if(n.next!=GX||!e.dialectEnabled(qX)||(n.advance(),n.next==xx))return;let t=0;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(hv(n.next,!0)){for(n.advance(),t++;hv(n.next,!1);)n.advance(),t++;for(;vx.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zX)return;for(let r=0;;r++){if(r==7){if(!hv(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(BX,-t)}),nY=l_({"get set async static":re.modifier,"for while do if else switch try catch finally return throw break continue default case":re.controlKeyword,"in of await yield void typeof delete instanceof":re.operatorKeyword,"let var const using function class extends":re.definitionKeyword,"import export from":re.moduleKeyword,"with debugger as new":re.keyword,TemplateString:re.special(re.string),super:re.atom,BooleanLiteral:re.bool,this:re.self,null:re.null,Star:re.modifier,VariableName:re.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":re.function(re.variableName),VariableDefinition:re.definition(re.variableName),Label:re.labelName,PropertyName:re.propertyName,PrivatePropertyName:re.special(re.propertyName),"CallExpression/MemberExpression/PropertyName":re.function(re.propertyName),"FunctionDeclaration/VariableDefinition":re.function(re.definition(re.variableName)),"ClassDeclaration/VariableDefinition":re.definition(re.className),PropertyDefinition:re.definition(re.propertyName),PrivatePropertyDefinition:re.definition(re.special(re.propertyName)),UpdateOp:re.updateOperator,"LineComment Hashbang":re.lineComment,BlockComment:re.blockComment,Number:re.number,String:re.string,Escape:re.escape,ArithOp:re.arithmeticOperator,LogicOp:re.logicOperator,BitOp:re.bitwiseOperator,CompareOp:re.compareOperator,RegExp:re.regexp,Equals:re.definitionOperator,Arrow:re.function(re.punctuation),": Spread":re.punctuation,"( )":re.paren,"[ ]":re.squareBracket,"{ }":re.brace,"InterpolationStart InterpolationEnd":re.special(re.brace),".":re.derefOperator,", ;":re.separator,"@":re.meta,TypeName:re.typeName,TypeDefinition:re.definition(re.typeName),"type enum interface implements namespace module declare":re.definitionKeyword,"abstract global Privacy readonly override":re.modifier,"is keyof unique infer":re.operatorKeyword,JSXAttributeValue:re.attributeValue,JSXText:re.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":re.angleBracket,"JSXIdentifier JSXNameSpacedName":re.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":re.attributeName,"JSXBuiltin/JSXIdentifier":re.standard(re.tagName)}),sY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},iY={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},aY={__proto__:null,"<":187},oY=hc.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:HX,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[nY],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[JX,eY,tY,rY,2,3,4,5,6,7,8,9,10,11,12,13,14,KX,new bx("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new bx("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:n=>sY[n]||-1},{term:339,get:n=>iY[n]||-1},{term:92,get:n=>aY[n]||-1}],tokenPrec:15004}),qB=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lY=qB.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$I=new SW,QB=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bo(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const uY=["FunctionDeclaration"],cY={FunctionDeclaration:Bo("function"),ClassDeclaration:Bo("class"),ClassExpression:()=>!0,EnumDeclaration:Bo("constant"),TypeAliasDeclaration:Bo("type"),NamespaceDeclaration:Bo("namespace"),VariableDefinition(n,e){n.matchContext(uY)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function UB(n,e){let t=$I.get(e);if(t)return t;let r=[],i=!0;function l(h,C){let A=n.sliceString(h.from,h.to);r.push({label:A,type:C})}return e.cursor(rn.IncludeAnonymous).iterate(h=>{if(i)i=!1;else if(h.name){let C=cY[h.name];if(C&&C(h,l)||QB.has(h.name))return!1}else if(h.to-h.from>8192){for(let C of UB(n,h.node))r.push(C);return!1}}),$I.set(e,r),r}const jI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VB=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function fY(n){let e=nn(n.state).resolveInner(n.pos,-1);if(VB.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jI.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)QB.has(i.name)&&(r=r.concat(UB(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:jI}}const wi=Hu.define({name:"javascript",parser:oY.configure({props:[h_.add({IfStatement:rv({except:/^\s*({|else\b)/}),TryStatement:rv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:UW,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:QW({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":rv({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),g_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zW,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),WB={test:n=>/^JSX/.test(n.name),facet:f_({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pY=wi.configure({dialect:"ts"},"typescript"),hY=wi.configure({dialect:"jsx",props:[nO.add(n=>n.isTop?[WB]:void 0)]}),dY=wi.configure({dialect:"jsx ts",props:[nO.add(n=>n.isTop?[WB]:void 0)]},"typescript");let GB=n=>({label:n,type:"keyword"});const zB="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(GB),mY=zB.concat(["declare","implements","private","protected","public"].map(GB));function gY(n={}){let e=n.jsx?n.typescript?dY:hY:n.typescript?pY:wi,t=n.typescript?lY.concat(mY):qB.concat(zB);return new _W(e,[wi.data.of({autocomplete:lZ(VB,bB(t))}),wi.data.of({autocomplete:fY}),n.jsx?vY:[]])}function yY(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function qI(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vY=Mt.inputHandler.of((n,e,t,r,i)=>{if((bY?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!wi.isActiveAt(n.state,e,-1))return!1;let l=i(),{state:h}=l,C=h.changeByRange(A=>{var _;let{head:B}=A,q=nn(h).resolveInner(B-1,-1),Y;if(q.name=="JSXStartTag"&&(q=q.parent),!(h.doc.sliceString(B-1,B)!=r||q.name=="JSXAttributeValue"&&q.to>B)){if(r==">"&&q.name=="JSXFragmentTag")return{range:A,changes:{from:B,insert:""}};if(r=="/"&&q.name=="JSXStartCloseTag"){let ie=q.parent,me=ie.parent;if(me&&ie.from==B-2&&((Y=qI(h.doc,me.firstChild,B))||((_=me.firstChild)===null||_===void 0?void 0:_.name)=="JSXFragmentTag")){let _e=`${Y}>`;return{range:gt.cursor(B+_e.length,-1),changes:{from:B,insert:_e}}}}else if(r==">"){let ie=yY(q);if(ie&&ie.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(B,B+2))&&(Y=qI(h.doc,ie,B)))return{range:A,changes:{from:B,insert:``}}}}return{range:A}});return C.changes.empty?!1:(n.dispatch([l,h.update(C,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function xY(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{t.meta.docs.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:l,to:h}of wi.findRegions(r)){let C=r.doc.lineAt(l),A={line:C.number-1,col:l-C.from,pos:l};for(let _ of n.verify(r.sliceDoc(l,h),e))i.push(OY(_,r.doc,A))}return i}}function QI(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function OY(n,e,t){let r=QI(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?QI(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:l,text:h}=n.fix,C=l[0]+t.pos-r,A=l[1]+t.pos-r;i.actions=[{name:"fix",apply(_,B){_.dispatch({changes:{from:B+C,to:B+A,insert:h},scrollIntoView:!0})}}]}return i}var Ox={},SY={get exports(){return Ox},set exports(n){Ox=n}};const EY={define:!1,require:!1},CY={$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},wY={advanceClock:!1,atom:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},kY={AbortController:!1,AbortSignal:!1,AbsoluteOrientationSensor:!1,AbstractRange:!1,Accelerometer:!1,addEventListener:!1,ai:!1,AI:!1,AITextSession:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffect:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioData:!1,AudioDecoder:!1,AudioDestinationNode:!1,AudioEncoder:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioParamMap:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,AudioSinkInfo:!1,AudioWorklet:!1,AudioWorkletGlobalScope:!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,AuthenticatorAssertionResponse:!1,AuthenticatorAttestationResponse:!1,AuthenticatorResponse:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,Bluetooth:!1,BluetoothCharacteristicProperties:!1,BluetoothDevice:!1,BluetoothRemoteGATTCharacteristic:!1,BluetoothRemoteGATTDescriptor:!1,BluetoothRemoteGATTServer:!1,BluetoothRemoteGATTService:!1,BluetoothUUID:!1,blur:!1,BroadcastChannel:!1,BrowserCaptureMediaStreamTrack:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStream:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CaptureController:!1,CaretPosition:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,ChapterInformation:!1,CharacterBoundsUpdateEvent:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,Clipboard:!1,ClipboardEvent:!1,ClipboardItem:!1,close:!1,closed:!1,CloseEvent:!1,CloseWatcher:!1,Comment:!1,CompositionEvent:!1,CompressionStream:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ContentVisibilityAutoStateChangeEvent:!1,ConvolverNode:!1,CookieChangeEvent:!1,CookieDeprecationLabel:!1,cookieStore:!1,CookieStore:!1,CookieStoreManager:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,credentialless:!1,CredentialsContainer:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSConditionRule:!1,CSSContainerRule:!1,CSSCounterStyleRule:!1,CSSFontFaceRule:!1,CSSFontFeatureValuesRule:!1,CSSFontPaletteValuesRule:!1,CSSGroupingRule:!1,CSSImageValue:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSKeywordValue:!1,CSSLayerBlockRule:!1,CSSLayerStatementRule:!1,CSSMathClamp:!1,CSSMathInvert:!1,CSSMathMax:!1,CSSMathMin:!1,CSSMathNegate:!1,CSSMathProduct:!1,CSSMathSum:!1,CSSMathValue:!1,CSSMatrixComponent:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSNumericArray:!1,CSSNumericValue:!1,CSSPageDescriptors:!1,CSSPageRule:!1,CSSPerspective:!1,CSSPositionTryDescriptors:!1,CSSPositionTryRule:!1,CSSPositionValue:!1,CSSPropertyRule:!1,CSSRotate:!1,CSSRule:!1,CSSRuleList:!1,CSSScale:!1,CSSScopeRule:!1,CSSSkew:!1,CSSSkewX:!1,CSSSkewY:!1,CSSStartingStyleRule:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSStyleValue:!1,CSSSupportsRule:!1,CSSTransformComponent:!1,CSSTransformValue:!1,CSSTransition:!1,CSSTranslate:!1,CSSUnitValue:!1,CSSUnparsedValue:!1,CSSVariableReferenceValue:!1,CSSViewTransitionRule:!1,currentFrame:!1,currentTime:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,CustomStateSet:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,DecompressionStream:!1,DelayNode:!1,DelegatedInkTrailPresenter:!1,DeviceMotionEvent:!1,DeviceMotionEventAcceleration:!1,DeviceMotionEventRotationRate:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,documentPictureInPicture:!1,DocumentPictureInPicture:!1,DocumentPictureInPictureEvent:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectList:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,EditContext:!1,Element:!1,ElementInternals:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,event:!1,Event:!1,EventCounts:!1,EventSource:!1,EventTarget:!1,external:!1,External:!1,EyeDropper:!1,FeaturePolicy:!1,FederatedCredential:!1,fence:!1,Fence:!1,FencedFrameConfig:!1,fetch:!1,fetchLater:!1,FetchLaterResult:!1,File:!1,FileList:!1,FileReader:!1,FileSystem:!1,FileSystemDirectoryEntry:!1,FileSystemDirectoryHandle:!1,FileSystemDirectoryReader:!1,FileSystemEntry:!1,FileSystemFileEntry:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemWritableFileStream:!1,find:!1,Float16Array:!1,focus:!1,FocusEvent:!1,FontData:!1,FontFace:!1,FontFaceSet:!1,FontFaceSetLoadEvent:!1,FormData:!1,FormDataEvent:!1,FragmentDirective:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadAxisMoveEvent:!1,GamepadButton:!1,GamepadButtonEvent:!1,GamepadEvent:!1,GamepadHapticActuator:!1,GamepadPose:!1,Geolocation:!1,GeolocationCoordinates:!1,GeolocationPosition:!1,GeolocationPositionError:!1,getComputedStyle:!1,getScreenDetails:!1,getSelection:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,GravitySensor:!1,Gyroscope:!1,HashChangeEvent:!1,Headers:!1,HID:!1,HIDConnectionEvent:!1,HIDDevice:!1,HIDInputReportEvent:!1,Highlight:!1,HighlightRegistry:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFencedFrameElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdentityCredential:!1,IdentityCredentialError:!1,IdentityProvider:!1,IdleDeadline:!1,IdleDetector:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,indexedDB:!1,Ink:!1,innerHeight:!1,innerWidth:!1,InputDeviceCapabilities:!1,InputDeviceInfo:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,isSecureContext:!1,Iterator:!1,Keyboard:!1,KeyboardEvent:!1,KeyboardLayoutMap:!1,KeyframeEffect:!1,LargestContentfulPaint:!1,LaunchParams:!1,launchQueue:!1,LaunchQueue:!1,LayoutShift:!1,LayoutShiftAttribution:!1,length:!1,LinearAccelerationSensor:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,Lock:!1,LockManager:!1,matchMedia:!1,MathMLElement:!1,MediaCapabilities:!1,MediaCapabilitiesInfo:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaMetadata:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaRecorderErrorEvent:!1,MediaSession:!1,MediaSource:!1,MediaSourceHandle:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackAudioSourceNode:!1,MediaStreamTrackAudioStats:!1,MediaStreamTrackEvent:!1,MediaStreamTrackGenerator:!1,MediaStreamTrackProcessor:!1,MediaStreamTrackVideoStats:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,model:!1,ModelGenericSession:!1,ModelManager:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigateEvent:!1,navigation:!1,Navigation:!1,NavigationActivation:!1,NavigationCurrentEntryChangeEvent:!1,NavigationDestination:!1,NavigationHistoryEntry:!1,NavigationPreloadManager:!1,NavigationTransition:!1,navigator:!1,Navigator:!1,NavigatorLogin:!1,NavigatorManagedData:!1,NavigatorUAData:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,NotifyPaintEvent:!1,NotRestoredReasonDetails:!1,NotRestoredReasons:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onabort:!0,onafterprint:!0,onanimationcancel:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinput:!0,onbeforeinstallprompt:!0,onbeforematch:!0,onbeforeprint:!0,onbeforetoggle:!0,onbeforeunload:!0,onbeforexrselect:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontentvisibilityautostatechange:!0,oncontextlost:!0,oncontextmenu:!0,oncontextrestored:!0,oncopy:!0,oncuechange:!0,oncut:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,onformdata:!0,ongamepadconnected:!0,ongamepaddisconnected:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpagereveal:!0,onpageshow:!0,onpageswap:!0,onpaste:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerrawupdate:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onscrollend:!0,onscrollsnapchange:!0,onscrollsnapchanging:!0,onsearch:!0,onsecuritypolicyviolation:!0,onseeked:!0,onseeking:!0,onselect:!0,onselectionchange:!0,onselectstart:!0,onslotchange:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitioncancel:!0,ontransitionend:!0,ontransitionrun:!0,ontransitionstart:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,opener:!1,Option:!1,OrientationSensor:!1,origin:!1,originAgentCluster:!1,OscillatorNode:!1,OTPCredential:!1,outerHeight:!1,outerWidth:!1,OverconstrainedError:!1,PageRevealEvent:!1,PageSwapEvent:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,PasswordCredential:!1,Path2D:!1,PaymentAddress:!1,PaymentManager:!1,PaymentMethodChangeEvent:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceElementTiming:!1,PerformanceEntry:!1,PerformanceEventTiming:!1,PerformanceLongAnimationFrameTiming:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceScriptTiming:!1,PerformanceServerTiming:!1,PerformanceTiming:!1,PeriodicSyncManager:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,personalbar:!1,PictureInPictureEvent:!1,PictureInPictureWindow:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,PressureObserver:!1,PressureRecord:!1,print:!1,ProcessingInstruction:!1,Profiler:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,ProtectedAudience:!1,PublicKeyCredential:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queryLocalFonts:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registerProcessor:!1,RelativeOrientationSensor:!1,RemotePlayback:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,ResizeObserverSize:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCDTMFSender:!1,RTCDTMFToneChangeEvent:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,RTCError:!1,RTCErrorEvent:!1,RTCIceCandidate:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceErrorEvent:!1,RTCPeerConnectionIceEvent:!1,RTCRtpReceiver:!1,RTCRtpScriptTransform:!1,RTCRtpSender:!1,RTCRtpTransceiver:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,sampleRate:!1,scheduler:!1,Scheduler:!1,Scheduling:!1,screen:!1,Screen:!1,ScreenDetailed:!1,ScreenDetails:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,ScrollTimeline:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,Sensor:!1,SensorErrorEvent:!1,Serial:!1,SerialPort:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,sharedStorage:!1,SharedStorage:!1,SharedStorageWorklet:!1,SharedWorker:!1,showDirectoryPicker:!1,showOpenFilePicker:!1,showSaveFilePicker:!1,SnapEvent:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesis:!1,SpeechSynthesisErrorEvent:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,SpeechSynthesisVoice:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageBucket:!1,StorageBucketManager:!1,StorageEvent:!1,StorageManager:!1,structuredClone:!1,styleMedia:!1,StylePropertyMap:!1,StylePropertyMapReadOnly:!1,StyleSheet:!1,StyleSheetList:!1,SubmitEvent:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,SyncManager:!1,TaskAttributionTiming:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,Text:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextEvent:!1,TextFormat:!1,TextFormatUpdateEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TextUpdateEvent:!1,TimeEvent:!1,TimeRanges:!1,ToggleEvent:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransformStream:!1,TransformStreamDefaultController:!1,TransitionEvent:!1,TreeWalker:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,UIEvent:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,ValidityState:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,VideoPlaybackQuality:!1,ViewTimeline:!1,ViewTransition:!1,ViewTransitionTypeSet:!1,VirtualKeyboard:!1,VirtualKeyboardGeometryChangeEvent:!1,VisibilityStateEntry:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,VTTRegion:!1,WakeLock:!1,WakeLockSentinel:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WebTransportReceiveStream:!1,WebTransportSendStream:!1,WGSLLanguageFeatures:!1,WheelEvent:!1,window:!1,Window:!1,WindowControlsOverlay:!1,WindowControlsOverlayGeometryChangeEvent:!1,Worker:!1,Worklet:!1,WorkletGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XRAnchor:!1,XRAnchorSet:!1,XRBoundedReferenceSpace:!1,XRCamera:!1,XRCPUDepthInformation:!1,XRDepthInformation:!1,XRDOMOverlayState:!1,XRFrame:!1,XRHitTestResult:!1,XRHitTestSource:!1,XRInputSource:!1,XRInputSourceArray:!1,XRInputSourceEvent:!1,XRInputSourcesChangeEvent:!1,XRLayer:!1,XRLightEstimate:!1,XRLightProbe:!1,XRPose:!1,XRRay:!1,XRReferenceSpace:!1,XRReferenceSpaceEvent:!1,XRRenderState:!1,XRRigidTransform:!1,XRSession:!1,XRSessionEvent:!1,XRSpace:!1,XRSystem:!1,XRTransientInputHitTestResult:!1,XRTransientInputHitTestSource:!1,XRView:!1,XRViewerPose:!1,XRViewport:!1,XRWebGLBinding:!1,XRWebGLDepthInformation:!1,XRWebGLLayer:!1,XSLTProcessor:!1},AY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},PY={assert:!0,expect:!0,should:!0},TY={exports:!0,global:!1,module:!1,require:!1},DY={emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},IY={$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1},RY={andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},FY={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},_Y={Array:!1,ArrayBuffer:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},BY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},LY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},NY={Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},MY={Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakSet:!1},$Y={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},jY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},qY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},QY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},UY={AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Intl:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1},VY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},WY={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,Infinity:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1},GY={cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addElement:!1,GM_addStyle:!1,GM_addValueChangeListener:!1,GM_deleteValue:!1,GM_download:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getTab:!1,GM_getTabs:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_notification:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_removeValueChangeListener:!1,GM_saveTab:!1,GM_setClipboard:!1,GM_setValue:!1,GM_unregisterMenuCommand:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},zY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,expectAsync:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnAllFunctions:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},ZY={afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fit:!1,it:!1,jest:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},XY={$:!1,jQuery:!1},YY={$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},HY={after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},KY={_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},JY={__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},eH={__dirname:!1,__filename:!1,AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,exports:!0,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,module:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,require:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},tH={AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Buffer:!1,ByteLengthQueuingStrategy:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,global:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,process:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},rH={console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},nH={$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},sH={$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},iH={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},aH={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},oH={addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,ErrorEvent:!1,Event:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,File:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1},lH={cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,head:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,ShellString:!1,sort:!1,tail:!1,tempdir:!1,test:!1,touch:!1,uniq:!1,which:!1},uH={browser:!1,chrome:!1,opr:!1},cH={AbortController:!1,AbortSignal:!1,addEventListener:!1,ai:!1,atob:!1,AudioData:!1,AudioDecoder:!1,AudioEncoder:!1,BackgroundFetchManager:!1,BackgroundFetchRecord:!1,BackgroundFetchRegistration:!1,BarcodeDetector:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,clearInterval:!1,clearTimeout:!1,close:!1,CloseEvent:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,createImageBitmap:!1,CropTarget:!1,crossOriginIsolated:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSSSkewX:!1,CSSSkewY:!1,CustomEvent:!1,DecompressionStream:!1,DedicatedWorkerGlobalScope:!1,dispatchEvent:!1,DOMException:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,EncodedAudioChunk:!1,EncodedVideoChunk:!1,ErrorEvent:!1,Event:!1,EventSource:!1,EventTarget:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FileReaderSync:!1,FileSystemDirectoryHandle:!1,FileSystemFileHandle:!1,FileSystemHandle:!1,FileSystemSyncAccessHandle:!1,FileSystemWritableFileStream:!1,FontFace:!1,fonts:!1,FormData:!1,GPU:!1,GPUAdapter:!1,GPUAdapterInfo:!1,GPUBindGroup:!1,GPUBindGroupLayout:!1,GPUBuffer:!1,GPUBufferUsage:!1,GPUCanvasContext:!1,GPUColorWrite:!1,GPUCommandBuffer:!1,GPUCommandEncoder:!1,GPUCompilationInfo:!1,GPUCompilationMessage:!1,GPUComputePassEncoder:!1,GPUComputePipeline:!1,GPUDevice:!1,GPUDeviceLostInfo:!1,GPUError:!1,GPUExternalTexture:!1,GPUInternalError:!1,GPUMapMode:!1,GPUOutOfMemoryError:!1,GPUPipelineError:!1,GPUPipelineLayout:!1,GPUQuerySet:!1,GPUQueue:!1,GPURenderBundle:!1,GPURenderBundleEncoder:!1,GPURenderPassEncoder:!1,GPURenderPipeline:!1,GPUSampler:!1,GPUShaderModule:!1,GPUShaderStage:!1,GPUSupportedFeatures:!1,GPUSupportedLimits:!1,GPUTexture:!1,GPUTextureUsage:!1,GPUTextureView:!1,GPUUncapturedErrorEvent:!1,GPUValidationError:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDetector:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageData:!1,ImageDecoder:!1,ImageTrack:!1,ImageTrackList:!1,importScripts:!1,indexedDB:!1,isSecureContext:!1,Iterator:!1,location:!1,Lock:!1,LockManager:!1,MediaCapabilities:!1,MediaSource:!1,MediaSourceHandle:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,name:!1,NavigationPreloadManager:!1,navigator:!1,NavigatorUAData:!1,NetworkInformation:!1,Notification:!1,OffscreenCanvas:!1,OffscreenCanvasRenderingContext2D:!1,onerror:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onrejectionhandled:!0,onunhandledrejection:!0,origin:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,PerformanceServerTiming:!1,PeriodicSyncManager:!1,Permissions:!1,PermissionStatus:!1,PERSISTENT:!1,postMessage:!1,PressureObserver:!1,PressureRecord:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,removeEventListener:!1,reportError:!1,ReportingObserver:!1,Request:!1,requestAnimationFrame:!1,Response:!1,RTCEncodedAudioFrame:!1,RTCEncodedVideoFrame:!1,scheduler:!1,Scheduler:!1,SecurityPolicyViolationEvent:!1,self:!1,Serial:!1,SerialPort:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,SourceBuffer:!1,SourceBufferList:!1,StorageBucket:!1,StorageBucketManager:!1,StorageManager:!1,structuredClone:!1,SubtleCrypto:!1,SyncManager:!1,TaskController:!1,TaskPriorityChangeEvent:!1,TaskSignal:!1,TEMPORARY:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TextMetrics:!1,TransformStream:!1,TransformStreamDefaultController:!1,TrustedHTML:!1,TrustedScript:!1,TrustedScriptURL:!1,TrustedTypePolicy:!1,TrustedTypePolicyFactory:!1,trustedTypes:!1,URL:!1,URLPattern:!1,URLSearchParams:!1,USB:!1,USBAlternateInterface:!1,USBConfiguration:!1,USBConnectionEvent:!1,USBDevice:!1,USBEndpoint:!1,USBInterface:!1,USBInTransferResult:!1,USBIsochronousInTransferPacket:!1,USBIsochronousInTransferResult:!1,USBIsochronousOutTransferPacket:!1,USBIsochronousOutTransferResult:!1,USBOutTransferResult:!1,UserActivation:!1,VideoColorSpace:!1,VideoDecoder:!1,VideoEncoder:!1,VideoFrame:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLObject:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,webkitRequestFileSystem:!1,webkitRequestFileSystemSync:!1,webkitResolveLocalFileSystemSyncURL:!1,webkitResolveLocalFileSystemURL:!1,WebSocket:!1,WebSocketError:!1,WebSocketStream:!1,WebTransport:!1,WebTransportBidirectionalStream:!1,WebTransportDatagramDuplexStream:!1,WebTransportError:!1,WGSLLanguageFeatures:!1,Worker:!1,WorkerGlobalScope:!1,WorkerLocation:!1,WorkerNavigator:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1},fH={ActiveXObject:!1,CollectGarbage:!1,Debug:!1,Enumerator:!1,GetObject:!1,RuntimeObject:!1,ScriptEngine:!1,ScriptEngineBuildVersion:!1,ScriptEngineMajorVersion:!1,ScriptEngineMinorVersion:!1,VBArray:!1,WScript:!1,WSH:!1},pH={YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},hH={amd:EY,applescript:CY,atomtest:wY,browser:kY,builtin:AY,chai:PY,commonjs:TY,couch:DY,devtools:IY,embertest:RY,es2015:FY,es2016:_Y,es2017:BY,es2018:LY,es2019:NY,es2020:MY,es2021:$Y,es2022:jY,es2023:qY,es2024:QY,es2025:UY,es3:VY,es5:WY,greasemonkey:GY,jasmine:zY,jest:ZY,jquery:XY,meteor:YY,mocha:HY,mongo:KY,nashorn:JY,node:eH,nodeBuiltin:tH,phantomjs:rH,prototypejs:nH,protractor:sH,qunit:iH,rhino:aH,serviceworker:oH,"shared-node-browser":{AbortController:!1,AbortSignal:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,ByteLengthQueuingStrategy:!1,clearInterval:!1,clearTimeout:!1,CompressionStream:!1,console:!1,CountQueuingStrategy:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CustomEvent:!1,DecompressionStream:!1,DOMException:!1,Event:!1,EventTarget:!1,fetch:!1,File:!1,FormData:!1,Headers:!1,Iterator:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,navigator:!1,Navigator:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformanceResourceTiming:!1,queueMicrotask:!1,ReadableByteStreamController:!1,ReadableStream:!1,ReadableStreamBYOBReader:!1,ReadableStreamBYOBRequest:!1,ReadableStreamDefaultController:!1,ReadableStreamDefaultReader:!1,Request:!1,Response:!1,setInterval:!1,setTimeout:!1,structuredClone:!1,SubtleCrypto:!1,TextDecoder:!1,TextDecoderStream:!1,TextEncoder:!1,TextEncoderStream:!1,TransformStream:!1,TransformStreamDefaultController:!1,URL:!1,URLSearchParams:!1,WebAssembly:!1,WebSocket:!1,WritableStream:!1,WritableStreamDefaultController:!1,WritableStreamDefaultWriter:!1},shelljs:lH,webextensions:uH,worker:cH,wsh:fH,yui:pH};(function(n){n.exports=hH})(SY);const dH=E9(Ox);var dc={},mH={get exports(){return dc},set exports(n){dc=n}},dv,UI;function gH(){return UI||(UI=1,dv={stdout:!1,stderr:!1}),dv}(function(n,e){(function(t,r){r(e)})(gi,function(t){if(!r)var r=globalThis||window;function i(c){return c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var l={},h=typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{};function C(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}var _=C,B=A;typeof h.setTimeout=="function"&&(_=setTimeout),typeof h.clearTimeout=="function"&&(B=clearTimeout);function q(c){if(_===setTimeout)return setTimeout(c,0);if((_===C||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Y(c){if(B===clearTimeout)return clearTimeout(c);if((B===A||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(c);try{return B(c)}catch{try{return B.call(null,c)}catch{return B.call(this,c)}}}var ie=[],me=!1,_e,$e=-1;function Qe(){!me||!_e||(me=!1,_e.length?ie=_e.concat(ie):$e=-1,ie.length&&Je())}function Je(){if(!me){var c=q(Qe);me=!0;for(var s=ie.length;s;){for(_e=ie,ie=[];++$e1)for(var u=1;u=0;p--){var a=c[p];a==="."?c.splice(p,1):a===".."?(c.splice(p,1),u++):u&&(c.splice(p,1),u--)}if(s)for(;u--;u)c.unshift("..");return c}var KB=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bc=function(c){return KB.exec(c).slice(1)};function wl(){for(var c="",s=!1,u=arguments.length-1;u>=-1&&!s;u--){var p=u>=0?arguments[u]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;c=p+"/"+c,s=p.charAt(0)==="/"}return c=SO(Mc(c.split("/"),function(a){return!!a}),!s).join("/"),(s?"/":"")+c||"."}function Lc(c){var s=Nc(c),u=eL(c,-1)==="/";return c=SO(Mc(c.split("/"),function(p){return!!p}),!s).join("/"),!c&&!s&&(c="."),c&&u&&(c+="/"),(s?"/":"")+c}function Nc(c){return c.charAt(0)==="/"}function EO(){var c=Array.prototype.slice.call(arguments,0);return Lc(Mc(c,function(s,u){if(typeof s!="string")throw new TypeError("Arguments to path.join must be strings");return s}).join("/"))}function CO(c,s){c=wl(c).substr(1),s=wl(s).substr(1);function u(y){for(var O=0;O=0&&y[x]==="";x--);return O>x?[]:y.slice(O,x-O+1)}for(var p=u(c.split("/")),a=u(s.split("/")),d=Math.min(p.length,a.length),v=d,m=0;m>>1,j=L+N,P(F[j])?I=N:(L=j+1,I-=N+1);return L}p={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},m={},o={},a={Break:v,Skip:m,Remove:o};function x(F,P){this.parent=F,this.key=P}x.prototype.replace=function(P){this.parent[this.key]=P},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function g(F,P,N,I){this.node=F,this.path=P,this.wrap=N,this.ref=I}function f(){}f.prototype.path=function(){var P,N,I,L,j,G;function U(Q,$){if(Array.isArray($))for(I=0,L=$.length;I=0;--N)if(F[N].node===P)return!0;return!1}f.prototype.traverse=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae;for(this.__initialize(P,N),ae={},I=this.__worklist,L=this.__leavelist,I.push(new g(P,null,null,null)),L.push(new g(null,null,null,null));I.length;){if(j=I.pop(),j===ae){if(j=L.pop(),Q=this.__execute(N.leave,j),this.__state===v||Q===v)return;continue}if(j.node){if(Q=this.__execute(N.enter,j),this.__state===v||Q===v)return;if(I.push(ae),L.push(j),this.__state===m||Q===m)continue;if(G=j.node,U=G.type||j.wrap,te=this.__keys[U],!te)if(this.__fallback)te=this.__fallback(G);else throw new Error("Unknown node type "+U+".");for(W=te.length;(W-=1)>=0;)if($=te[W],V=G[$],!!V){if(Array.isArray(V)){for(K=V.length;(K-=1)>=0;)if(V[K]&&!E(L,V[K])){if(S(U,te[W]))j=new g(V[K],[$,K],"Property",null);else if(b(V[K]))j=new g(V[K],[$,K],null,null);else continue;I.push(j)}}else if(b(V)){if(E(L,V))continue;I.push(new g(V,$,null,null))}}}}},f.prototype.replace=function(P,N){var I,L,j,G,U,Q,$,W,K,te,V,ae,z;function ue(ne){var ce,pe,Be,oe;if(ne.ref.remove()){for(pe=ne.ref.key,oe=ne.ref.parent,ce=I.length;ce--;)if(Be=I[ce],Be.ref&&Be.ref.parent===oe){if(Be.ref.key=0;)if(z=K[$],te=j[z],!!te)if(Array.isArray(te)){for(W=te.length;(W-=1)>=0;)if(te[W]){if(S(G,K[$]))Q=new g(te[W],[z,W],"Property",new x(te,W));else if(b(te[W]))Q=new g(te[W],[z,W],null,new x(te,W));else continue;I.push(Q)}}else b(te)&&I.push(new g(te,z,null,new x(j,z)))}}return ae.root};function k(F,P){var N=new f;return N.traverse(F,P)}function D(F,P){var N=new f;return N.replace(F,P)}function T(F,P){var N;return N=O(P,function(L){return L.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],N!==P.length&&(F.extendedRange[1]=P[N].range[0]),N-=1,N>=0&&(F.extendedRange[0]=P[N].range[1]),F}function R(F,P,N){var I=[],L,j,G,U;if(!F.range)throw new Error("attachComments needs range information");if(!N.length){if(P.length){for(G=0,j=P.length;GQ.range[0]));)$.extendedRange[1]===Q.range[0]?(Q.leadingComments||(Q.leadingComments=[]),Q.leadingComments.push($),I.splice(U,1)):U+=1;if(U===I.length)return a.Break;if(I[U].extendedRange[0]>Q.range[1])return a.Skip}}),U=0,k(F,{leave:function(Q){for(var $;UQ.range[1])return a.Skip}}),F}return u.Syntax=p,u.traverse=k,u.replace=D,u.attachComments=R,u.VisitorKeys=d,u.VisitorOption=a,u.Controller=f,u.cloneEnvironment=function(){return s({})},u})(c)}($c)),$c}var oo={},rL="esrecurse",nL="ECMAScript AST recursive visitor",sL="https://github.com/estools/esrecurse",iL="esrecurse.js",aL="4.3.0",oL={node:">=4.0"},lL=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],uL={type:"git",url:"https://github.com/estools/esrecurse.git"},cL={estraverse:"^5.2.0"},fL={"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},pL="BSD-2-Clause",hL={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},dL={presets:["es2015"]},mL={name:rL,description:nL,homepage:sL,main:iL,version:aL,engines:oL,maintainers:lL,repository:uL,dependencies:cL,devDependencies:fL,license:pL,scripts:hL,babel:dL},RO;function gL(){return RO||(RO=1,function(){var c=IO();function s(a){return a==null?!1:typeof a=="object"&&typeof a.type=="string"}function u(a,d){return(a===c.Syntax.ObjectExpression||a===c.Syntax.ObjectPattern)&&d==="properties"}function p(a,d){d=d||{},this.__visitor=a||this,this.__childVisitorKeys=d.childVisitorKeys?Object.assign({},c.VisitorKeys,d.childVisitorKeys):c.VisitorKeys,d.fallback==="iteration"?this.__fallback=Object.keys:typeof d.fallback=="function"&&(this.__fallback=d.fallback)}p.prototype.visitChildren=function(a){var d,v,m,o,y,O,x;if(a!=null){if(d=a.type||c.Syntax.Property,v=this.__childVisitorKeys[d],!v)if(this.__fallback)v=this.__fallback(a);else throw new Error("Unknown node type "+d+".");for(m=0,o=v.length;m0&&Se.every(E)}__staticCloseRef(Z){this.__resolve(Z)||this.__delegateToUpperScope(Z)}__dynamicCloseRef(Z){let ge=this;do ge.through.push(Z),ge=ge.upper;while(ge)}__globalCloseRef(Z){this.__shouldStaticallyCloseForGlobal(Z)?this.__staticCloseRef(Z):this.__dynamicCloseRef(Z)}__close(Z){let ge;this.__shouldStaticallyClose(Z)?ge=this.__staticCloseRef:this.type!=="global"?ge=this.__dynamicCloseRef:ge=this.__globalCloseRef;for(let Re=0,Se=this.__left.length;ReSe.name.range[0]>=Re))}}class j extends k{constructor(Z,ge,Re){super(Z,"for",ge,Re,!1)}}class G extends k{constructor(Z,ge,Re){super(Z,"class",ge,Re,!1)}}class U extends k{constructor(Z,ge,Re){super(Z,"class-field-initializer",ge,Re,!0)}}class Q extends k{constructor(Z,ge,Re){super(Z,"class-static-block",ge,Re,!0)}}class ${constructor(Z){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=Z,this.__declaredVariables=new WeakMap}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||this.__options.sourceType==="commonjs"}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(Z){return this.__nodeToScope.get(Z)}getDeclaredVariables(Z){return this.__declaredVariables.get(Z)||[]}acquire(Z,ge){function Re(we){return!(we.type==="function"&&we.functionExpressionScope)}const Se=this.__get(Z);if(!Se||Se.length===0)return null;if(Se.length===1)return Se[0];if(ge)for(let we=Se.length-1;we>=0;--we){const Me=Se[we];if(Re(Me))return Me}else for(let we=0,Me=Se.length;we=6}}const{Syntax:W}=p.default;function K(oe){return oe.at(-1)||null}class te extends a.default.Visitor{static isPattern(Z){const ge=Z.type;return ge===W.Identifier||ge===W.ObjectPattern||ge===W.ArrayPattern||ge===W.SpreadElement||ge===W.RestElement||ge===W.AssignmentPattern}constructor(Z,ge,Re){super(null,Z),this.rootPattern=ge,this.callback=Re,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(Z){const ge=K(this.restElements);this.callback(Z,{topLevel:Z===this.rootPattern,rest:ge!=null&&ge.argument===Z,assignments:this.assignments})}Property(Z){Z.computed&&this.rightHandNodes.push(Z.key),this.visit(Z.value)}ArrayPattern(Z){for(let ge=0,Re=Z.elements.length;ge{this.rightHandNodes.push(ge)}),this.visit(Z.callee)}}const{Syntax:V}=p.default;function ae(oe,Z,ge,Re){const Se=new te(oe,Z,Re);Se.visit(Z),ge!=null&&Se.rightHandNodes.forEach(ge.visit,ge)}class z extends a.default.Visitor{constructor(Z,ge){super(null,ge.options),this.declaration=Z,this.referencer=ge}visitImport(Z,ge){this.referencer.visitPattern(Z,Re=>{this.referencer.currentScope().__define(Re,new x(O.ImportBinding,Re,ge,this.declaration,null,null))})}ImportNamespaceSpecifier(Z){const ge=Z.local||Z.id;ge&&this.visitImport(ge,Z)}ImportDefaultSpecifier(Z){const ge=Z.local||Z.id;this.visitImport(ge,Z)}ImportSpecifier(Z){const ge=Z.local||Z.id;Z.name?this.visitImport(Z.name,Z):this.visitImport(ge,Z)}}class ue extends a.default.Visitor{constructor(Z,ge){super(null,Z),this.options=Z,this.scopeManager=ge,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(Z){for(;this.currentScope()&&Z===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(Z){const ge=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=Z,ge}popInnerMethodDefinition(Z){this.isInnerMethodDefinition=Z}referencingDefaultValue(Z,ge,Re,Se){const we=this.currentScope();ge.forEach(Me=>{we.__referencing(Z,y.WRITE,Me.right,Re,Z!==Me.left,Se)})}visitPattern(Z,ge,Re){let Se=ge,we=Re;typeof ge=="function"&&(we=ge,Se={processRightHandNodes:!1}),ae(this.options,Z,Se.processRightHandNodes?this:null,we)}visitFunction(Z){let ge,Re;Z.type===V.FunctionDeclaration&&this.currentScope().__define(Z.id,new x(O.FunctionName,Z.id,Z,null,null,null)),Z.type===V.FunctionExpression&&Z.id&&this.scopeManager.__nestFunctionExpressionNameScope(Z),this.scopeManager.__nestFunctionScope(Z,this.isInnerMethodDefinition);const Se=this;function we(Me,it){Se.currentScope().__define(Me,new g(Me,Z,ge,it.rest)),Se.referencingDefaultValue(Me,it.assignments,null,!0)}for(ge=0,Re=Z.params.length;ge{this.currentScope().__define(Me,new g(Me,Z,Z.params.length,!0))}),Z.body&&(Z.body.type===V.BlockStatement?this.visitChildren(Z.body):this.visit(Z.body)),this.close(Z)}visitClass(Z){Z.type===V.ClassDeclaration&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z,null,null,null)),this.scopeManager.__nestClassScope(Z),Z.id&&this.currentScope().__define(Z.id,new x(O.ClassName,Z.id,Z)),this.visit(Z.superClass),this.visit(Z.body),this.close(Z)}visitProperty(Z){let ge;Z.computed&&this.visit(Z.key);const Re=Z.type===V.MethodDefinition;Re&&(ge=this.pushInnerMethodDefinition(!0)),this.visit(Z.value),Re&&this.popInnerMethodDefinition(ge)}visitForIn(Z){Z.left.type===V.VariableDeclaration&&Z.left.kind!=="var"&&this.scopeManager.__nestForScope(Z),Z.left.type===V.VariableDeclaration?(this.visit(Z.left),this.visitPattern(Z.left.declarations[0].id,ge=>{this.currentScope().__referencing(ge,y.WRITE,Z.right,null,!0,!0)})):this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!0,!1)}),this.visit(Z.right),this.visit(Z.body),this.close(Z)}visitVariableDeclaration(Z,ge,Re,Se){const we=Re.declarations[Se],Me=we.init;this.visitPattern(we.id,{processRightHandNodes:!0},(it,pt)=>{Z.__define(it,new x(ge,it,we,Re,Se,Re.kind)),this.referencingDefaultValue(it,pt.assignments,null,!0),Me&&this.currentScope().__referencing(it,y.WRITE,Me,null,!pt.topLevel,!0)})}AssignmentExpression(Z){te.isPattern(Z.left)?Z.operator==="="?this.visitPattern(Z.left,{processRightHandNodes:!0},(ge,Re)=>{let Se=null;this.currentScope().isStrict||(Se={pattern:ge,node:Z}),this.referencingDefaultValue(ge,Re.assignments,Se,!1),this.currentScope().__referencing(ge,y.WRITE,Z.right,Se,!Re.topLevel,!1)}):this.currentScope().__referencing(Z.left,y.RW,Z.right):this.visit(Z.left),this.visit(Z.right)}CatchClause(Z){this.scopeManager.__nestCatchScope(Z),this.visitPattern(Z.param,{processRightHandNodes:!0},(ge,Re)=>{this.currentScope().__define(ge,new x(O.CatchClause,ge,Z,null,null,null)),this.referencingDefaultValue(ge,Re.assignments,null,!0)}),this.visit(Z.body),this.close(Z)}Program(Z){this.scopeManager.__nestGlobalScope(Z),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(Z,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(Z),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(Z),this.close(Z)}Identifier(Z){this.currentScope().__referencing(Z)}PrivateIdentifier(){}UpdateExpression(Z){te.isPattern(Z.argument)?this.currentScope().__referencing(Z.argument,y.RW,null):this.visitChildren(Z)}MemberExpression(Z){this.visit(Z.object),Z.computed&&this.visit(Z.property)}Property(Z){this.visitProperty(Z)}PropertyDefinition(Z){const{computed:ge,key:Re,value:Se}=Z;ge&&this.visit(Re),Se&&(this.scopeManager.__nestClassFieldInitializerScope(Se),this.visit(Se),this.close(Se))}StaticBlock(Z){this.scopeManager.__nestClassStaticBlockScope(Z),this.visitChildren(Z),this.close(Z)}MethodDefinition(Z){this.visitProperty(Z)}BreakStatement(){}ContinueStatement(){}LabeledStatement(Z){this.visit(Z.body)}ForStatement(Z){Z.init&&Z.init.type===V.VariableDeclaration&&Z.init.kind!=="var"&&this.scopeManager.__nestForScope(Z),this.visitChildren(Z),this.close(Z)}ClassExpression(Z){this.visitClass(Z)}ClassDeclaration(Z){this.visitClass(Z)}CallExpression(Z){!this.scopeManager.__ignoreEval()&&Z.callee.type===V.Identifier&&Z.callee.name==="eval"&&this.currentScope().variableScope.__detectEval(),this.visitChildren(Z)}BlockStatement(Z){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(Z),this.visitChildren(Z),this.close(Z)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(Z){this.visit(Z.object),this.scopeManager.__nestWithScope(Z),this.visit(Z.body),this.close(Z)}VariableDeclaration(Z){const ge=Z.kind==="var"?this.currentScope().variableScope:this.currentScope();for(let Re=0,Se=Z.declarations.length;Rew)return!1;if(J+=M[le+1],J>=w)return!0}return!1}function b(w,M){return w<65?w===36:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&x.test(String.fromCharCode(w)):M===!1?!1:f(w,a)}function S(w,M){return w<48?w===36:w<58?!0:w<65?!1:w<91?!0:w<97?w===95:w<123?!0:w<=65535?w>=170&&g.test(String.fromCharCode(w)):M===!1?!1:f(w,a)||f(w,p)}var E=function(M,J){J===void 0&&(J={}),this.label=M,this.keyword=J.keyword,this.beforeExpr=!!J.beforeExpr,this.startsExpr=!!J.startsExpr,this.isLoop=!!J.isLoop,this.isAssign=!!J.isAssign,this.prefix=!!J.prefix,this.postfix=!!J.postfix,this.binop=J.binop||null,this.updateContext=null};function k(w,M){return new E(w,{beforeExpr:!0,binop:M})}var D={beforeExpr:!0},T={startsExpr:!0},R={};function F(w,M){return M===void 0&&(M={}),M.keyword=w,R[w]=new E(w,M)}var P={num:new E("num",T),regexp:new E("regexp",T),string:new E("string",T),name:new E("name",T),privateId:new E("privateId",T),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",D),semi:new E(";",D),colon:new E(":",D),dot:new E("."),question:new E("?",D),questionDot:new E("?."),arrow:new E("=>",D),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",D),backQuote:new E("`",T),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),relational:k("/<=/>=",7),bitShift:k("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:k("%",10),star:k("*",10),slash:k("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:k("??",1),_break:F("break"),_case:F("case",D),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",D),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",D),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",T),_if:F("if"),_return:F("return",D),_switch:F("switch"),_throw:F("throw",D),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",T),_super:F("super",T),_class:F("class",T),_extends:F("extends",D),_export:F("export"),_import:F("import",T),_null:F("null",T),_true:F("true",T),_false:F("false",T),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(N.source,"g");function L(w){return w===10||w===13||w===8232||w===8233}function j(w,M,J){J===void 0&&(J=w.length);for(var le=M;le>10)+55296,(w&1023)+56320))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(M,J){this.line=M,this.column=J};ne.prototype.offset=function(M){return new ne(this.line,this.column+M)};var ce=function(M,J,le){this.start=J,this.end=le,M.sourceFile!==null&&(this.source=M.sourceFile)};function pe(w,M){for(var J=1,le=0;;){var De=j(w,le,M);if(De<0)return new ne(J,M-le);++J,le=De}}var Be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},oe=!1;function Z(w){var M={};for(var J in Be)M[J]=w&&K(w,J)?w[J]:Be[J];if(M.ecmaVersion==="latest"?M.ecmaVersion=1e8:M.ecmaVersion==null?(!oe&&typeof console=="object"&&console.warn&&(oe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),M.ecmaVersion=11):M.ecmaVersion>=2015&&(M.ecmaVersion-=2009),M.allowReserved==null&&(M.allowReserved=M.ecmaVersion<5),(!w||w.allowHashBang==null)&&(M.allowHashBang=M.ecmaVersion>=14),te(M.onToken)){var le=M.onToken;M.onToken=function(De){return le.push(De)}}return te(M.onComment)&&(M.onComment=ge(M,M.onComment)),M}function ge(w,M){return function(J,le,De,He,tt,wt){var Tt={type:J?"Block":"Line",value:le,start:De,end:He};w.locations&&(Tt.loc=new ce(this,tt,wt)),w.ranges&&(Tt.range=[De,He]),M.push(Tt)}}var Re=1,Se=2,we=4,Me=8,it=16,pt=32,kt=64,qt=128,Ut=256,tr=Re|Se|Ut;function fe(w,M){return Se|(w?we:0)|(M?Me:0)}var Ve=0,mt=1,Pt=2,Bt=3,se=4,Kt=5,Vt=function(M,J,le){this.options=M=Z(M),this.sourceFile=M.sourceFile,this.keywords=ae(y[M.ecmaVersion>=6?6:M.sourceType==="module"?"5module":5]);var De="";M.allowReserved!==!0&&(De=m[M.ecmaVersion>=6?6:M.ecmaVersion===5?5:3],M.sourceType==="module"&&(De+=" await")),this.reservedWords=ae(De);var He=(De?De+" ":"")+m.strict;this.reservedWordsStrict=ae(He),this.reservedWordsStrictBind=ae(He+" "+m.strictBind),this.input=String(J),this.containsEsc=!1,le?(this.pos=le,this.lineStart=this.input.lastIndexOf(` +`,le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=M.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&M.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Re),this.regexpState=null,this.privateNameStack=[]},ir={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Vt.prototype.parse=function(){var M=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(M)},ir.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},ir.inGenerator.get=function(){return(this.currentVarScope().flags&Me)>0&&!this.currentVarScope().inClassFieldInit},ir.inAsync.get=function(){return(this.currentVarScope().flags&we)>0&&!this.currentVarScope().inClassFieldInit},ir.canAwait.get=function(){for(var w=this.scopeStack.length-1;w>=0;w--){var M=this.scopeStack[w];if(M.inClassFieldInit||M.flags&Ut)return!1;if(M.flags&Se)return(M.flags&we)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ir.allowSuper.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&kt)>0||J||this.options.allowSuperOutsideMethod},ir.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qt)>0},ir.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ir.allowNewDotTarget.get=function(){var w=this.currentThisScope(),M=w.flags,J=w.inClassFieldInit;return(M&(Se|Ut))>0||J},ir.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ut)>0},Vt.extend=function(){for(var M=[],J=arguments.length;J--;)M[J]=arguments[J];for(var le=this,De=0;De=,?^&]/.test(De)||De==="!"&&this.input.charAt(le+1)==="=")}w+=M[0].length,U.lastIndex=w,w+=U.exec(this.input)[0].length,this.input[w]===";"&&w++}},Ot.eat=function(w){return this.type===w?(this.next(),!0):!1},Ot.isContextual=function(w){return this.type===P.name&&this.value===w&&!this.containsEsc},Ot.eatContextual=function(w){return this.isContextual(w)?(this.next(),!0):!1},Ot.expectContextual=function(w){this.eatContextual(w)||this.unexpected()},Ot.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},Ot.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ot.semicolon=function(){!this.eat(P.semi)&&!this.insertSemicolon()&&this.unexpected()},Ot.afterTrailingComma=function(w,M){if(this.type===w)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),M||this.next(),!0},Ot.expect=function(w){this.eat(w)||this.unexpected()},Ot.unexpected=function(w){this.raise(w??this.start,"Unexpected token")};var hr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ot.checkPatternErrors=function(w,M){if(w){w.trailingComma>-1&&this.raiseRecoverable(w.trailingComma,"Comma is not permitted after the rest element");var J=M?w.parenthesizedAssign:w.parenthesizedBind;J>-1&&this.raiseRecoverable(J,M?"Assigning to rvalue":"Parenthesized pattern")}},Ot.checkExpressionErrors=function(w,M){if(!w)return!1;var J=w.shorthandAssign,le=w.doubleProto;if(!M)return J>=0||le>=0;J>=0&&this.raise(J,"Shorthand property assignments are valid only in destructuring patterns"),le>=0&&this.raiseRecoverable(le,"Redefinition of __proto__ property")},Ot.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&le<56320)return!0;if(b(le,!0)){for(var De=J+1;S(le=this.input.charCodeAt(De),!0);)++De;if(le===92||le>55295&&le<56320)return!0;var He=this.input.slice(J,De);if(!O.test(He))return!0}return!1},Dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var w=U.exec(this.input),M=this.pos+w[0].length,J;return!N.test(this.input.slice(this.pos,M))&&this.input.slice(M,M+8)==="function"&&(M+8===this.input.length||!(S(J=this.input.charCodeAt(M+8))||J>55295&&J<56320))},Dt.parseStatement=function(w,M,J){var le=this.type,De=this.startNode(),He;switch(this.isLet(w)&&(le=P._var,He="let"),le){case P._break:case P._continue:return this.parseBreakContinueStatement(De,le.keyword);case P._debugger:return this.parseDebuggerStatement(De);case P._do:return this.parseDoStatement(De);case P._for:return this.parseForStatement(De);case P._function:return w&&(this.strict||w!=="if"&&w!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(De,!1,!w);case P._class:return w&&this.unexpected(),this.parseClass(De,!0);case P._if:return this.parseIfStatement(De);case P._return:return this.parseReturnStatement(De);case P._switch:return this.parseSwitchStatement(De);case P._throw:return this.parseThrowStatement(De);case P._try:return this.parseTryStatement(De);case P._const:case P._var:return He=He||this.value,w&&He!=="var"&&this.unexpected(),this.parseVarStatement(De,He);case P._while:return this.parseWhileStatement(De);case P._with:return this.parseWithStatement(De);case P.braceL:return this.parseBlock(!0,De);case P.semi:return this.parseEmptyStatement(De);case P._export:case P._import:if(this.options.ecmaVersion>10&&le===P._import){U.lastIndex=this.pos;var tt=U.exec(this.input),wt=this.pos+tt[0].length,Tt=this.input.charCodeAt(wt);if(Tt===40||Tt===46)return this.parseExpressionStatement(De,this.parseExpression())}return this.options.allowImportExportEverywhere||(M||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),le===P._import?this.parseImport(De):this.parseExport(De,J);default:if(this.isAsyncFunction())return w&&this.unexpected(),this.next(),this.parseFunctionStatement(De,!0,!w);var Xt=this.value,Jt=this.parseExpression();return le===P.name&&Jt.type==="Identifier"&&this.eat(P.colon)?this.parseLabeledStatement(De,Xt,Jt,w):this.parseExpressionStatement(De,Jt)}},Dt.parseBreakContinueStatement=function(w,M){var J=M==="break";this.next(),this.eat(P.semi)||this.insertSemicolon()?w.label=null:this.type!==P.name?this.unexpected():(w.label=this.parseIdent(),this.semicolon());for(var le=0;le=6?this.eat(P.semi):this.semicolon(),this.finishNode(w,"DoWhileStatement")},Dt.parseForStatement=function(w){this.next();var M=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dr),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return M>-1&&this.unexpected(M),this.parseFor(w,null);var J=this.isLet();if(this.type===P._var||this.type===P._const||J){var le=this.startNode(),De=J?"let":this.value;return this.next(),this.parseVar(le,!0,De),this.finishNode(le,"VariableDeclaration"),(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===P._in?M>-1&&this.unexpected(M):w.await=M>-1),this.parseForIn(w,le)):(M>-1&&this.unexpected(M),this.parseFor(w,le))}var He=this.isContextual("let"),tt=!1,wt=this.containsEsc,Tt=new hr,Xt=this.start,Jt=M>-1?this.parseExprSubscripts(Tt,"await"):this.parseExpression(!0,Tt);return this.type===P._in||(tt=this.options.ecmaVersion>=6&&this.isContextual("of"))?(M>-1?(this.type===P._in&&this.unexpected(M),w.await=!0):tt&&this.options.ecmaVersion>=8&&(Jt.start===Xt&&!wt&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(w.await=!1)),He&&tt&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,Tt),this.checkLValPattern(Jt),this.parseForIn(w,Jt)):(this.checkExpressionErrors(Tt,!0),M>-1&&this.unexpected(M),this.parseFor(w,Jt))},Dt.parseFunctionStatement=function(w,M,J){return this.next(),this.parseFunction(w,ke|(J?0:Te),!1,M)},Dt.parseIfStatement=function(w){return this.next(),w.test=this.parseParenExpression(),w.consequent=this.parseStatement("if"),w.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(w,"IfStatement")},Dt.parseReturnStatement=function(w){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?w.argument=null:(w.argument=this.parseExpression(),this.semicolon()),this.finishNode(w,"ReturnStatement")},Dt.parseSwitchStatement=function(w){this.next(),w.discriminant=this.parseParenExpression(),w.cases=[],this.expect(P.braceL),this.labels.push(Et),this.enterScope(0);for(var M,J=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var le=this.type===P._case;M&&this.finishNode(M,"SwitchCase"),w.cases.push(M=this.startNode()),M.consequent=[],this.next(),le?M.test=this.parseExpression():(J&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),J=!0,M.test=null),this.expect(P.colon)}else M||this.unexpected(),M.consequent.push(this.parseStatement(null));return this.exitScope(),M&&this.finishNode(M,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(w,"SwitchStatement")},Dt.parseThrowStatement=function(w){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),w.argument=this.parseExpression(),this.semicolon(),this.finishNode(w,"ThrowStatement")};var Ie=[];Dt.parseCatchClauseParam=function(){var w=this.parseBindingAtom(),M=w.type==="Identifier";return this.enterScope(M?pt:0),this.checkLValPattern(w,M?se:Pt),this.expect(P.parenR),w},Dt.parseTryStatement=function(w){if(this.next(),w.block=this.parseBlock(),w.handler=null,this.type===P._catch){var M=this.startNode();this.next(),this.eat(P.parenL)?M.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),M.param=null,this.enterScope(0)),M.body=this.parseBlock(!1),this.exitScope(),w.handler=this.finishNode(M,"CatchClause")}return w.finalizer=this.eat(P._finally)?this.parseBlock():null,!w.handler&&!w.finalizer&&this.raise(w.start,"Missing catch or finally clause"),this.finishNode(w,"TryStatement")},Dt.parseVarStatement=function(w,M,J){return this.next(),this.parseVar(w,!1,M,J),this.semicolon(),this.finishNode(w,"VariableDeclaration")},Dt.parseWhileStatement=function(w){return this.next(),w.test=this.parseParenExpression(),this.labels.push(Dr),w.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(w,"WhileStatement")},Dt.parseWithStatement=function(w){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),w.object=this.parseParenExpression(),w.body=this.parseStatement("with"),this.finishNode(w,"WithStatement")},Dt.parseEmptyStatement=function(w){return this.next(),this.finishNode(w,"EmptyStatement")},Dt.parseLabeledStatement=function(w,M,J,le){for(var De=0,He=this.labels;De=0;Tt--){var Xt=this.labels[Tt];if(Xt.statementStart===w.start)Xt.statementStart=this.start,Xt.kind=wt;else break}return this.labels.push({name:M,kind:wt,statementStart:this.start}),w.body=this.parseStatement(le?le.indexOf("label")===-1?le+"label":le:"label"),this.labels.pop(),w.label=J,this.finishNode(w,"LabeledStatement")},Dt.parseExpressionStatement=function(w,M){return w.expression=M,this.semicolon(),this.finishNode(w,"ExpressionStatement")},Dt.parseBlock=function(w,M,J){for(w===void 0&&(w=!0),M===void 0&&(M=this.startNode()),M.body=[],this.expect(P.braceL),w&&this.enterScope(0);this.type!==P.braceR;){var le=this.parseStatement(null);M.body.push(le)}return J&&(this.strict=!1),this.next(),w&&this.exitScope(),this.finishNode(M,"BlockStatement")},Dt.parseFor=function(w,M){return w.init=M,this.expect(P.semi),w.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),w.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,"ForStatement")},Dt.parseForIn=function(w,M){var J=this.type===P._in;return this.next(),M.type==="VariableDeclaration"&&M.declarations[0].init!=null&&(!J||this.options.ecmaVersion<8||this.strict||M.kind!=="var"||M.declarations[0].id.type!=="Identifier")&&this.raise(M.start,(J?"for-in":"for-of")+" loop variable declaration may not have an initializer"),w.left=M,w.right=J?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),w.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(w,J?"ForInStatement":"ForOfStatement")},Dt.parseVar=function(w,M,J,le){for(w.declarations=[],w.kind=J;;){var De=this.startNode();if(this.parseVarId(De,J),this.eat(P.eq)?De.init=this.parseMaybeAssign(M):!le&&J==="const"&&!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!le&&De.id.type!=="Identifier"&&!(M&&(this.type===P._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):De.init=null,w.declarations.push(this.finishNode(De,"VariableDeclarator")),!this.eat(P.comma))break}return w},Dt.parseVarId=function(w,M){w.id=this.parseBindingAtom(),this.checkLValPattern(w.id,M==="var"?mt:Pt,!1)};var ke=1,Te=2,Ue=4;Dt.parseFunction=function(w,M,J,le,De){this.initFunction(w),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!le)&&(this.type===P.star&&M&Te&&this.unexpected(),w.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(w.async=!!le),M&ke&&(w.id=M&Ue&&this.type!==P.name?null:this.parseIdent(),w.id&&!(M&Te)&&this.checkLValSimple(w.id,this.strict||w.generator||w.async?this.treatFunctionsAsVar?mt:Pt:Bt));var He=this.yieldPos,tt=this.awaitPos,wt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(w.async,w.generator)),M&ke||(w.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(w),this.parseFunctionBody(w,J,!1,De),this.yieldPos=He,this.awaitPos=tt,this.awaitIdentPos=wt,this.finishNode(w,M&ke?"FunctionDeclaration":"FunctionExpression")},Dt.parseFunctionParams=function(w){this.expect(P.parenL),w.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Dt.parseClass=function(w,M){this.next();var J=this.strict;this.strict=!0,this.parseClassId(w,M),this.parseClassSuper(w);var le=this.enterClassBody(),De=this.startNode(),He=!1;for(De.body=[],this.expect(P.braceL);this.type!==P.braceR;){var tt=this.parseClassElement(w.superClass!==null);tt&&(De.body.push(tt),tt.type==="MethodDefinition"&&tt.kind==="constructor"?(He&&this.raiseRecoverable(tt.start,"Duplicate constructor in the same class"),He=!0):tt.key&&tt.key.type==="PrivateIdentifier"&<(le,tt)&&this.raiseRecoverable(tt.key.start,"Identifier '#"+tt.key.name+"' has already been declared"))}return this.strict=J,this.next(),w.body=this.finishNode(De,"ClassBody"),this.exitClassBody(),this.finishNode(w,M?"ClassDeclaration":"ClassExpression")},Dt.parseClassElement=function(w){if(this.eat(P.semi))return null;var M=this.options.ecmaVersion,J=this.startNode(),le="",De=!1,He=!1,tt="method",wt=!1;if(this.eatContextual("static")){if(M>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(J),J;this.isClassElementNameStart()||this.type===P.star?wt=!0:le="static"}if(J.static=wt,!le&&M>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===P.star)&&!this.canInsertSemicolon()?He=!0:le="async"),!le&&(M>=9||!He)&&this.eat(P.star)&&(De=!0),!le&&!He&&!De){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?tt=Tt:le=Tt)}if(le?(J.computed=!1,J.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),J.key.name=le,this.finishNode(J.key,"Identifier")):this.parseClassElementName(J),M<13||this.type===P.parenL||tt!=="method"||De||He){var Xt=!J.static&&Oe(J,"constructor"),Jt=Xt&&w;Xt&&tt!=="method"&&this.raise(J.key.start,"Constructor can't have get/set modifier"),J.kind=Xt?"constructor":tt,this.parseClassMethod(J,De,He,Jt)}else this.parseClassField(J);return J},Dt.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},Dt.parseClassElementName=function(w){this.type===P.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),w.computed=!1,w.key=this.parsePrivateIdent()):this.parsePropertyName(w)},Dt.parseClassMethod=function(w,M,J,le){var De=w.key;w.kind==="constructor"?(M&&this.raise(De.start,"Constructor can't be a generator"),J&&this.raise(De.start,"Constructor can't be an async method")):w.static&&Oe(w,"prototype")&&this.raise(De.start,"Classes may not have a static property named prototype");var He=w.value=this.parseMethod(M,J,le);return w.kind==="get"&&He.params.length!==0&&this.raiseRecoverable(He.start,"getter should have no params"),w.kind==="set"&&He.params.length!==1&&this.raiseRecoverable(He.start,"setter should have exactly one param"),w.kind==="set"&&He.params[0].type==="RestElement"&&this.raiseRecoverable(He.params[0].start,"Setter cannot use rest params"),this.finishNode(w,"MethodDefinition")},Dt.parseClassField=function(w){if(Oe(w,"constructor")?this.raise(w.key.start,"Classes can't have a field named 'constructor'"):w.static&&Oe(w,"prototype")&&this.raise(w.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)){var M=this.currentThisScope(),J=M.inClassFieldInit;M.inClassFieldInit=!0,w.value=this.parseMaybeAssign(),M.inClassFieldInit=J}else w.value=null;return this.semicolon(),this.finishNode(w,"PropertyDefinition")},Dt.parseClassStaticBlock=function(w){w.body=[];var M=this.labels;for(this.labels=[],this.enterScope(Ut|kt);this.type!==P.braceR;){var J=this.parseStatement(null);w.body.push(J)}return this.next(),this.exitScope(),this.labels=M,this.finishNode(w,"StaticBlock")},Dt.parseClassId=function(w,M){this.type===P.name?(w.id=this.parseIdent(),M&&this.checkLValSimple(w.id,Pt,!1)):(M===!0&&this.unexpected(),w.id=null)},Dt.parseClassSuper=function(w){w.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},Dt.enterClassBody=function(){var w={declared:Object.create(null),used:[]};return this.privateNameStack.push(w),w.declared},Dt.exitClassBody=function(){var w=this.privateNameStack.pop(),M=w.declared,J=w.used;if(this.options.checkPrivateFields)for(var le=this.privateNameStack.length,De=le===0?null:this.privateNameStack[le-1],He=0;He=11&&(this.eatContextual("as")?(w.exported=this.parseModuleExportName(),this.checkExport(M,w.exported,this.lastTokStart)):w.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom(),this.semicolon(),this.finishNode(w,"ExportAllDeclaration")},Dt.parseExport=function(w,M){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(w,M);if(this.eat(P._default))return this.checkExport(M,"default",this.lastTokStart),w.declaration=this.parseExportDefaultDeclaration(),this.finishNode(w,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())w.declaration=this.parseExportDeclaration(w),w.declaration.type==="VariableDeclaration"?this.checkVariableExport(M,w.declaration.declarations):this.checkExport(M,w.declaration.id,w.declaration.id.start),w.specifiers=[],w.source=null;else{if(w.declaration=null,w.specifiers=this.parseExportSpecifiers(M),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),w.source=this.parseExprAtom();else{for(var J=0,le=w.specifiers;J=13&&this.type===P.string){var w=this.parseLiteral(this.value);return ue.test(w.value)&&this.raise(w.start,"An export name cannot include a lone surrogate."),w}return this.parseIdent(!0)},Dt.adaptDirectivePrologue=function(w){for(var M=0;M=5&&w.type==="ExpressionStatement"&&w.expression.type==="Literal"&&typeof w.expression.value=="string"&&(this.input[w.start]==='"'||this.input[w.start]==="'")};var Pe=Vt.prototype;Pe.toAssignable=function(w,M,J){if(this.options.ecmaVersion>=6&&w)switch(w.type){case"Identifier":this.inAsync&&w.name==="await"&&this.raise(w.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":w.type="ObjectPattern",J&&this.checkPatternErrors(J,!0);for(var le=0,De=w.properties;le=8&&!wt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(ye.f_expr),this.parseFunction(this.startNodeAt(He,tt),0,!1,!0,M);if(De&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!1,M);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===P.name&&!wt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(P.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(He,tt),[Tt],!0,M)}return Tt;case P.regexp:var Xt=this.value;return le=this.parseLiteral(Xt.value),le.regex={pattern:Xt.pattern,flags:Xt.flags},le;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return le=this.startNode(),le.value=this.type===P._null?null:this.type===P._true,le.raw=this.type.keyword,this.next(),this.finishNode(le,"Literal");case P.parenL:var Jt=this.start,jr=this.parseParenAndDistinguishExpression(De,M);return w&&(w.parenthesizedAssign<0&&!this.isSimpleAssignTarget(jr)&&(w.parenthesizedAssign=Jt),w.parenthesizedBind<0&&(w.parenthesizedBind=Jt)),jr;case P.bracketL:return le=this.startNode(),this.next(),le.elements=this.parseExprList(P.bracketR,!0,!0,w),this.finishNode(le,"ArrayExpression");case P.braceL:return this.overrideContext(ye.b_expr),this.parseObj(!1,w);case P._function:return le=this.startNode(),this.next(),this.parseFunction(le,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(J):this.unexpected();default:return this.parseExprAtomDefault()}},X.parseExprAtomDefault=function(){this.unexpected()},X.parseExprImport=function(w){var M=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!w)return this.parseDynamicImport(M);if(this.type===P.dot){var J=this.startNodeAt(M.start,M.loc&&M.loc.start);return J.name="import",M.meta=this.finishNode(J,"Identifier"),this.parseImportMeta(M)}else this.unexpected()},X.parseDynamicImport=function(w){if(this.next(),w.source=this.parseMaybeAssign(),!this.eat(P.parenR)){var M=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(M,"Trailing comma is not allowed in import()"):this.unexpected(M)}return this.finishNode(w,"ImportExpression")},X.parseImportMeta=function(w){this.next();var M=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="meta"&&this.raiseRecoverable(w.property.start,"The only valid meta property for import is 'import.meta'"),M&&this.raiseRecoverable(w.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(w.start,"Cannot use 'import.meta' outside a module"),this.finishNode(w,"MetaProperty")},X.parseLiteral=function(w){var M=this.startNode();return M.value=w,M.raw=this.input.slice(this.start,this.end),M.raw.charCodeAt(M.raw.length-1)===110&&(M.bigint=M.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(M,"Literal")},X.parseParenExpression=function(){this.expect(P.parenL);var w=this.parseExpression();return this.expect(P.parenR),w},X.shouldParseArrow=function(w){return!this.canInsertSemicolon()},X.parseParenAndDistinguishExpression=function(w,M){var J=this.start,le=this.startLoc,De,He=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var tt=this.start,wt=this.startLoc,Tt=[],Xt=!0,Jt=!1,jr=new hr,Gs=this.yieldPos,zi=this.awaitPos,zs;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;)if(Xt?Xt=!1:this.expect(P.comma),He&&this.afterTrailingComma(P.parenR,!0)){Jt=!0;break}else if(this.type===P.ellipsis){zs=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,jr,this.parseParenItem));var va=this.lastTokEnd,Fe=this.lastTokEndLoc;if(this.expect(P.parenR),w&&this.shouldParseArrow(Tt)&&this.eat(P.arrow))return this.checkPatternErrors(jr,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Gs,this.awaitPos=zi,this.parseParenArrowList(J,le,Tt,M);(!Tt.length||Jt)&&this.unexpected(this.lastTokStart),zs&&this.unexpected(zs),this.checkExpressionErrors(jr,!0),this.yieldPos=Gs||this.yieldPos,this.awaitPos=zi||this.awaitPos,Tt.length>1?(De=this.startNodeAt(tt,wt),De.expressions=Tt,this.finishNodeAt(De,"SequenceExpression",va,Fe)):De=Tt[0]}else De=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(J,le);return We.expression=De,this.finishNode(We,"ParenthesizedExpression")}else return De},X.parseParenItem=function(w){return w},X.parseParenArrowList=function(w,M,J,le){return this.parseArrowExpression(this.startNodeAt(w,M),J,!1,le)};var Ee=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var w=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var M=this.startNodeAt(w.start,w.loc&&w.loc.start);M.name="new",w.meta=this.finishNode(M,"Identifier"),this.next();var J=this.containsEsc;return w.property=this.parseIdent(!0),w.property.name!=="target"&&this.raiseRecoverable(w.property.start,"The only valid meta property for new is 'new.target'"),J&&this.raiseRecoverable(w.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(w.start,"'new.target' can only be used in functions and class static block"),this.finishNode(w,"MetaProperty")}var le=this.start,De=this.startLoc;return w.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),le,De,!0,!1),this.eat(P.parenL)?w.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):w.arguments=Ee,this.finishNode(w,"NewExpression")},X.parseTemplateElement=function(w){var M=w.isTagged,J=this.startNode();return this.type===P.invalidTemplate?(M||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),J.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):J.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),J.tail=this.type===P.backQuote,this.finishNode(J,"TemplateElement")},X.parseTemplate=function(w){w===void 0&&(w={});var M=w.isTagged;M===void 0&&(M=!1);var J=this.startNode();this.next(),J.expressions=[];var le=this.parseTemplateElement({isTagged:M});for(J.quasis=[le];!le.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),J.expressions.push(this.parseExpression()),this.expect(P.braceR),J.quasis.push(le=this.parseTemplateElement({isTagged:M}));return this.next(),this.finishNode(J,"TemplateLiteral")},X.isAsyncProp=function(w){return!w.computed&&w.key.type==="Identifier"&&w.key.name==="async"&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))},X.parseObj=function(w,M){var J=this.startNode(),le=!0,De={};for(J.properties=[],this.next();!this.eat(P.braceR);){if(le)le=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var He=this.parseProperty(w,M);w||this.checkPropClash(He,De,M),J.properties.push(He)}return this.finishNode(J,w?"ObjectPattern":"ObjectExpression")},X.parseProperty=function(w,M){var J=this.startNode(),le,De,He,tt;if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return w?(J.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(J,"RestElement")):(J.argument=this.parseMaybeAssign(!1,M),this.type===P.comma&&M&&M.trailingComma<0&&(M.trailingComma=this.start),this.finishNode(J,"SpreadElement"));this.options.ecmaVersion>=6&&(J.method=!1,J.shorthand=!1,(w||M)&&(He=this.start,tt=this.startLoc),w||(le=this.eat(P.star)));var wt=this.containsEsc;return this.parsePropertyName(J),!w&&!wt&&this.options.ecmaVersion>=8&&!le&&this.isAsyncProp(J)?(De=!0,le=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(J)):De=!1,this.parsePropertyValue(J,w,le,De,He,tt,M,wt),this.finishNode(J,"Property")},X.parseGetterSetter=function(w){w.kind=w.key.name,this.parsePropertyName(w),w.value=this.parseMethod(!1);var M=w.kind==="get"?0:1;if(w.value.params.length!==M){var J=w.value.start;w.kind==="get"?this.raiseRecoverable(J,"getter should have no params"):this.raiseRecoverable(J,"setter should have exactly one param")}else w.kind==="set"&&w.value.params[0].type==="RestElement"&&this.raiseRecoverable(w.value.params[0].start,"Setter cannot use rest params")},X.parsePropertyValue=function(w,M,J,le,De,He,tt,wt){(J||le)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(w.value=M?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,tt),w.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(M&&this.unexpected(),w.kind="init",w.method=!0,w.value=this.parseMethod(J,le)):!M&&!wt&&this.options.ecmaVersion>=5&&!w.computed&&w.key.type==="Identifier"&&(w.key.name==="get"||w.key.name==="set")&&this.type!==P.comma&&this.type!==P.braceR&&this.type!==P.eq?((J||le)&&this.unexpected(),this.parseGetterSetter(w)):this.options.ecmaVersion>=6&&!w.computed&&w.key.type==="Identifier"?((J||le)&&this.unexpected(),this.checkUnreserved(w.key),w.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=De),w.kind="init",M?w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key)):this.type===P.eq&&tt?(tt.shorthandAssign<0&&(tt.shorthandAssign=this.start),w.value=this.parseMaybeDefault(De,He,this.copyNode(w.key))):w.value=this.copyNode(w.key),w.shorthand=!0):this.unexpected()},X.parsePropertyName=function(w){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return w.computed=!0,w.key=this.parseMaybeAssign(),this.expect(P.bracketR),w.key;w.computed=!1}return w.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},X.initFunction=function(w){w.id=null,this.options.ecmaVersion>=6&&(w.generator=w.expression=!1),this.options.ecmaVersion>=8&&(w.async=!1)},X.parseMethod=function(w,M,J){var le=this.startNode(),De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.initFunction(le),this.options.ecmaVersion>=6&&(le.generator=w),this.options.ecmaVersion>=8&&(le.async=!!M),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(fe(M,le.generator)|kt|(J?qt:0)),this.expect(P.parenL),le.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(le,!1,!0,!1),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(le,"FunctionExpression")},X.parseArrowExpression=function(w,M,J,le){var De=this.yieldPos,He=this.awaitPos,tt=this.awaitIdentPos;return this.enterScope(fe(J,!1)|it),this.initFunction(w),this.options.ecmaVersion>=8&&(w.async=!!J),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,w.params=this.toAssignableList(M,!0),this.parseFunctionBody(w,!0,!1,le),this.yieldPos=De,this.awaitPos=He,this.awaitIdentPos=tt,this.finishNode(w,"ArrowFunctionExpression")},X.parseFunctionBody=function(w,M,J,le){var De=M&&this.type!==P.braceL,He=this.strict,tt=!1;if(De)w.body=this.parseMaybeAssign(le),w.expression=!0,this.checkParams(w,!1);else{var wt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(w.params);(!He||wt)&&(tt=this.strictDirective(this.end),tt&&wt&&this.raiseRecoverable(w.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],tt&&(this.strict=!0),this.checkParams(w,!He&&!tt&&!M&&!J&&this.isSimpleParamList(w.params)),this.strict&&w.id&&this.checkLValSimple(w.id,Kt),w.body=this.parseBlock(!1,void 0,tt&&!He),w.expression=!1,this.adaptDirectivePrologue(w.body.body),this.labels=Tt}this.exitScope()},X.isSimpleParamList=function(w){for(var M=0,J=w;M-1||De.functions.indexOf(w)>-1||De.var.indexOf(w)>-1,De.lexical.push(w),this.inModule&&De.flags&Re&&delete this.undefinedExports[w]}else if(M===se){var He=this.currentScope();He.lexical.push(w)}else if(M===Bt){var tt=this.currentScope();this.treatFunctionsAsVar?le=tt.lexical.indexOf(w)>-1:le=tt.lexical.indexOf(w)>-1||tt.var.indexOf(w)>-1,tt.functions.push(w)}else for(var wt=this.scopeStack.length-1;wt>=0;--wt){var Tt=this.scopeStack[wt];if(Tt.lexical.indexOf(w)>-1&&!(Tt.flags&pt&&Tt.lexical[0]===w)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(w)>-1){le=!0;break}if(Tt.var.push(w),this.inModule&&Tt.flags&Re&&delete this.undefinedExports[w],Tt.flags&tr)break}le&&this.raiseRecoverable(J,"Identifier '"+w+"' has already been declared")},Ne.checkLocalExport=function(w){this.scopeStack[0].lexical.indexOf(w.name)===-1&&this.scopeStack[0].var.indexOf(w.name)===-1&&(this.undefinedExports[w.name]=w)},Ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ne.currentVarScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr)return M}},Ne.currentThisScope=function(){for(var w=this.scopeStack.length-1;;w--){var M=this.scopeStack[w];if(M.flags&tr&&!(M.flags&it))return M}};var at=function(M,J,le){this.type="",this.start=J,this.end=0,M.options.locations&&(this.loc=new ce(M,le)),M.options.directSourceFile&&(this.sourceFile=M.options.directSourceFile),M.options.ranges&&(this.range=[J,0])},dt=Vt.prototype;dt.startNode=function(){return new at(this,this.start,this.startLoc)},dt.startNodeAt=function(w,M){return new at(this,w,M)};function ht(w,M,J,le){return w.type=M,w.end=J,this.options.locations&&(w.loc.end=le),this.options.ranges&&(w.range[1]=J),w}dt.finishNode=function(w,M){return ht.call(this,w,M,this.lastTokEnd,this.lastTokEndLoc)},dt.finishNodeAt=function(w,M,J,le){return ht.call(this,w,M,J,le)},dt.copyNode=function(w){var M=new at(this,w.start,this.startLoc);for(var J in w)M[J]=w[J];return M};var Ce="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xe=Ce+" Extended_Pictographic",je=xe,ze=je+" EBase EComp EMod EPres ExtPict",Ge=ze,ut=Ge,qe={9:Ce,10:xe,11:je,12:ze,13:Ge,14:ut},et="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bt={9:"",10:"",11:"",12:"",13:"",14:et},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Wt=jt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Wt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",rr=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ar=rr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",nr={9:St,10:jt,11:Wt,12:Lt,13:rr,14:ar},Lr={};function wr(w){var M=Lr[w]={binary:ae(qe[w]+" "+rt),binaryOfStrings:ae(bt[w]),nonBinary:{General_Category:ae(rt),Script:ae(nr[w])}};M.nonBinary.Script_Extensions=M.nonBinary.Script,M.nonBinary.gc=M.nonBinary.General_Category,M.nonBinary.sc=M.nonBinary.Script,M.nonBinary.scx=M.nonBinary.Script_Extensions}for(var Nr=0,wn=[9,10,11,12,13,14];Nr=6?"uy":"")+(M.options.ecmaVersion>=9?"s":"")+(M.options.ecmaVersion>=13?"d":"")+(M.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lr[M.options.ecmaVersion>=14?14:M.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Mr.prototype.reset=function(M,J,le){var De=le.indexOf("v")!==-1,He=le.indexOf("u")!==-1;this.start=M|0,this.source=J+"",this.flags=le,De&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=He&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=He&&this.parser.options.ecmaVersion>=9)},Mr.prototype.raise=function(M){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+M)},Mr.prototype.at=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return-1;var He=le.charCodeAt(M);if(!(J||this.switchU)||He<=55295||He>=57344||M+1>=De)return He;var tt=le.charCodeAt(M+1);return tt>=56320&&tt<=57343?(He<<10)+tt-56613888:He},Mr.prototype.nextIndex=function(M,J){J===void 0&&(J=!1);var le=this.source,De=le.length;if(M>=De)return De;var He=le.charCodeAt(M),tt;return!(J||this.switchU)||He<=55295||He>=57344||M+1>=De||(tt=le.charCodeAt(M+1))<56320||tt>57343?M+1:M+2},Mr.prototype.current=function(M){return M===void 0&&(M=!1),this.at(this.pos,M)},Mr.prototype.lookahead=function(M){return M===void 0&&(M=!1),this.at(this.nextIndex(this.pos,M),M)},Mr.prototype.advance=function(M){M===void 0&&(M=!1),this.pos=this.nextIndex(this.pos,M)},Mr.prototype.eat=function(M,J){return J===void 0&&(J=!1),this.current(J)===M?(this.advance(J),!0):!1},Mr.prototype.eatChars=function(M,J){J===void 0&&(J=!1);for(var le=this.pos,De=0,He=M;De-1&&this.raise(w.start,"Duplicate regular expression flag"),tt==="u"&&(le=!0),tt==="v"&&(De=!0)}this.options.ecmaVersion>=15&&le&&De&&this.raise(w.start,"Invalid regular expression flag")};function kn(w){for(var M in w)return!0;return!1}Rt.validateRegExpPattern=function(w){this.regexp_pattern(w),!w.switchN&&this.options.ecmaVersion>=9&&kn(w.groupNames)&&(w.switchN=!0,this.regexp_pattern(w))},Rt.regexp_pattern=function(w){w.pos=0,w.lastIntValue=0,w.lastStringValue="",w.lastAssertionIsQuantifiable=!1,w.numCapturingParens=0,w.maxBackReference=0,w.groupNames=Object.create(null),w.backReferenceNames.length=0,w.branchID=null,this.regexp_disjunction(w),w.pos!==w.source.length&&(w.eat(41)&&w.raise("Unmatched ')'"),(w.eat(93)||w.eat(125))&&w.raise("Lone quantifier brackets")),w.maxBackReference>w.numCapturingParens&&w.raise("Invalid escape");for(var M=0,J=w.backReferenceNames;M=16;for(M&&(w.branchID=new Wr(w.branchID,null)),this.regexp_alternative(w);w.eat(124);)M&&(w.branchID=w.branchID.sibling()),this.regexp_alternative(w);M&&(w.branchID=w.branchID.parent),this.regexp_eatQuantifier(w,!0)&&w.raise("Nothing to repeat"),w.eat(123)&&w.raise("Lone quantifier brackets")},Rt.regexp_alternative=function(w){for(;w.pos=9&&(J=w.eat(60)),w.eat(61)||w.eat(33))return this.regexp_disjunction(w),w.eat(41)||w.raise("Unterminated group"),w.lastAssertionIsQuantifiable=!J,!0}return w.pos=M,!1},Rt.regexp_eatQuantifier=function(w,M){return M===void 0&&(M=!1),this.regexp_eatQuantifierPrefix(w,M)?(w.eat(63),!0):!1},Rt.regexp_eatQuantifierPrefix=function(w,M){return w.eat(42)||w.eat(43)||w.eat(63)||this.regexp_eatBracedQuantifier(w,M)},Rt.regexp_eatBracedQuantifier=function(w,M){var J=w.pos;if(w.eat(123)){var le=0,De=-1;if(this.regexp_eatDecimalDigits(w)&&(le=w.lastIntValue,w.eat(44)&&this.regexp_eatDecimalDigits(w)&&(De=w.lastIntValue),w.eat(125)))return De!==-1&&De=9?this.regexp_groupSpecifier(w):w.current()===63&&w.raise("Invalid group"),this.regexp_disjunction(w),w.eat(41))return w.numCapturingParens+=1,!0;w.raise("Unterminated group")}return!1},Rt.regexp_eatExtendedAtom=function(w){return w.eat(46)||this.regexp_eatReverseSolidusAtomEscape(w)||this.regexp_eatCharacterClass(w)||this.regexp_eatUncapturingGroup(w)||this.regexp_eatCapturingGroup(w)||this.regexp_eatInvalidBracedQuantifier(w)||this.regexp_eatExtendedPatternCharacter(w)},Rt.regexp_eatInvalidBracedQuantifier=function(w){return this.regexp_eatBracedQuantifier(w,!0)&&w.raise("Nothing to repeat"),!1},Rt.regexp_eatSyntaxCharacter=function(w){var M=w.current();return Xn(M)?(w.lastIntValue=M,w.advance(),!0):!1};function Xn(w){return w===36||w>=40&&w<=43||w===46||w===63||w>=91&&w<=94||w>=123&&w<=125}Rt.regexp_eatPatternCharacters=function(w){for(var M=w.pos,J=0;(J=w.current())!==-1&&!Xn(J);)w.advance();return w.pos!==M},Rt.regexp_eatExtendedPatternCharacter=function(w){var M=w.current();return M!==-1&&M!==36&&!(M>=40&&M<=43)&&M!==46&&M!==63&&M!==91&&M!==94&&M!==124?(w.advance(),!0):!1},Rt.regexp_groupSpecifier=function(w){if(w.eat(63)){this.regexp_eatGroupName(w)||w.raise("Invalid group");var M=this.options.ecmaVersion>=16,J=w.groupNames[w.lastStringValue];if(J)if(M)for(var le=0,De=J;le=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),ai(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function ai(w){return b(w,!0)||w===36||w===95}Rt.regexp_eatRegExpIdentifierPart=function(w){var M=w.pos,J=this.options.ecmaVersion>=11,le=w.current(J);return w.advance(J),le===92&&this.regexp_eatRegExpUnicodeEscapeSequence(w,J)&&(le=w.lastIntValue),oi(le)?(w.lastIntValue=le,!0):(w.pos=M,!1)};function oi(w){return S(w,!0)||w===36||w===95||w===8204||w===8205}Rt.regexp_eatAtomEscape=function(w){return this.regexp_eatBackReference(w)||this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)||w.switchN&&this.regexp_eatKGroupName(w)?!0:(w.switchU&&(w.current()===99&&w.raise("Invalid unicode escape"),w.raise("Invalid escape")),!1)},Rt.regexp_eatBackReference=function(w){var M=w.pos;if(this.regexp_eatDecimalEscape(w)){var J=w.lastIntValue;if(w.switchU)return J>w.maxBackReference&&(w.maxBackReference=J),!0;if(J<=w.numCapturingParens)return!0;w.pos=M}return!1},Rt.regexp_eatKGroupName=function(w){if(w.eat(107)){if(this.regexp_eatGroupName(w))return w.backReferenceNames.push(w.lastStringValue),!0;w.raise("Invalid named reference")}return!1},Rt.regexp_eatCharacterEscape=function(w){return this.regexp_eatControlEscape(w)||this.regexp_eatCControlLetter(w)||this.regexp_eatZero(w)||this.regexp_eatHexEscapeSequence(w)||this.regexp_eatRegExpUnicodeEscapeSequence(w,!1)||!w.switchU&&this.regexp_eatLegacyOctalEscapeSequence(w)||this.regexp_eatIdentityEscape(w)},Rt.regexp_eatCControlLetter=function(w){var M=w.pos;if(w.eat(99)){if(this.regexp_eatControlLetter(w))return!0;w.pos=M}return!1},Rt.regexp_eatZero=function(w){return w.current()===48&&!li(w.lookahead())?(w.lastIntValue=0,w.advance(),!0):!1},Rt.regexp_eatControlEscape=function(w){var M=w.current();return M===116?(w.lastIntValue=9,w.advance(),!0):M===110?(w.lastIntValue=10,w.advance(),!0):M===118?(w.lastIntValue=11,w.advance(),!0):M===102?(w.lastIntValue=12,w.advance(),!0):M===114?(w.lastIntValue=13,w.advance(),!0):!1},Rt.regexp_eatControlLetter=function(w){var M=w.current();return Yn(M)?(w.lastIntValue=M%32,w.advance(),!0):!1};function Yn(w){return w>=65&&w<=90||w>=97&&w<=122}Rt.regexp_eatRegExpUnicodeEscapeSequence=function(w,M){M===void 0&&(M=!1);var J=w.pos,le=M||w.switchU;if(w.eat(117)){if(this.regexp_eatFixedHexDigits(w,4)){var De=w.lastIntValue;if(le&&De>=55296&&De<=56319){var He=w.pos;if(w.eat(92)&&w.eat(117)&&this.regexp_eatFixedHexDigits(w,4)){var tt=w.lastIntValue;if(tt>=56320&&tt<=57343)return w.lastIntValue=(De-55296)*1024+(tt-56320)+65536,!0}w.pos=He,w.lastIntValue=De}return!0}if(le&&w.eat(123)&&this.regexp_eatHexDigits(w)&&w.eat(125)&&us(w.lastIntValue))return!0;le&&w.raise("Invalid unicode escape"),w.pos=J}return!1};function us(w){return w>=0&&w<=1114111}Rt.regexp_eatIdentityEscape=function(w){if(w.switchU)return this.regexp_eatSyntaxCharacter(w)?!0:w.eat(47)?(w.lastIntValue=47,!0):!1;var M=w.current();return M!==99&&(!w.switchN||M!==107)?(w.lastIntValue=M,w.advance(),!0):!1},Rt.regexp_eatDecimalEscape=function(w){w.lastIntValue=0;var M=w.current();if(M>=49&&M<=57){do w.lastIntValue=10*w.lastIntValue+(M-48),w.advance();while((M=w.current())>=48&&M<=57);return!0}return!1};var cs=0,mn=1,Jr=2;Rt.regexp_eatCharacterClassEscape=function(w){var M=w.current();if(fs(M))return w.lastIntValue=-1,w.advance(),mn;var J=!1;if(w.switchU&&this.options.ecmaVersion>=9&&((J=M===80)||M===112)){w.lastIntValue=-1,w.advance();var le;if(w.eat(123)&&(le=this.regexp_eatUnicodePropertyValueExpression(w))&&w.eat(125))return J&&le===Jr&&w.raise("Invalid property name"),le;w.raise("Invalid property name")}return cs};function fs(w){return w===100||w===68||w===115||w===83||w===119||w===87}Rt.regexp_eatUnicodePropertyValueExpression=function(w){var M=w.pos;if(this.regexp_eatUnicodePropertyName(w)&&w.eat(61)){var J=w.lastStringValue;if(this.regexp_eatUnicodePropertyValue(w)){var le=w.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(w,J,le),mn}}if(w.pos=M,this.regexp_eatLoneUnicodePropertyNameOrValue(w)){var De=w.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(w,De)}return cs},Rt.regexp_validateUnicodePropertyNameAndValue=function(w,M,J){K(w.unicodeProperties.nonBinary,M)||w.raise("Invalid property name"),w.unicodeProperties.nonBinary[M].test(J)||w.raise("Invalid property value")},Rt.regexp_validateUnicodePropertyNameOrValue=function(w,M){if(w.unicodeProperties.binary.test(M))return mn;if(w.switchV&&w.unicodeProperties.binaryOfStrings.test(M))return Jr;w.raise("Invalid property name")},Rt.regexp_eatUnicodePropertyName=function(w){var M=0;for(w.lastStringValue="";ws(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function ws(w){return Yn(w)||w===95}Rt.regexp_eatUnicodePropertyValue=function(w){var M=0;for(w.lastStringValue="";Wi(M=w.current());)w.lastStringValue+=z(M),w.advance();return w.lastStringValue!==""};function Wi(w){return ws(w)||li(w)}Rt.regexp_eatLoneUnicodePropertyNameOrValue=function(w){return this.regexp_eatUnicodePropertyValue(w)},Rt.regexp_eatCharacterClass=function(w){if(w.eat(91)){var M=w.eat(94),J=this.regexp_classContents(w);return w.eat(93)||w.raise("Unterminated character class"),M&&J===Jr&&w.raise("Negated character class may contain strings"),!0}return!1},Rt.regexp_classContents=function(w){return w.current()===93?mn:w.switchV?this.regexp_classSetExpression(w):(this.regexp_nonEmptyClassRanges(w),mn)},Rt.regexp_nonEmptyClassRanges=function(w){for(;this.regexp_eatClassAtom(w);){var M=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassAtom(w)){var J=w.lastIntValue;w.switchU&&(M===-1||J===-1)&&w.raise("Invalid character class"),M!==-1&&J!==-1&&M>J&&w.raise("Range out of order in character class")}}},Rt.regexp_eatClassAtom=function(w){var M=w.pos;if(w.eat(92)){if(this.regexp_eatClassEscape(w))return!0;if(w.switchU){var J=w.current();(J===99||ui(J))&&w.raise("Invalid class escape"),w.raise("Invalid escape")}w.pos=M}var le=w.current();return le!==93?(w.lastIntValue=le,w.advance(),!0):!1},Rt.regexp_eatClassEscape=function(w){var M=w.pos;if(w.eat(98))return w.lastIntValue=8,!0;if(w.switchU&&w.eat(45))return w.lastIntValue=45,!0;if(!w.switchU&&w.eat(99)){if(this.regexp_eatClassControlLetter(w))return!0;w.pos=M}return this.regexp_eatCharacterClassEscape(w)||this.regexp_eatCharacterEscape(w)},Rt.regexp_classSetExpression=function(w){var M=mn,J;if(!this.regexp_eatClassSetRange(w))if(J=this.regexp_eatClassSetOperand(w)){J===Jr&&(M=Jr);for(var le=w.pos;w.eatChars([38,38]);){if(w.current()!==38&&(J=this.regexp_eatClassSetOperand(w))){J!==Jr&&(M=mn);continue}w.raise("Invalid character in character class")}if(le!==w.pos)return M;for(;w.eatChars([45,45]);)this.regexp_eatClassSetOperand(w)||w.raise("Invalid character in character class");if(le!==w.pos)return M}else w.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(w)){if(J=this.regexp_eatClassSetOperand(w),!J)return M;J===Jr&&(M=Jr)}},Rt.regexp_eatClassSetRange=function(w){var M=w.pos;if(this.regexp_eatClassSetCharacter(w)){var J=w.lastIntValue;if(w.eat(45)&&this.regexp_eatClassSetCharacter(w)){var le=w.lastIntValue;return J!==-1&&le!==-1&&J>le&&w.raise("Range out of order in character class"),!0}w.pos=M}return!1},Rt.regexp_eatClassSetOperand=function(w){return this.regexp_eatClassSetCharacter(w)?mn:this.regexp_eatClassStringDisjunction(w)||this.regexp_eatNestedClass(w)},Rt.regexp_eatNestedClass=function(w){var M=w.pos;if(w.eat(91)){var J=w.eat(94),le=this.regexp_classContents(w);if(w.eat(93))return J&&le===Jr&&w.raise("Negated character class may contain strings"),le;w.pos=M}if(w.eat(92)){var De=this.regexp_eatCharacterClassEscape(w);if(De)return De;w.pos=M}return null},Rt.regexp_eatClassStringDisjunction=function(w){var M=w.pos;if(w.eatChars([92,113])){if(w.eat(123)){var J=this.regexp_classStringDisjunctionContents(w);if(w.eat(125))return J}else w.raise("Invalid escape");w.pos=M}return null},Rt.regexp_classStringDisjunctionContents=function(w){for(var M=this.regexp_classString(w);w.eat(124);)this.regexp_classString(w)===Jr&&(M=Jr);return M},Rt.regexp_classString=function(w){for(var M=0;this.regexp_eatClassSetCharacter(w);)M++;return M===1?mn:Jr},Rt.regexp_eatClassSetCharacter=function(w){var M=w.pos;if(w.eat(92))return this.regexp_eatCharacterEscape(w)||this.regexp_eatClassSetReservedPunctuator(w)?!0:w.eat(98)?(w.lastIntValue=8,!0):(w.pos=M,!1);var J=w.current();return J<0||J===w.lookahead()&&Gi(J)||Eo(J)?!1:(w.advance(),w.lastIntValue=J,!0)};function Gi(w){return w===33||w>=35&&w<=38||w>=42&&w<=44||w===46||w>=58&&w<=64||w===94||w===96||w===126}function Eo(w){return w===40||w===41||w===45||w===47||w>=91&&w<=93||w>=123&&w<=125}Rt.regexp_eatClassSetReservedPunctuator=function(w){var M=w.current();return ya(M)?(w.lastIntValue=M,w.advance(),!0):!1};function ya(w){return w===33||w===35||w===37||w===38||w===44||w===45||w>=58&&w<=62||w===64||w===96||w===126}Rt.regexp_eatClassControlLetter=function(w){var M=w.current();return li(M)||M===95?(w.lastIntValue=M%32,w.advance(),!0):!1},Rt.regexp_eatHexEscapeSequence=function(w){var M=w.pos;if(w.eat(120)){if(this.regexp_eatFixedHexDigits(w,2))return!0;w.switchU&&w.raise("Invalid escape"),w.pos=M}return!1},Rt.regexp_eatDecimalDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;li(J=w.current());)w.lastIntValue=10*w.lastIntValue+(J-48),w.advance();return w.pos!==M};function li(w){return w>=48&&w<=57}Rt.regexp_eatHexDigits=function(w){var M=w.pos,J=0;for(w.lastIntValue=0;Ws(J=w.current());)w.lastIntValue=16*w.lastIntValue+ba(J),w.advance();return w.pos!==M};function Ws(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function ba(w){return w>=65&&w<=70?10+(w-65):w>=97&&w<=102?10+(w-97):w-48}Rt.regexp_eatLegacyOctalEscapeSequence=function(w){if(this.regexp_eatOctalDigit(w)){var M=w.lastIntValue;if(this.regexp_eatOctalDigit(w)){var J=w.lastIntValue;M<=3&&this.regexp_eatOctalDigit(w)?w.lastIntValue=M*64+J*8+w.lastIntValue:w.lastIntValue=M*8+J}else w.lastIntValue=M;return!0}return!1},Rt.regexp_eatOctalDigit=function(w){var M=w.current();return ui(M)?(w.lastIntValue=M-48,w.advance(),!0):(w.lastIntValue=0,!1)};function ui(w){return w>=48&&w<=55}Rt.regexp_eatFixedHexDigits=function(w,M){var J=w.pos;w.lastIntValue=0;for(var le=0;le=this.input.length)return this.finishToken(P.eof);if(w.override)return w.override(this);this.readToken(this.fullCharCodeAtPos())},fr.readToken=function(w){return b(w,this.options.ecmaVersion>=6)||w===92?this.readWord():this.getTokenFromCode(w)},fr.fullCharCodeAtPos=function(){var w=this.input.charCodeAt(this.pos);if(w<=55295||w>=56320)return w;var M=this.input.charCodeAt(this.pos+1);return M<=56319||M>=57344?w:(w<<10)+M-56613888},fr.skipBlockComment=function(){var w=this.options.onComment&&this.curPosition(),M=this.pos,J=this.input.indexOf("*/",this.pos+=2);if(J===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=J+2,this.options.locations)for(var le=void 0,De=M;(le=j(this.input,De,this.pos))>-1;)++this.curLine,De=this.lineStart=le;this.options.onComment&&this.options.onComment(!0,this.input.slice(M+2,J),M,this.pos,w,this.curPosition())},fr.skipLineComment=function(w){for(var M=this.pos,J=this.options.onComment&&this.curPosition(),le=this.input.charCodeAt(this.pos+=w);this.pos8&&w<14||w>=5760&&G.test(String.fromCharCode(w)))++this.pos;else break e}}},fr.finishToken=function(w,M){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var J=this.type;this.type=w,this.value=M,this.updateContext(J)},fr.readToken_dot=function(){var w=this.input.charCodeAt(this.pos+1);if(w>=48&&w<=57)return this.readNumber(!0);var M=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&w===46&&M===46?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},fr.readToken_slash=function(){var w=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):w===61?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},fr.readToken_mult_modulo_exp=function(w){var M=this.input.charCodeAt(this.pos+1),J=1,le=w===42?P.star:P.modulo;return this.options.ecmaVersion>=7&&w===42&&M===42&&(++J,le=P.starstar,M=this.input.charCodeAt(this.pos+2)),M===61?this.finishOp(P.assign,J+1):this.finishOp(le,J)},fr.readToken_pipe_amp=function(w){var M=this.input.charCodeAt(this.pos+1);if(M===w){if(this.options.ecmaVersion>=12){var J=this.input.charCodeAt(this.pos+2);if(J===61)return this.finishOp(P.assign,3)}return this.finishOp(w===124?P.logicalOR:P.logicalAND,2)}return M===61?this.finishOp(P.assign,2):this.finishOp(w===124?P.bitwiseOR:P.bitwiseAND,1)},fr.readToken_caret=function(){var w=this.input.charCodeAt(this.pos+1);return w===61?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},fr.readToken_plus_min=function(w){var M=this.input.charCodeAt(this.pos+1);return M===w?M===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):M===61?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},fr.readToken_lt_gt=function(w){var M=this.input.charCodeAt(this.pos+1),J=1;return M===w?(J=w===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+J)===61?this.finishOp(P.assign,J+1):this.finishOp(P.bitShift,J)):M===33&&w===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(M===61&&(J=2),this.finishOp(P.relational,J))},fr.readToken_eq_excl=function(w){var M=this.input.charCodeAt(this.pos+1);return M===61?this.finishOp(P.equality,this.input.charCodeAt(this.pos+2)===61?3:2):w===61&&M===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(w===61?P.eq:P.prefix,1)},fr.readToken_question=function(){var w=this.options.ecmaVersion;if(w>=11){var M=this.input.charCodeAt(this.pos+1);if(M===46){var J=this.input.charCodeAt(this.pos+2);if(J<48||J>57)return this.finishOp(P.questionDot,2)}if(M===63){if(w>=12){var le=this.input.charCodeAt(this.pos+2);if(le===61)return this.finishOp(P.assign,3)}return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},fr.readToken_numberSign=function(){var w=this.options.ecmaVersion,M=35;if(w>=13&&(++this.pos,M=this.fullCharCodeAtPos(),b(M,!0)||M===92))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(M)+"'")},fr.getTokenFromCode=function(w){switch(w){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var M=this.input.charCodeAt(this.pos+1);if(M===120||M===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(M===111||M===79)return this.readRadixNumber(8);if(M===98||M===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(w);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(w);case 124:case 38:return this.readToken_pipe_amp(w);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(w);case 60:case 62:return this.readToken_lt_gt(w);case 61:case 33:return this.readToken_eq_excl(w);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(w)+"'")},fr.finishOp=function(w,M){var J=this.input.slice(this.pos,this.pos+M);return this.pos+=M,this.finishToken(w,J)},fr.readRegexp=function(){for(var w,M,J=this.pos;;){this.pos>=this.input.length&&this.raise(J,"Unterminated regular expression");var le=this.input.charAt(this.pos);if(N.test(le)&&this.raise(J,"Unterminated regular expression"),w)w=!1;else{if(le==="[")M=!0;else if(le==="]"&&M)M=!1;else if(le==="/"&&!M)break;w=le==="\\"}++this.pos}var De=this.input.slice(J,this.pos);++this.pos;var He=this.pos,tt=this.readWord1();this.containsEsc&&this.unexpected(He);var wt=this.regexpState||(this.regexpState=new Mr(this));wt.reset(J,De,tt),this.validateRegExpFlags(wt),this.validateRegExpPattern(wt);var Tt=null;try{Tt=new RegExp(De,tt)}catch{}return this.finishToken(P.regexp,{pattern:De,flags:tt,value:Tt})},fr.readInt=function(w,M,J){for(var le=this.options.ecmaVersion>=12&&M===void 0,De=J&&this.input.charCodeAt(this.pos)===48,He=this.pos,tt=0,wt=0,Tt=0,Xt=M??1/0;Tt=97?jr=Jt-97+10:Jt>=65?jr=Jt-65+10:Jt>=48&&Jt<=57?jr=Jt-48:jr=1/0,jr>=w)break;wt=Jt,tt=tt*w+jr}return le&&wt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||M!=null&&this.pos-He!==M?null:tt};function Co(w,M){return M?parseInt(w,8):parseFloat(w.replace(/_/g,""))}function fi(w){return typeof BigInt!="function"?null:BigInt(w.replace(/_/g,""))}fr.readRadixNumber=function(w){var M=this.pos;this.pos+=2;var J=this.readInt(w);return J==null&&this.raise(this.start+2,"Expected number in radix "+w),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(J=fi(this.input.slice(M,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,J)},fr.readNumber=function(w){var M=this.pos;!w&&this.readInt(10,void 0,!0)===null&&this.raise(M,"Invalid number");var J=this.pos-M>=2&&this.input.charCodeAt(M)===48;J&&this.strict&&this.raise(M,"Invalid number");var le=this.input.charCodeAt(this.pos);if(!J&&!w&&this.options.ecmaVersion>=11&&le===110){var De=fi(this.input.slice(M,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,De)}J&&/[89]/.test(this.input.slice(M,this.pos))&&(J=!1),le===46&&!J&&(++this.pos,this.readInt(10),le=this.input.charCodeAt(this.pos)),(le===69||le===101)&&!J&&(le=this.input.charCodeAt(++this.pos),(le===43||le===45)&&++this.pos,this.readInt(10)===null&&this.raise(M,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Co(this.input.slice(M,this.pos),J);return this.finishToken(P.num,He)},fr.readCodePoint=function(){var w=this.input.charCodeAt(this.pos),M;if(w===123){this.options.ecmaVersion<6&&this.unexpected();var J=++this.pos;M=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,M>1114111&&this.invalidStringToken(J,"Code point out of bounds")}else M=this.readHexChar(4);return M},fr.readString=function(w){for(var M="",J=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var le=this.input.charCodeAt(this.pos);if(le===w)break;le===92?(M+=this.input.slice(J,this.pos),M+=this.readEscapedChar(!1),J=this.pos):le===8232||le===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(L(le)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return M+=this.input.slice(J,this.pos++),this.finishToken(P.string,M)};var nt={};fr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(w){if(w===nt)this.readInvalidTemplateToken();else throw w}this.inTemplateElement=!1},fr.invalidStringToken=function(w,M){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nt;this.raise(w,M)},fr.readTmplToken=function(){for(var w="",M=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var J=this.input.charCodeAt(this.pos);if(J===96||J===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===P.template||this.type===P.invalidTemplate)?J===36?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote)):(w+=this.input.slice(M,this.pos),this.finishToken(P.template,w));if(J===92)w+=this.input.slice(M,this.pos),w+=this.readEscapedChar(!0),M=this.pos;else if(L(J)){switch(w+=this.input.slice(M,this.pos),++this.pos,J){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:w+=` +`;break;default:w+=String.fromCharCode(J);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),M=this.pos}else++this.pos}},fr.readInvalidTemplateToken=function(){for(;this.pos=48&&M<=55){var le=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],De=parseInt(le,8);return De>255&&(le=le.slice(0,-1),De=parseInt(le,8)),this.pos+=le.length-1,M=this.input.charCodeAt(this.pos),(le!=="0"||M===56||M===57)&&(this.strict||w)&&this.invalidStringToken(this.pos-1-le.length,w?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(De)}return L(M)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(M)}},fr.readHexChar=function(w){var M=this.pos,J=this.readInt(16,w);return J===null&&this.invalidStringToken(M,"Bad character escape sequence"),J},fr.readWord1=function(){this.containsEsc=!1;for(var w="",M=!0,J=this.pos,le=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Uc}var NO;function bL(){return NO||(NO=1,function(c){const s=yL(),u=/^[\da-fA-F]+$/,p=/^\d+$/,a=new WeakMap;function d(o){o=o.Parser.acorn||o;let y=a.get(o);if(!y){const O=o.tokTypes,x=o.TokContext,g=o.TokenType,f=new x("...",!0,!0),E={tc_oTag:f,tc_cTag:b,tc_expr:S},k={jsxName:new g("jsxName"),jsxText:new g("jsxText",{beforeExpr:!0}),jsxTagStart:new g("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new g("jsxTagEnd")};k.jsxTagStart.updateContext=function(){this.context.push(S),this.context.push(f),this.exprAllowed=!1},k.jsxTagEnd.updateContext=function(D){let T=this.context.pop();T===f&&D===O.slash||T===b?(this.context.pop(),this.exprAllowed=this.curContext()===S):this.exprAllowed=!0},y={tokContexts:E,tokTypes:k},a.set(o,y)}return y}function v(o){if(!o)return o;if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return v(o.object)+"."+v(o.property)}c.exports=function(o){return o=o||{},function(y){return m({allowNamespaces:o.allowNamespaces!==!1,allowNamespacedObjects:!!o.allowNamespacedObjects},y)}},Object.defineProperty(c.exports,"tokTypes",{get:function(){return d(qc()).tokTypes},configurable:!0,enumerable:!0});function m(o,y){const O=y.acorn||qc(),x=d(O),g=O.tokTypes,f=x.tokTypes,b=O.tokContexts,S=x.tokContexts.tc_oTag,E=x.tokContexts.tc_cTag,k=x.tokContexts.tc_expr,D=O.isNewLine,T=O.isIdentifierStart,R=O.isIdentifierChar;return class extends y{static get acornJsx(){return x}jsx_readToken(){let F="",P=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let N=this.input.charCodeAt(this.pos);switch(N){case 60:case 123:return this.pos===this.start?N===60&&this.exprAllowed?(++this.pos,this.finishToken(f.jsxTagStart)):this.getTokenFromCode(N):(F+=this.input.slice(P,this.pos),this.finishToken(f.jsxText,F));case 38:F+=this.input.slice(P,this.pos),F+=this.jsx_readEntity(),P=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(N===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:D(N)?(F+=this.input.slice(P,this.pos),F+=this.jsx_readNewLine(!0),P=this.pos):++this.pos}}}jsx_readNewLine(F){let P=this.input.charCodeAt(this.pos),N;return++this.pos,P===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,N=F?` +`:`\r +`):N=String.fromCharCode(P),this.options.locations&&(++this.curLine,this.lineStart=this.pos),N}jsx_readString(F){let P="",N=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let I=this.input.charCodeAt(this.pos);if(I===F)break;I===38?(P+=this.input.slice(N,this.pos),P+=this.jsx_readEntity(),N=this.pos):D(I)?(P+=this.input.slice(N,this.pos),P+=this.jsx_readNewLine(!1),N=this.pos):++this.pos}return P+=this.input.slice(N,this.pos++),this.finishToken(g.string,P)}jsx_readEntity(){let F="",P=0,N,I=this.input[this.pos];I!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let L=++this.pos;for(;this.pos")}let G=L.name?"Element":"Fragment";return N["opening"+G]=L,N["closing"+G]=j,N.children=I,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(N,"JSX"+G)}jsx_parseText(){let F=this.parseLiteral(this.value);return F.type="JSXText",F}jsx_parseElement(){let F=this.start,P=this.startLoc;return this.next(),this.jsx_parseElementAt(F,P)}parseExprAtom(F){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(F)}readToken(F){let P=this.curContext();if(P===k)return this.jsx_readToken();if(P===S||P===E){if(T(F))return this.jsx_readWord();if(F==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((F===34||F===39)&&P==S)return this.jsx_readString(F)}return F===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(F)}updateContext(F){if(this.type==g.braceL){var P=this.curContext();P==S?this.context.push(b.b_expr):P==k?this.context.push(b.b_tmpl):super.updateContext(F),this.exprAllowed=!0}else if(this.type===g.slash&&F===f.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(F)}}}}(Qc)),Qc.exports}var uo={},MO;function vL(){if(MO)return uo;MO=1;const c={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s=Object.keys(c);for(const v of s)Object.freeze(c[v]);Object.freeze(c);const u=new Set(["parent","leadingComments","trailingComments"]);function p(v){return!u.has(v)&&v[0]!=="_"}function a(v){return Object.keys(v).filter(p)}function d(v){const m=Object.assign({},c);for(const o of Object.keys(v))if(Object.hasOwn(m,o)){const y=new Set(v[o]);for(const O of m[o])y.add(O);m[o]=Object.freeze(Array.from(y))}else m[o]=Object.freeze(Array.from(v[o]));return Object.freeze(m)}return uo.KEYS=c,uo.getKeys=a,uo.unionWith=d,uo}var $O;function Pl(){if($O)return as;$O=1,Object.defineProperty(as,"__esModule",{value:!0});var c=qc(),s=bL(),u=vL();function p(W){return W&&typeof W=="object"&&"default"in W?W:{default:W}}function a(W){if(W&&W.__esModule)return W;var K=Object.create(null);return W&&Object.keys(W).forEach(function(te){if(te!=="default"){var V=Object.getOwnPropertyDescriptor(W,te);Object.defineProperty(K,te,V.get?V:{enumerable:!0,get:function(){return W[te]}})}}),K.default=W,Object.freeze(K)}var d=a(c),v=p(s),m=a(u);const o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function y(W,K){const te=W[0],V=W.at(-1),ae={type:o.Template,value:K.slice(te.start,V.end)};return te.loc&&(ae.loc={start:te.loc.start,end:V.loc.end}),te.range&&(ae.start=te.range[0],ae.end=V.range[1],ae.range=[ae.start,ae.end]),ae}function O(W,K){this._acornTokTypes=W,this._tokens=[],this._curlyBrace=null,this._code=K}O.prototype={constructor:O,translate(W,K){const te=W.type,V=this._acornTokTypes;if(te===V.name)W.type=o.Identifier,W.value==="static"&&(W.type=o.Keyword),K.ecmaVersion>5&&(W.value==="yield"||W.value==="let")&&(W.type=o.Keyword);else if(te===V.privateId)W.type=o.PrivateIdentifier;else if(te===V.semi||te===V.comma||te===V.parenL||te===V.parenR||te===V.braceL||te===V.braceR||te===V.dot||te===V.bracketL||te===V.colon||te===V.question||te===V.bracketR||te===V.ellipsis||te===V.arrow||te===V.jsxTagStart||te===V.incDec||te===V.starstar||te===V.jsxTagEnd||te===V.prefix||te===V.questionDot||te.binop&&!te.keyword||te.isAssign)W.type=o.Punctuator,W.value=this._code.slice(W.start,W.end);else if(te===V.jsxName)W.type=o.JSXIdentifier;else if(te.label==="jsxText"||te===V.jsxAttrValueToken)W.type=o.JSXText;else if(te.keyword)te.keyword==="true"||te.keyword==="false"?W.type=o.Boolean:te.keyword==="null"?W.type=o.Null:W.type=o.Keyword;else if(te===V.num)W.type=o.Numeric,W.value=this._code.slice(W.start,W.end);else if(te===V.string)K.jsxAttrValueToken?(K.jsxAttrValueToken=!1,W.type=o.JSXText):W.type=o.String,W.value=this._code.slice(W.start,W.end);else if(te===V.regexp){W.type=o.RegularExpression;const ae=W.value;W.regex={flags:ae.flags,pattern:ae.pattern},W.value=`/${ae.pattern}/${ae.flags}`}return W},onToken(W,K){const te=this._acornTokTypes,V=K.tokens,ae=this._tokens,z=()=>{V.push(y(this._tokens,this._code)),this._tokens=[]};if(W.type===te.eof){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K));return}if(W.type===te.backQuote){this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),ae.push(W),ae.length>1&&z();return}if(W.type===te.dollarBraceL){ae.push(W),z();return}if(W.type===te.braceR){this._curlyBrace&&V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=W;return}if(W.type===te.template||W.type===te.invalidTemplate){this._curlyBrace&&(ae.push(this._curlyBrace),this._curlyBrace=null),ae.push(W);return}this._curlyBrace&&(V.push(this.translate(this._curlyBrace,K)),this._curlyBrace=null),V.push(this.translate(W,K))}};const x=[3,5,6,7,8,9,10,11,12,13,14,15,16];function g(){return x.at(-1)}function f(){return[...x]}function b(W=5){let K=W==="latest"?g():W;if(typeof K!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof W} instead.`);if(K>=2015&&(K-=2009),!x.includes(K))throw new Error("Invalid ecmaVersion.");return K}function S(W="script"){if(W==="script"||W==="module")return W;if(W==="commonjs")return"script";throw new Error("Invalid sourceType.")}function E(W){const K=b(W.ecmaVersion),te=S(W.sourceType),V=W.range===!0,ae=W.loc===!0;if(K!==3&&W.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof W.allowReserved<"u"&&typeof W.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");const z=K===3?W.allowReserved||"never":!1,ue=W.ecmaFeatures||{},ne=W.sourceType==="commonjs"||!!ue.globalReturn;if(te==="module"&&K<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},W,{ecmaVersion:K,sourceType:te,ranges:V,locations:ae,allowReserved:z,allowReturnOutsideFunction:ne})}const k=Symbol("espree's internal state"),D=Symbol("espree's esprimaFinishNode");function T(W,K,te,V,ae,z,ue){let ne;W?ne="Block":ue.slice(te,te+2)==="#!"?ne="Hashbang":ne="Line";const ce={type:ne,value:K};return typeof te=="number"&&(ce.start=te,ce.end=V,ce.range=[te,V]),typeof ae=="object"&&(ce.loc={start:ae,end:z}),ce}var R=()=>W=>{const K=Object.assign({},W.acorn.tokTypes);return W.acornJsx&&Object.assign(K,W.acornJsx.tokTypes),class extends W{constructor(V,ae){(typeof V!="object"||V===null)&&(V={}),typeof ae!="string"&&!(ae instanceof String)&&(ae=String(ae));const z=V.sourceType,ue=E(V),ne=ue.ecmaFeatures||{},ce=ue.tokens===!0?new O(K,ae):null,pe={originalSourceType:z||ue.sourceType,tokens:ce?[]:null,comments:ue.comment===!0?[]:null,impliedStrict:ne.impliedStrict===!0&&ue.ecmaVersion>=5,ecmaVersion:ue.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:ue.ecmaVersion,sourceType:ue.sourceType,ranges:ue.ranges,locations:ue.locations,allowReserved:ue.allowReserved,allowReturnOutsideFunction:ue.allowReturnOutsideFunction,onToken(Be){ce&&ce.onToken(Be,pe),Be.type!==K.eof&&(pe.lastToken=Be)},onComment(Be,oe,Z,ge,Re,Se){if(pe.comments){const we=T(Be,oe,Z,ge,Re,Se,ae);pe.comments.push(we)}}},ae),this[k]=pe}tokenize(){do this.next();while(this.type!==K.eof);this.next();const V=this[k],ae=V.tokens;return V.comments&&(ae.comments=V.comments),ae}finishNode(...V){const ae=super.finishNode(...V);return this[D](ae)}finishNodeAt(...V){const ae=super.finishNodeAt(...V);return this[D](ae)}parse(){const V=this[k],ae=super.parse();if(ae.sourceType=V.originalSourceType,V.comments&&(ae.comments=V.comments),V.tokens&&(ae.tokens=V.tokens),ae.body.length){const[z]=ae.body;ae.range&&(ae.range[0]=z.range[0]),ae.loc&&(ae.loc.start=z.loc.start),ae.start=z.start}return V.lastToken&&(ae.range&&(ae.range[1]=V.lastToken.range[1]),ae.loc&&(ae.loc.end=V.lastToken.loc.end),ae.end=V.lastToken.end),this[k].templateElements.forEach(z=>{const ne=z.tail?1:2;z.start+=-1,z.end+=ne,z.range&&(z.range[0]+=-1,z.range[1]+=ne),z.loc&&(z.loc.start.column+=-1,z.loc.end.column+=ne)}),ae}parseTopLevel(V){return this[k].impliedStrict&&(this.strict=!0),super.parseTopLevel(V)}raise(V,ae){const z=W.acorn.getLineInfo(this.input,V),ue=new SyntaxError(ae);throw ue.index=V,ue.lineNumber=z.line,ue.column=z.column+1,ue}raiseRecoverable(V,ae){this.raise(V,ae)}unexpected(V){let ae="Unexpected token";if(V!=null){if(this.pos=V,this.options.locations)for(;this.posthis.start&&(ae+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,ae)}jsx_readString(V){const ae=super.jsx_readString(V);return this.type===K.string&&(this[k].jsxAttrValueToken=!0),ae}[D](V){return V.type==="TemplateElement"&&this[k].templateElements.push(V),V.type.includes("Function")&&!V.generator&&(V.generator=!1),V}}};const F="10.2.0",P={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=d.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=d.Parser.extend(v.default(),R())),this._jsx},get(W){return!!(W&&W.ecmaFeatures&&W.ecmaFeatures.jsx)?this.jsx:this.regular}};function N(W,K){const te=P.get(K);return(!K||K.tokens!==!0)&&(K=Object.assign({},K,{tokens:!0})),new te(K,W).tokenize()}function I(W,K){const te=P.get(K);return new te(K,W).parse()}const L=F,j="espree",G=function(){return m.KEYS}(),U=function(){let W,K={};typeof Object.create=="function"&&(K=Object.create(null));for(W in G)Object.hasOwn(G,W)&&(K[W]=W);return typeof Object.freeze=="function"&&Object.freeze(K),K}(),Q=g(),$=f();return as.Syntax=U,as.VisitorKeys=G,as.latestEcmaVersion=Q,as.name=j,as.parse=I,as.supportedEcmaVersions=$,as.tokenize=N,as.version=L,as}var co={exports:{}};co.exports;var jO;function xL(){return jO||(jO=1,function(c,s){var u=200,p="__lodash_hash_undefined__",a=800,d=16,v=9007199254740991,m="[object Arguments]",o="[object Array]",y="[object AsyncFunction]",O="[object Boolean]",x="[object Date]",g="[object Error]",f="[object Function]",b="[object GeneratorFunction]",S="[object Map]",E="[object Number]",k="[object Null]",D="[object Object]",T="[object Proxy]",R="[object RegExp]",F="[object Set]",P="[object String]",N="[object Undefined]",I="[object WeakMap]",L="[object ArrayBuffer]",j="[object DataView]",G="[object Float32Array]",U="[object Float64Array]",Q="[object Int8Array]",$="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",te="[object Uint8ClampedArray]",V="[object Uint16Array]",ae="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,ce={};ce[G]=ce[U]=ce[Q]=ce[$]=ce[W]=ce[K]=ce[te]=ce[V]=ce[ae]=!0,ce[m]=ce[o]=ce[L]=ce[O]=ce[j]=ce[x]=ce[g]=ce[f]=ce[S]=ce[E]=ce[D]=ce[R]=ce[F]=ce[P]=ce[I]=!1;var pe=typeof h=="object"&&h&&h.Object===Object&&h,Be=typeof self=="object"&&self&&self.Object===Object&&self,oe=pe||Be||Function("return this")(),Z=s&&!s.nodeType&&s,ge=Z&&!0&&c&&!c.nodeType&&c,Re=ge&&ge.exports===Z,Se=Re&&pe.process,we=function(){try{var Fe=ge&&ge.require&&ge.require("util").types;return Fe||Se&&Se.binding&&Se.binding("util")}catch{}}(),Me=we&&we.isTypedArray;function it(Fe,We,st){switch(st.length){case 0:return Fe.call(We);case 1:return Fe.call(We,st[0]);case 2:return Fe.call(We,st[0],st[1]);case 3:return Fe.call(We,st[0],st[1],st[2])}return Fe.apply(We,st)}function pt(Fe,We){for(var st=-1,Gt=Array(Fe);++st-1}function Ce(Fe,We){var st=this.__data__,Gt=nr(st,Fe);return Gt<0?(++this.size,st.push([Fe,We])):st[Gt][1]=We,this}Ne.prototype.clear=Ke,Ne.prototype.delete=at,Ne.prototype.get=dt,Ne.prototype.has=ht,Ne.prototype.set=Ce;function xe(Fe){var We=-1,st=Fe==null?0:Fe.length;for(this.clear();++We1?st[br-1]:void 0,Fr=br>2?st[2]:void 0;for(kr=Fe.length>3&&typeof kr=="function"?(br--,kr):void 0,Fr&&li(st[0],st[1],Fr)&&(kr=br<3?void 0:kr,br=1),We=Object(We);++Gt-1&&Fe%1==0&&Fe0){if(++We>=a)return arguments[0]}else We=0;return Fe.apply(void 0,arguments)}}function he(Fe){if(Fe!=null){try{return Pt.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function Ae(Fe,We){return Fe===We||Fe!==Fe&&We!==We}var Xe=wn(function(){return arguments}())?wn:function(Fe){return wt(Fe)&&Bt.call(Fe,"callee")&&!Et.call(Fe,"callee")},w=Array.isArray;function M(Fe){return Fe!=null&&He(Fe.length)&&!De(Fe)}function J(Fe){return wt(Fe)&&M(Fe)}var le=Ue||va;function De(Fe){if(!tt(Fe))return!1;var We=Nr(Fe);return We==f||We==b||We==y||We==T}function He(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=v}function tt(Fe){var We=typeof Fe;return Fe!=null&&(We=="object"||We=="function")}function wt(Fe){return Fe!=null&&typeof Fe=="object"}function Tt(Fe){if(!wt(Fe)||Nr(Fe)!=D)return!1;var We=Dt(Fe);if(We===null)return!0;var st=Bt.call(We,"constructor")&&We.constructor;return typeof st=="function"&&st instanceof st&&Pt.call(st)==Vt}var Xt=Me?kt(Me):Rt;function Jt(Fe){return mn(Fe,jr(Fe))}function jr(Fe){return M(Fe)?Lt(Fe):Wr(Fe)}var Gs=Jr(function(Fe,We,st){Mr(Fe,We,st)});function zi(Fe){return function(){return Fe}}function zs(Fe){return Fe}function va(){return!1}c.exports=Gs}(co,co.exports)),co.exports}var OL="eslint",SL="9.12.0",EL="Nicholas C. Zakas ",CL="An AST-based pattern checker for JavaScript.",wL={eslint:"./bin/eslint.js"},kL="./lib/api.js",AL="./lib/types/index.d.ts",PL={".":{types:"./lib/types/index.d.ts",default:"./lib/api.js"},"./package.json":"./package.json","./use-at-your-own-risk":{types:"./lib/types/use-at-your-own-risk.d.ts",default:"./lib/unsupported-api.js"},"./rules":{types:"./lib/types/rules/index.d.ts"},"./universal":{types:"./lib/types/universal.d.ts",default:"./lib/universal.js"}},TL={"*":{"use-at-your-own-risk":["./lib/types/use-at-your-own-risk.d.ts"],rules:["./lib/types/rules/index.d.ts"],universal:["./lib/types/universal.d.ts"]}},DL={"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js","build:rules-index":"node Makefile.js generateRuleIndexPage",lint:"trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js","lint:docs:js":"trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:unused":"knip","lint:fix":"trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js","lint:fix:docs:js":"trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js","lint:types":"attw --pack","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease -- latest","release:generate:maintenance":"node Makefile.js generateRelease -- maintenance","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:browser":"node Makefile.js wdio","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf","test:emfile":"node tools/check-emfile-handling.js","test:types":"tsc -p tests/lib/types/tsconfig.json"},IL={"pre-commit":"lint-staged"},RL=["LICENSE","README.md","bin","conf","lib","messages"],FL="eslint/eslint",_L="https://eslint.org/donate",BL="https://eslint.org",LL="https://github.com/eslint/eslint/issues/",NL={"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.11.0","@eslint/config-array":"^0.18.0","@eslint/core":"^0.6.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"9.12.0","@eslint/plugin-kit":"^0.2.0","@humanfs/node":"^0.16.5","@humanwhocodes/module-importer":"^1.0.1","@humanwhocodes/retry":"^0.3.1","@types/estree":"^1.0.6","@types/json-schema":"^7.0.15",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2","escape-string-regexp":"^4.0.0","eslint-scope":"^8.1.0","eslint-visitor-keys":"^4.1.0",espree:"^10.2.0",esquery:"^1.5.0",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^8.0.0","find-up":"^5.0.0","glob-parent":"^6.0.2",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","json-stable-stringify-without-jsonify":"^1.0.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","text-table":"^0.2.0"},ML={"@arethetypeswrong/cli":"^0.16.4","@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@eslint/json":"^0.5.0","@trunkio/launcher":"^1.3.0","@types/node":"^20.11.5","@typescript-eslint/parser":"^8.4.0","@wdio/browser-runner":"^9.0.5","@wdio/cli":"^9.0.5","@wdio/concise-reporter":"^9.0.4","@wdio/mocha-framework":"^9.0.5","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-plugin":"^6.0.0","eslint-plugin-expect-type":"^0.4.0","eslint-plugin-yml":"^1.14.0","eslint-release":"^3.3.0","eslint-rule-composer":"^0.3.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^10.0.0",globals:"^15.0.0",got:"^11.8.3","gray-matter":"^4.0.3",jiti:"^2.1.0",knip:"^5.21.0","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",marked:"^4.0.8",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^10.7.3","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.5",sinon:"^11.0.0",typescript:"^5.3.3","vite-plugin-commonjs":"^0.10.0",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},$L={jiti:"*"},jL={jiti:{optional:!0}},qL=["ast","lint","javascript","ecmascript","espree"],QL="MIT",UL={node:"^18.18.0 || ^20.9.0 || >=21.1.0"},VL={name:OL,version:SL,author:EL,description:CL,bin:wL,main:kL,types:AL,exports:PL,typesVersions:TL,scripts:DL,gitHooks:IL,"lint-staged":{"*.js":"trunk check --fix --filter=eslint","*.md":"trunk check --fix --filter=markdownlint","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"trunk check --fix --filter=svgo"},files:RL,repository:FL,funding:_L,homepage:BL,bugs:LL,dependencies:NL,devDependencies:ML,peerDependencies:$L,peerDependenciesMeta:jL,keywords:qL,license:QL,engines:UL},Tl={},xs=[],Zn=[],WL=typeof Uint8Array<"u"?Uint8Array:Array,Vc=!1;function qO(){Vc=!0;for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=c.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");d=c[m-2]==="="?2:c[m-1]==="="?1:0,v=new WL(m*3/4-d),p=d>0?m-4:m;var o=0;for(s=0,u=0;s>16&255,v[o++]=a>>8&255,v[o++]=a&255;return d===2?(a=Zn[c.charCodeAt(s)]<<2|Zn[c.charCodeAt(s+1)]>>4,v[o++]=a&255):d===1&&(a=Zn[c.charCodeAt(s)]<<10|Zn[c.charCodeAt(s+1)]<<4|Zn[c.charCodeAt(s+2)]>>2,v[o++]=a>>8&255,v[o++]=a&255),v}function zL(c){return xs[c>>18&63]+xs[c>>12&63]+xs[c>>6&63]+xs[c&63]}function ZL(c,s,u){for(var p,a=[],d=s;do?o:m+v));return p===1?(s=c[u-1],a+=xs[s>>2],a+=xs[s<<4&63],a+="=="):p===2&&(s=(c[u-2]<<8)+c[u-1],a+=xs[s>>10],a+=xs[s>>4&63],a+=xs[s<<2&63],a+="="),d.push(a),d.join("")}function Dl(c,s,u,p,a){var d,v,m=a*8-p-1,o=(1<>1,O=-7,x=u?a-1:0,g=u?-1:1,f=c[s+x];for(x+=g,d=f&(1<<-O)-1,f>>=-O,O+=m;O>0;d=d*256+c[s+x],x+=g,O-=8);for(v=d&(1<<-O)-1,d>>=-O,O+=p;O>0;v=v*256+c[s+x],x+=g,O-=8);if(d===0)d=1-y;else{if(d===o)return v?NaN:(f?-1:1)*(1/0);v=v+Math.pow(2,p),d=d-y}return(f?-1:1)*v*Math.pow(2,d-p)}function UO(c,s,u,p,a,d){var v,m,o,y=d*8-a-1,O=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=p?0:d-1,b=p?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(m=isNaN(s)?1:0,v=O):(v=Math.floor(Math.log(s)/Math.LN2),s*(o=Math.pow(2,-v))<1&&(v--,o*=2),v+x>=1?s+=g/o:s+=g*Math.pow(2,1-x),s*o>=2&&(v++,o/=2),v+x>=O?(m=0,v=O):v+x>=1?(m=(s*o-1)*Math.pow(2,a),v=v+x):(m=s*Math.pow(2,x-1)*Math.pow(2,a),v=0));a>=8;c[u+f]=m&255,f+=b,m/=256,a-=8);for(v=v<0;c[u+f]=v&255,f+=b,v/=256,y-=8);c[u+f-b]|=S*128}var XL={}.toString,VO=Array.isArray||function(c){return XL.call(c)=="[object Array]"};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var YL=50;vt.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:!0,Il();function Il(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Vs(c,s){if(Il()=Il())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Il().toString(16)+" bytes");return c|0}vt.isBuffer=fa;function Os(c){return!!(c!=null&&c._isBuffer)}vt.compare=function(s,u){if(!Os(s)||!Os(u))throw new TypeError("Arguments must be Buffers");if(s===u)return 0;for(var p=s.length,a=u.length,d=0,v=Math.min(p,a);d>>1;case"base64":return rS(c).length;default:if(p)return _l(c).length;s=(""+s).toLowerCase(),p=!0}}vt.byteLength=zO;function tN(c,s,u){var p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,s>>>=0,u<=s))return"";for(c||(c="utf8");;)switch(c){case"hex":return fN(this,s,u);case"utf8":case"utf-8":return HO(this,s,u);case"ascii":return uN(this,s,u);case"latin1":case"binary":return cN(this,s,u);case"base64":return oN(this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pN(this,s,u);default:if(p)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),p=!0}}vt.prototype._isBuffer=!0;function Li(c,s,u){var p=c[s];c[s]=c[u],c[u]=p}vt.prototype.swap16=function(){var s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u0&&(s=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(s+=" ... ")),""},vt.prototype.compare=function(s,u,p,a,d){if(!Os(s))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),p===void 0&&(p=s?s.length:0),a===void 0&&(a=0),d===void 0&&(d=this.length),u<0||p>s.length||a<0||d>this.length)throw new RangeError("out of range index");if(a>=d&&u>=p)return 0;if(a>=d)return-1;if(u>=p)return 1;if(u>>>=0,p>>>=0,a>>>=0,d>>>=0,this===s)return 0;for(var v=d-a,m=p-u,o=Math.min(v,m),y=this.slice(a,d),O=s.slice(u,p),x=0;x2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=a?0:c.length-1),u<0&&(u=c.length+u),u>=c.length){if(a)return-1;u=c.length-1}else if(u<0)if(a)u=0;else return-1;if(typeof s=="string"&&(s=vt.from(s,p)),Os(s))return s.length===0?-1:XO(c,s,u,p,a);if(typeof s=="number")return s=s&255,vt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(c,s,u):Uint8Array.prototype.lastIndexOf.call(c,s,u):XO(c,[s],u,p,a);throw new TypeError("val must be string, number or Buffer")}function XO(c,s,u,p,a){var d=1,v=c.length,m=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(c.length<2||s.length<2)return-1;d=2,v/=2,m/=2,u/=2}function o(f,b){return d===1?f[b]:f.readUInt16BE(b*d)}var y;if(a){var O=-1;for(y=u;yv&&(u=v-m),y=u;y>=0;y--){for(var x=!0,g=0;ga&&(p=a)):p=a;var d=s.length;if(d%2!==0)throw new TypeError("Invalid hex string");p>d/2&&(p=d/2);for(var v=0;vd)&&(p=d),s.length>0&&(p<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var v=!1;;)switch(a){case"hex":return rN(this,s,u,p);case"utf8":case"utf-8":return nN(this,s,u,p);case"ascii":return YO(this,s,u,p);case"latin1":case"binary":return sN(this,s,u,p);case"base64":return iN(this,s,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aN(this,s,u,p);default:if(v)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),v=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oN(c,s,u){return s===0&&u===c.length?QO(c):QO(c.slice(s,u))}function HO(c,s,u){u=Math.min(c.length,u);for(var p=[],a=s;a239?4:d>223?3:d>191?2:1;if(a+m<=u){var o,y,O,x;switch(m){case 1:d<128&&(v=d);break;case 2:o=c[a+1],(o&192)===128&&(x=(d&31)<<6|o&63,x>127&&(v=x));break;case 3:o=c[a+1],y=c[a+2],(o&192)===128&&(y&192)===128&&(x=(d&15)<<12|(o&63)<<6|y&63,x>2047&&(x<55296||x>57343)&&(v=x));break;case 4:o=c[a+1],y=c[a+2],O=c[a+3],(o&192)===128&&(y&192)===128&&(O&192)===128&&(x=(d&15)<<18|(o&63)<<12|(y&63)<<6|O&63,x>65535&&x<1114112&&(v=x))}}v===null?(v=65533,m=1):v>65535&&(v-=65536,p.push(v>>>10&1023|55296),v=56320|v&1023),p.push(v),a+=m}return lN(p)}var KO=4096;function lN(c){var s=c.length;if(s<=KO)return String.fromCharCode.apply(String,c);for(var u="",p=0;pp)&&(u=p);for(var a="",d=s;dp&&(s=p),u<0?(u+=p,u<0&&(u=0)):u>p&&(u=p),uu)throw new RangeError("Trying to access beyond buffer length")}vt.prototype.readUIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v0&&(d*=256);)a+=this[s+--u]*d;return a},vt.prototype.readUInt8=function(s,u){return u||sn(s,1,this.length),this[s]},vt.prototype.readUInt16LE=function(s,u){return u||sn(s,2,this.length),this[s]|this[s+1]<<8},vt.prototype.readUInt16BE=function(s,u){return u||sn(s,2,this.length),this[s]<<8|this[s+1]},vt.prototype.readUInt32LE=function(s,u){return u||sn(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},vt.prototype.readUInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},vt.prototype.readIntLE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=this[s],d=1,v=0;++v=d&&(a-=Math.pow(2,8*u)),a},vt.prototype.readIntBE=function(s,u,p){s=s|0,u=u|0,p||sn(s,u,this.length);for(var a=u,d=1,v=this[s+--a];a>0&&(d*=256);)v+=this[s+--a]*d;return d*=128,v>=d&&(v-=Math.pow(2,8*u)),v},vt.prototype.readInt8=function(s,u){return u||sn(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},vt.prototype.readInt16LE=function(s,u){u||sn(s,2,this.length);var p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt16BE=function(s,u){u||sn(s,2,this.length);var p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},vt.prototype.readInt32LE=function(s,u){return u||sn(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},vt.prototype.readInt32BE=function(s,u){return u||sn(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},vt.prototype.readFloatLE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!0,23,4)},vt.prototype.readFloatBE=function(s,u){return u||sn(s,4,this.length),Dl(this,s,!1,23,4)},vt.prototype.readDoubleLE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!0,52,8)},vt.prototype.readDoubleBE=function(s,u){return u||sn(s,8,this.length),Dl(this,s,!1,52,8)};function Rn(c,s,u,p,a,d){if(!Os(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>a||sc.length)throw new RangeError("Index out of range")}vt.prototype.writeUIntLE=function(s,u,p,a){if(s=+s,u=u|0,p=p|0,!a){var d=Math.pow(2,8*p)-1;Rn(this,s,u,p,d,0)}var v=1,m=0;for(this[u]=s&255;++m=0&&(m*=256);)this[u+v]=s/m&255;return u+p},vt.prototype.writeUInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,255,0),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),this[u]=s&255,u+1};function Rl(c,s,u,p){s<0&&(s=65535+s+1);for(var a=0,d=Math.min(c.length-u,2);a>>(p?a:1-a)*8}vt.prototype.writeUInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeUInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2};function Fl(c,s,u,p){s<0&&(s=4294967295+s+1);for(var a=0,d=Math.min(c.length-u,4);a>>(p?a:3-a)*8&255}vt.prototype.writeUInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u+3]=s>>>24,this[u+2]=s>>>16,this[u+1]=s>>>8,this[u]=s&255):Fl(this,s,u,!0),u+4},vt.prototype.writeUInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4},vt.prototype.writeIntLE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=0,m=1,o=0;for(this[u]=s&255;++v>0)-o&255;return u+p},vt.prototype.writeIntBE=function(s,u,p,a){if(s=+s,u=u|0,!a){var d=Math.pow(2,8*p-1);Rn(this,s,u,p,d-1,-d)}var v=p-1,m=1,o=0;for(this[u+v]=s&255;--v>=0&&(m*=256);)s<0&&o===0&&this[u+v+1]!==0&&(o=1),this[u+v]=(s/m>>0)-o&255;return u+p},vt.prototype.writeInt8=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(s=Math.floor(s)),s<0&&(s=255+s+1),this[u]=s&255,u+1},vt.prototype.writeInt16LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8):Rl(this,s,u,!0),u+2},vt.prototype.writeInt16BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>8,this[u+1]=s&255):Rl(this,s,u,!1),u+2},vt.prototype.writeInt32LE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[u]=s&255,this[u+1]=s>>>8,this[u+2]=s>>>16,this[u+3]=s>>>24):Fl(this,s,u,!0),u+4},vt.prototype.writeInt32BE=function(s,u,p){return s=+s,u=u|0,p||Rn(this,s,u,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),vt.TYPED_ARRAY_SUPPORT?(this[u]=s>>>24,this[u+1]=s>>>16,this[u+2]=s>>>8,this[u+3]=s&255):Fl(this,s,u,!1),u+4};function JO(c,s,u,p,a,d){if(u+p>c.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function eS(c,s,u,p,a){return a||JO(c,s,u,4),UO(c,s,u,p,23,4),u+4}vt.prototype.writeFloatLE=function(s,u,p){return eS(this,s,u,!0,p)},vt.prototype.writeFloatBE=function(s,u,p){return eS(this,s,u,!1,p)};function tS(c,s,u,p,a){return a||JO(c,s,u,8),UO(c,s,u,p,52,8),u+8}vt.prototype.writeDoubleLE=function(s,u,p){return tS(this,s,u,!0,p)},vt.prototype.writeDoubleBE=function(s,u,p){return tS(this,s,u,!1,p)},vt.prototype.copy=function(s,u,p,a){if(p||(p=0),!a&&a!==0&&(a=this.length),u>=s.length&&(u=s.length),u||(u=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),s.length-u=0;--v)s[v+u]=this[v+p];else if(d<1e3||!vt.TYPED_ARRAY_SUPPORT)for(v=0;v>>0,p=p===void 0?this.length:p>>>0,s||(s=0);var v;if(typeof s=="number")for(v=u;v55295&&u<57344){if(!a){if(u>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(v+1===p){(s-=3)>-1&&d.push(239,191,189);continue}a=u;continue}if(u<56320){(s-=3)>-1&&d.push(239,191,189),a=u;continue}u=(a-55296<<10|u-56320)+65536}else a&&(s-=3)>-1&&d.push(239,191,189);if(a=null,u<128){if((s-=1)<0)break;d.push(u)}else if(u<2048){if((s-=2)<0)break;d.push(u>>6|192,u&63|128)}else if(u<65536){if((s-=3)<0)break;d.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((s-=4)<0)break;d.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return d}function yN(c){for(var s=[],u=0;u>8,a=u%256,d.push(a),d.push(p);return d}function rS(c){return GL(dN(c))}function Bl(c,s,u,p){for(var a=0;a=s.length||a>=c.length);++a)s[a+u]=c[a];return a}function vN(c){return c!==c}function fa(c){return c!=null&&(!!c._isBuffer||nS(c)||xN(c))}function nS(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function xN(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&nS(c.slice(0,0))}var fo;typeof Object.create=="function"?fo=function(s,u){s.super_=u,s.prototype=Object.create(u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:fo=function(s,u){s.super_=u;var p=function(){};p.prototype=u.prototype,s.prototype=new p,s.prototype.constructor=s};var sS=Object.getOwnPropertyDescriptors||function(s){for(var u=Object.keys(s),p={},a=0;a=a)return m;switch(m){case"%s":return String(p[u++]);case"%d":return Number(p[u++]);case"%j":try{return JSON.stringify(p[u++])}catch{return"[Circular]"}default:return m}}),v=p[u];u=3&&(u.depth=arguments[2]),arguments.length>=4&&(u.colors=arguments[3]),$l(s)?u.showHidden=s:s&&rf(u,s),Ss(u.showHidden)&&(u.showHidden=!1),Ss(u.depth)&&(u.depth=2),Ss(u.colors)&&(u.colors=!1),Ss(u.customInspect)&&(u.customInspect=!0),u.colors&&(u.stylize=SN),Ml(u,c,u.depth)}os.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},os.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function SN(c,s){var u=os.styles[s];return u?"\x1B["+os.colors[u][0]+"m"+c+"\x1B["+os.colors[u][1]+"m":c}function EN(c,s){return c}function CN(c){var s={};return c.forEach(function(u,p){s[u]=!0}),s}function Ml(c,s,u){if(c.customInspect&&s&&$i(s.inspect)&&s.inspect!==os&&!(s.constructor&&s.constructor.prototype===s)){var p=s.inspect(u,c);return ho(p)||(p=Ml(c,p,u)),p}var a=wN(c,s);if(a)return a;var d=Object.keys(s),v=CN(d);if(c.showHidden&&(d=Object.getOwnPropertyNames(s)),ha(s)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return Yc(s);if(d.length===0){if($i(s)){var m=s.name?": "+s.name:"";return c.stylize("[Function"+m+"]","special")}if(Ni(s))return c.stylize(RegExp.prototype.toString.call(s),"regexp");if(pa(s))return c.stylize(Date.prototype.toString.call(s),"date");if(ha(s))return Yc(s)}var o="",y=!1,O=["{","}"];if(Kc(s)&&(y=!0,O=["[","]"]),$i(s)){var x=s.name?": "+s.name:"";o=" [Function"+x+"]"}if(Ni(s)&&(o=" "+RegExp.prototype.toString.call(s)),pa(s)&&(o=" "+Date.prototype.toUTCString.call(s)),ha(s)&&(o=" "+Yc(s)),d.length===0&&(!y||s.length==0))return O[0]+o+O[1];if(u<0)return Ni(s)?c.stylize(RegExp.prototype.toString.call(s),"regexp"):c.stylize("[Object]","special");c.seen.push(s);var g;return y?g=kN(c,s,u,v,d):g=d.map(function(f){return Hc(c,s,u,v,f,y)}),c.seen.pop(),AN(g,o,O)}function wN(c,s){if(Ss(s))return c.stylize("undefined","undefined");if(ho(s)){var u="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(u,"string")}if(Jc(s))return c.stylize(""+s,"number");if($l(s))return c.stylize(""+s,"boolean");if(po(s))return c.stylize("null","null")}function Yc(c){return"["+Error.prototype.toString.call(c)+"]"}function kN(c,s,u,p,a){for(var d=[],v=0,m=s.length;v-1&&(d?m=m.split(` +`).map(function(y){return" "+y}).join(` +`).substr(2):m=` +`+m.split(` +`).map(function(y){return" "+y}).join(` +`))):m=c.stylize("[Circular]","special")),Ss(v)){if(d&&a.match(/^\d+$/))return m;v=JSON.stringify(""+a),v.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(v=v.substr(1,v.length-2),v=c.stylize(v,"name")):(v=v.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),v=c.stylize(v,"string"))}return v+": "+m}function AN(c,s,u){var p=c.reduce(function(a,d){return d.indexOf(` +`)>=0,a+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);return p>60?u[0]+(s===""?"":s+` + `)+" "+c.join(`, + `)+" "+u[1]:u[0]+s+" "+c.join(", ")+" "+u[1]}function Kc(c){return Array.isArray(c)}function $l(c){return typeof c=="boolean"}function po(c){return c===null}function aS(c){return c==null}function Jc(c){return typeof c=="number"}function ho(c){return typeof c=="string"}function oS(c){return typeof c=="symbol"}function Ss(c){return c===void 0}function Ni(c){return Mi(c)&&ef(c)==="[object RegExp]"}function Mi(c){return typeof c=="object"&&c!==null}function pa(c){return Mi(c)&&ef(c)==="[object Date]"}function ha(c){return Mi(c)&&(ef(c)==="[object Error]"||c instanceof Error)}function $i(c){return typeof c=="function"}function jl(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}function lS(c){return vt.isBuffer(c)}function ef(c){return Object.prototype.toString.call(c)}function tf(c){return c<10?"0"+c.toString(10):c.toString(10)}var PN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function TN(){var c=new Date,s=[tf(c.getHours()),tf(c.getMinutes()),tf(c.getSeconds())].join(":");return[c.getDate(),PN[c.getMonth()],s].join(" ")}function uS(){console.log("%s - %s",TN(),Ll.apply(null,arguments))}function rf(c,s){if(!s||!Mi(s))return c;for(var u=Object.keys(s),p=u.length;p--;)c[u[p]]=s[u[p]];return c}function cS(c,s){return Object.prototype.hasOwnProperty.call(c,s)}var ji=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function nf(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');if(ji&&c[ji]){var s=c[ji];if(typeof s!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(s,ji,{value:s,enumerable:!1,writable:!1,configurable:!0}),s}function s(){for(var u,p,a=new Promise(function(m,o){u=m,p=o}),d=[],v=0;v1){xe[0]=xe[0].slice(0,-1);for(var ze=xe.length-1,Ge=1;Ge= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=S-E,U=Math.floor,Q=String.fromCharCode;function $(Ce){throw new RangeError(j[Ce])}function W(Ce,xe){for(var je=[],ze=Ce.length;ze--;)je[ze]=xe(Ce[ze]);return je}function K(Ce,xe){var je=Ce.split("@"),ze="";je.length>1&&(ze=je[0]+"@",Ce=je[1]),Ce=Ce.replace(L,".");var Ge=Ce.split("."),ut=W(Ge,xe).join(".");return ze+ut}function te(Ce){for(var xe=[],je=0,ze=Ce.length;je=55296&&Ge<=56319&&je>1,xe+=U(xe/je);xe>G*k>>1;Ge+=S)xe=U(xe/G);return U(Ge+(G+1)*xe/(xe+D))},ne=function(xe){var je=[],ze=xe.length,Ge=0,ut=F,qe=R,et=xe.lastIndexOf(P);et<0&&(et=0);for(var bt=0;bt=128&&$("not-basic"),je.push(xe.charCodeAt(bt));for(var rt=et>0?et+1:0;rt=ze&&$("invalid-input");var Lt=ae(xe.charCodeAt(rt++));(Lt>=S||Lt>U((b-Ge)/jt))&&$("overflow"),Ge+=Lt*jt;var rr=Wt<=qe?E:Wt>=qe+k?k:Wt-qe;if(LtU(b/ar)&&$("overflow"),jt*=ar}var nr=je.length+1;qe=ue(Ge-St,nr,St==0),U(Ge/nr)>b-ut&&$("overflow"),ut+=U(Ge/nr),Ge%=nr,je.splice(Ge++,0,ut)}return String.fromCodePoint.apply(String,je)},ce=function(xe){var je=[];xe=te(xe);var ze=xe.length,Ge=F,ut=0,qe=R,et=!0,bt=!1,rt=void 0;try{for(var St=xe[Symbol.iterator](),jt;!(et=(jt=St.next()).done);et=!0){var Wt=jt.value;Wt<128&&je.push(Q(Wt))}}catch(fs){bt=!0,rt=fs}finally{try{!et&&St.return&&St.return()}finally{if(bt)throw rt}}var Lt=je.length,rr=Lt;for(Lt&&je.push(P);rr=Ge&&jnU((b-ut)/Rt)&&$("overflow"),ut+=(ar-Ge)*Rt,Ge=ar;var Wr=!0,Mr=!1,kn=void 0;try{for(var Xn=xe[Symbol.iterator](),ai;!(Wr=(ai=Xn.next()).done);Wr=!0){var oi=ai.value;if(oib&&$("overflow"),oi==Ge){for(var Yn=ut,us=S;;us+=S){var cs=us<=qe?E:us>=qe+k?k:us-qe;if(Yn>6|192).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase():je="%"+(xe>>12|224).toString(16).toUpperCase()+"%"+(xe>>6&63|128).toString(16).toUpperCase()+"%"+(xe&63|128).toString(16).toUpperCase(),je}function Re(Ce){for(var xe="",je=0,ze=Ce.length;je=194&&Ge<224){if(ze-je>=6){var ut=parseInt(Ce.substr(je+4,2),16);xe+=String.fromCharCode((Ge&31)<<6|ut&63)}else xe+=Ce.substr(je,6);je+=6}else if(Ge>=224){if(ze-je>=9){var qe=parseInt(Ce.substr(je+4,2),16),et=parseInt(Ce.substr(je+7,2),16);xe+=String.fromCharCode((Ge&15)<<12|(qe&63)<<6|et&63)}else xe+=Ce.substr(je,9);je+=9}else xe+=Ce.substr(je,3),je+=3}return xe}function Se(Ce,xe){function je(ze){var Ge=Re(ze);return Ge.match(xe.UNRESERVED)?Ge:ze}return Ce.scheme&&(Ce.scheme=String(Ce.scheme).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_SCHEME,"")),Ce.userinfo!==void 0&&(Ce.userinfo=String(Ce.userinfo).replace(xe.PCT_ENCODED,je).replace(xe.NOT_USERINFO,ge).replace(xe.PCT_ENCODED,v)),Ce.host!==void 0&&(Ce.host=String(Ce.host).replace(xe.PCT_ENCODED,je).toLowerCase().replace(xe.NOT_HOST,ge).replace(xe.PCT_ENCODED,v)),Ce.path!==void 0&&(Ce.path=String(Ce.path).replace(xe.PCT_ENCODED,je).replace(Ce.scheme?xe.NOT_PATH:xe.NOT_PATH_NOSCHEME,ge).replace(xe.PCT_ENCODED,v)),Ce.query!==void 0&&(Ce.query=String(Ce.query).replace(xe.PCT_ENCODED,je).replace(xe.NOT_QUERY,ge).replace(xe.PCT_ENCODED,v)),Ce.fragment!==void 0&&(Ce.fragment=String(Ce.fragment).replace(xe.PCT_ENCODED,je).replace(xe.NOT_FRAGMENT,ge).replace(xe.PCT_ENCODED,v)),Ce}function we(Ce){return Ce.replace(/^0*(.*)/,"$1")||"0"}function Me(Ce,xe){var je=Ce.match(xe.IPV4ADDRESS)||[],ze=g(je,2),Ge=ze[1];return Ge?Ge.split(".").map(we).join("."):Ce}function it(Ce,xe){var je=Ce.match(xe.IPV6ADDRESS)||[],ze=g(je,3),Ge=ze[1],ut=ze[2];if(Ge){for(var qe=Ge.toLowerCase().split("::").reverse(),et=g(qe,2),bt=et[0],rt=et[1],St=rt?rt.split(":").map(we):[],jt=bt.split(":").map(we),Wt=xe.IPV4ADDRESS.test(jt[jt.length-1]),Lt=Wt?7:8,rr=jt.length-Lt,ar=Array(Lt),nr=0;nr1){var wn=ar.slice(0,wr.index),jn=ar.slice(wr.index+wr.length);Nr=wn.join(":")+"::"+jn.join(":")}else Nr=ar.join(":");return ut&&(Nr+="%"+ut),Nr}else return Ce}var pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function qt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je={},ze=xe.iri!==!1?x:O;xe.reference==="suffix"&&(Ce=(xe.scheme?xe.scheme+":":"")+"//"+Ce);var Ge=Ce.match(pt);if(Ge){kt?(je.scheme=Ge[1],je.userinfo=Ge[3],je.host=Ge[4],je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ge[7],je.fragment=Ge[8],isNaN(je.port)&&(je.port=Ge[5])):(je.scheme=Ge[1]||void 0,je.userinfo=Ce.indexOf("@")!==-1?Ge[3]:void 0,je.host=Ce.indexOf("//")!==-1?Ge[4]:void 0,je.port=parseInt(Ge[5],10),je.path=Ge[6]||"",je.query=Ce.indexOf("?")!==-1?Ge[7]:void 0,je.fragment=Ce.indexOf("#")!==-1?Ge[8]:void 0,isNaN(je.port)&&(je.port=Ce.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ge[4]:void 0)),je.host&&(je.host=it(Me(je.host,ze),ze)),je.scheme===void 0&&je.userinfo===void 0&&je.host===void 0&&je.port===void 0&&!je.path&&je.query===void 0?je.reference="same-document":je.scheme===void 0?je.reference="relative":je.fragment===void 0?je.reference="absolute":je.reference="uri",xe.reference&&xe.reference!=="suffix"&&xe.reference!==je.reference&&(je.error=je.error||"URI is not a "+xe.reference+" reference.");var ut=Z[(xe.scheme||je.scheme||"").toLowerCase()];if(!xe.unicodeSupport&&(!ut||!ut.unicodeSupport)){if(je.host&&(xe.domainHost||ut&&ut.domainHost))try{je.host=oe.toASCII(je.host.replace(ze.PCT_ENCODED,Re).toLowerCase())}catch(qe){je.error=je.error||"Host's domain name can not be converted to ASCII via punycode: "+qe}Se(je,O)}else Se(je,ze);ut&&ut.parse&&ut.parse(je,xe)}else je.error=je.error||"URI can not be parsed.";return je}function Ut(Ce,xe){var je=xe.iri!==!1?x:O,ze=[];return Ce.userinfo!==void 0&&(ze.push(Ce.userinfo),ze.push("@")),Ce.host!==void 0&&ze.push(it(Me(String(Ce.host),je),je).replace(je.IPV6ADDRESS,function(Ge,ut,qe){return"["+ut+(qe?"%25"+qe:"")+"]"})),(typeof Ce.port=="number"||typeof Ce.port=="string")&&(ze.push(":"),ze.push(String(Ce.port))),ze.length?ze.join(""):void 0}var tr=/^\.\.?\//,fe=/^\/\.(\/|$)/,Ve=/^\/\.\.(\/|$)/,mt=/^\/?(?:.|\n)*?(?=\/|$)/;function Pt(Ce){for(var xe=[];Ce.length;)if(Ce.match(tr))Ce=Ce.replace(tr,"");else if(Ce.match(fe))Ce=Ce.replace(fe,"/");else if(Ce.match(Ve))Ce=Ce.replace(Ve,"/"),xe.pop();else if(Ce==="."||Ce==="..")Ce="";else{var je=Ce.match(mt);if(je){var ze=je[0];Ce=Ce.slice(ze.length),xe.push(ze)}else throw new Error("Unexpected dot segment condition")}return xe.join("")}function Bt(Ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.iri?x:O,ze=[],Ge=Z[(xe.scheme||Ce.scheme||"").toLowerCase()];if(Ge&&Ge.serialize&&Ge.serialize(Ce,xe),Ce.host&&!je.IPV6ADDRESS.test(Ce.host)){if(xe.domainHost||Ge&&Ge.domainHost)try{Ce.host=xe.iri?oe.toUnicode(Ce.host):oe.toASCII(Ce.host.replace(je.PCT_ENCODED,Re).toLowerCase())}catch(et){Ce.error=Ce.error||"Host's domain name can not be converted to "+(xe.iri?"Unicode":"ASCII")+" via punycode: "+et}}Se(Ce,je),xe.reference!=="suffix"&&Ce.scheme&&(ze.push(Ce.scheme),ze.push(":"));var ut=Ut(Ce,xe);if(ut!==void 0&&(xe.reference!=="suffix"&&ze.push("//"),ze.push(ut),Ce.path&&Ce.path.charAt(0)!=="/"&&ze.push("/")),Ce.path!==void 0){var qe=Ce.path;!xe.absolutePath&&(!Ge||!Ge.absolutePath)&&(qe=Pt(qe)),ut===void 0&&(qe=qe.replace(/^\/\//,"/%2F")),ze.push(qe)}return Ce.query!==void 0&&(ze.push("?"),ze.push(Ce.query)),Ce.fragment!==void 0&&(ze.push("#"),ze.push(Ce.fragment)),ze.join("")}function se(Ce,xe){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ze=arguments[3],Ge={};return ze||(Ce=qt(Bt(Ce,je),je),xe=qt(Bt(xe,je),je)),je=je||{},!je.tolerant&&xe.scheme?(Ge.scheme=xe.scheme,Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.userinfo!==void 0||xe.host!==void 0||xe.port!==void 0?(Ge.userinfo=xe.userinfo,Ge.host=xe.host,Ge.port=xe.port,Ge.path=Pt(xe.path||""),Ge.query=xe.query):(xe.path?(xe.path.charAt(0)==="/"?Ge.path=Pt(xe.path):((Ce.userinfo!==void 0||Ce.host!==void 0||Ce.port!==void 0)&&!Ce.path?Ge.path="/"+xe.path:Ce.path?Ge.path=Ce.path.slice(0,Ce.path.lastIndexOf("/")+1)+xe.path:Ge.path=xe.path,Ge.path=Pt(Ge.path)),Ge.query=xe.query):(Ge.path=Ce.path,xe.query!==void 0?Ge.query=xe.query:Ge.query=Ce.query),Ge.userinfo=Ce.userinfo,Ge.host=Ce.host,Ge.port=Ce.port),Ge.scheme=Ce.scheme),Ge.fragment=xe.fragment,Ge}function Kt(Ce,xe,je){var ze=o({scheme:"null"},je);return Bt(se(qt(Ce,ze),qt(xe,ze),ze,!0),ze)}function Vt(Ce,xe){return typeof Ce=="string"?Ce=Bt(qt(Ce,xe),xe):d(Ce)==="object"&&(Ce=qt(Bt(Ce,xe),xe)),Ce}function ir(Ce,xe,je){return typeof Ce=="string"?Ce=Bt(qt(Ce,je),je):d(Ce)==="object"&&(Ce=Bt(Ce,je)),typeof xe=="string"?xe=Bt(qt(xe,je),je):d(xe)==="object"&&(xe=Bt(xe,je)),Ce===xe}function Ot(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.ESCAPE:x.ESCAPE,ge)}function Zt(Ce,xe){return Ce&&Ce.toString().replace(!xe||!xe.iri?O.PCT_ENCODED:x.PCT_ENCODED,Re)}var hr={scheme:"http",domainHost:!0,parse:function(xe,je){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,je){var ze=String(xe.scheme).toLowerCase()==="https";return(xe.port===(ze?443:80)||xe.port==="")&&(xe.port=void 0),xe.path||(xe.path="/"),xe}},Dt={scheme:"https",domainHost:hr.domainHost,parse:hr.parse,serialize:hr.serialize};function Dr(Ce){return typeof Ce.secure=="boolean"?Ce.secure:String(Ce.scheme).toLowerCase()==="wss"}var Et={scheme:"ws",domainHost:!0,parse:function(xe,je){var ze=xe;return ze.secure=Dr(ze),ze.resourceName=(ze.path||"/")+(ze.query?"?"+ze.query:""),ze.path=void 0,ze.query=void 0,ze},serialize:function(xe,je){if((xe.port===(Dr(xe)?443:80)||xe.port==="")&&(xe.port=void 0),typeof xe.secure=="boolean"&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var ze=xe.resourceName.split("?"),Ge=g(ze,2),ut=Ge[0],qe=Ge[1];xe.path=ut&&ut!=="/"?ut:void 0,xe.query=qe,xe.resourceName=void 0}return xe.fragment=void 0,xe}},Ie={scheme:"wss",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},ke={},Te="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ue="[0-9A-Fa-f]",lt=a(a("%[EFef]"+Ue+"%"+Ue+Ue+"%"+Ue+Ue)+"|"+a("%[89A-Fa-f]"+Ue+"%"+Ue+Ue)+"|"+a("%"+Ue+Ue)),Oe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",de=p(Pe,'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Le=new RegExp(Te,"g"),X=new RegExp(lt,"g"),ee=new RegExp(p("[^]",Oe,"[\\.]",'[\\"]',de),"g"),be=new RegExp(p("[^]",Te,ye),"g"),Ee=be;function ve(Ce){var xe=Re(Ce);return xe.match(Le)?xe:Ce}var Ne={scheme:"mailto",parse:function(xe,je){var ze=xe,Ge=ze.to=ze.path?ze.path.split(","):[];if(ze.path=void 0,ze.query){for(var ut=!1,qe={},et=ze.query.split("&"),bt=0,rt=et.length;bt=55296&&d<=56319&&a=G)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+G);return U[G-Q]}if(Q>G)throw new Error("Cannot access data "+Q+" levels up, current level is "+G);if(W="data"+(G-Q||""),!$)return W}for(var te=W,V=$.split("/"),ae=0;ae=0?{index:R,compiling:!0}:(R=this._compilations.length,this._compilations[R]={schema:k,root:D,baseId:T},{index:R,compiling:!1})}function O(k,D,T){var R=x.call(this,k,D,T);R>=0&&this._compilations.splice(R,1)}function x(k,D,T){for(var R=0;R%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,o=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,y=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,O=/^(?:\/(?:[^~/]|~0|~1)*)*$/,x=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;vf=f;function f(N){return N=N=="full"?"full":"fast",c.copy(f[N])}f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":m,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g},f.full={date:S,time:E,"date-time":D,uri:R,"uri-reference":v,"uri-template":m,url:o,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:P,uuid:y,"json-pointer":O,"json-pointer-uri-fragment":x,"relative-json-pointer":g};function b(N){return N%4===0&&(N%100!==0||N%400===0)}function S(N){var I=N.match(s);if(!I)return!1;var L=+I[1],j=+I[2],G=+I[3];return j>=1&&j<=12&&G>=1&&G<=(j==2&&b(L)?29:u[j])}function E(N,I){var L=N.match(p);if(!L)return!1;var j=L[1],G=L[2],U=L[3],Q=L[5];return(j<=23&&G<=59&&U<=59||j==23&&G==59&&U==60)&&(!I||Q)}var k=/t|\s/i;function D(N){var I=N.split(k);return I.length==2&&S(I[0])&&E(I[1],!0)}var T=/\/|:/;function R(N){return T.test(N)&&d.test(N)}var F=/[^\\]\\Z/;function P(N){if(F.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}return vf}var xf,TS;function $N(){return TS||(TS=1,xf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.errSchemaPath+"/"+u,y=!s.opts.allErrors,O="data"+(v||""),x="valid"+d,g,f;if(m=="#"||m=="#/")s.isRoot?(g=s.async,f="validate"):(g=s.root.schema.$async===!0,f="root.refVal[0]");else{var b=s.resolveRef(s.baseId,m,s.isRoot);if(b===void 0){var S=s.MissingRefError.message(s.baseId,m);if(s.opts.missingRefs=="fail"){s.logger.error(S);var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(o)+" , params: { ref: '"+s.util.escapeQuotes(m)+"' } ",s.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+s.util.escapeQuotes(m)+"' "),s.opts.verbose&&(a+=" , schema: "+s.util.toQuotedString(m)+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+O+" "),a+=" } "):a+=" {} ";var k=a;a=E.pop(),!s.compositeRule&&y?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y&&(a+=" if (false) { ")}else if(s.opts.missingRefs=="ignore")s.logger.warn(S),y&&(a+=" if (true) { ");else throw new s.MissingRefError(s.baseId,m,S)}else if(b.inline){var D=s.util.copy(s);D.level++;var T="valid"+D.level;D.schema=b.schema,D.schemaPath="",D.errSchemaPath=m;var R=s.validate(D).replace(/validate\.schema/g,b.code);a+=" "+R+" ",y&&(a+=" if ("+T+") { ")}else g=b.$async===!0||s.async&&b.$async!==!1,f=b.code}if(f){var E=E||[];E.push(a),a="",s.opts.passContext?a+=" "+f+".call(this, ":a+=" "+f+"( ",a+=" "+O+", (dataPath || '')",s.errorPath!='""'&&(a+=" + "+s.errorPath);var F=v?"data"+(v-1||""):"parentData",P=v?s.dataPathArr[v]:"parentDataProperty";a+=" , "+F+" , "+P+", rootData) ";var N=a;if(a=E.pop(),g){if(!s.async)throw new Error("async schema referenced by sync schema");y&&(a+=" var "+x+"; "),a+=" try { await "+N+"; ",y&&(a+=" "+x+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",y&&(a+=" "+x+" = false; "),a+=" } ",y&&(a+=" if ("+x+") { ")}else a+=" if (!"+N+") { if (vErrors === null) vErrors = "+f+".errors; else vErrors = vErrors.concat("+f+".errors); errors = vErrors.length; } ",y&&(a+=" else { ")}return a}),xf}var Of,DS;function jN(){return DS||(DS=1,Of=function(s,u,p){var a=" ",d=s.schema[u],v=s.schemaPath+s.util.getProperty(u),m=s.errSchemaPath+"/"+u,o=!s.opts.allErrors,y=s.util.copy(s),O="";y.level++;var x="valid"+y.level,g=y.baseId,f=!0,b=d;if(b)for(var S,E=-1,k=b.length-1;E0||S===!1:s.util.schemaHasRules(S,s.RULES.all))&&(f=!1,y.schema=S,y.schemaPath=v+"["+E+"]",y.errSchemaPath=m+"/"+E,a+=" "+s.validate(y)+" ",y.baseId=g,o&&(a+=" if ("+x+") { ",O+="}"));return o&&(f?a+=" if (true) { ":a+=" "+O.slice(0,-1)+" "),a}),Of}var Sf,IS;function qN(){return IS||(IS=1,Sf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=m.every(function(I){return s.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:s.util.schemaHasRules(I,s.RULES.all)});if(k){var D=b.baseId;a+=" var "+f+" = errors; var "+g+" = false; ";var T=s.compositeRule;s.compositeRule=b.compositeRule=!0;var R=m;if(R)for(var F,P=-1,N=R.length-1;P0||m===!1:s.util.schemaHasRules(m,s.RULES.all);if(a+="var "+f+" = errors;var "+g+";",F){var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+E+" = false; for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var N=x+"["+k+"]";b.dataPathArr[D]=k;var I=s.validate(b);b.baseId=R,s.util.varOccurences(I,T)<2?a+=" "+s.util.varReplace(I,T,N)+" ":a+=" var "+T+" = "+N+"; "+I+" ",a+=" if ("+E+") break; } ",s.compositeRule=b.compositeRule=P,a+=" "+S+" if (!"+E+") {"}else a+=" if ("+x+".length == 0) {";var L=L||[];L.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var j=a;return a=L.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+j+"]); ":a+=" validate.errors = ["+j+"]; return false; ":a+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",F&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),s.opts.allErrors&&(a+=" } "),a}),wf}var kf,BS;function WN(){return BS||(BS=1,kf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E={},k={},D=s.opts.ownProperties;for(P in m)if(P!="__proto__"){var T=m[P],R=Array.isArray(T)?k:E;R[P]=T}a+="var "+g+" = errors;";var F=s.errorPath;a+="var missing"+d+";";for(var P in k)if(R=k[P],R.length){if(a+=" if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),O){a+=" && ( ";var N=R;if(N)for(var I,L=-1,j=N.length-1;L0||T===!1:s.util.schemaHasRules(T,s.RULES.all))&&(a+=" "+S+" = true; if ( "+x+s.util.getProperty(P)+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(P)+"') "),a+=") { ",f.schema=T,f.schemaPath=o+s.util.getProperty(P),f.errSchemaPath=y+"/"+s.util.escapeFragment(P),a+=" "+s.validate(f)+" ",f.baseId=z,a+=" } ",O&&(a+=" if ("+S+") { ",b+="}"))}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),kf}var Af,LS;function GN(){return LS||(LS=1,Af=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f=s.opts.$data&&m&&m.$data;f&&(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ");var b="i"+d,S="schema"+d;f||(a+=" var "+S+" = validate.schema"+o+";"),a+="var "+g+";",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=""+g+" = false;for (var "+b+"=0; "+b+"<"+S+".length; "+b+"++) if (equal("+x+", "+S+"["+b+"])) { "+g+" = true; break; }",f&&(a+=" } "),a+=" if (!"+g+") { ";var E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { allowedValues: schema"+d+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",O&&(a+=" else { "),a}),Af}var Pf,NS;function zN(){return NS||(NS=1,Pf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||"");if(s.opts.format===!1)return O&&(a+=" if (true) { "),a;var g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=s.opts.unknownFormats,S=Array.isArray(b);if(g){var E="format"+d,k="isObject"+d,D="formatType"+d;a+=" var "+E+" = formats["+f+"]; var "+k+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+D+" = "+k+" && "+E+".type || 'string'; if ("+k+") { ",s.async&&(a+=" var async"+d+" = "+E+".async; "),a+=" "+E+" = "+E+".validate; } if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" (",b!="ignore"&&(a+=" ("+f+" && !"+E+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),a+=") || "),a+=" ("+E+" && "+D+" == '"+p+"' && !(typeof "+E+" == 'function' ? ",s.async?a+=" (async"+d+" ? await "+E+"("+x+") : "+E+"("+x+")) ":a+=" "+E+"("+x+") ",a+=" : "+E+".test("+x+"))))) {"}else{var E=s.formats[m];if(!E){if(b=="ignore")return s.logger.warn('unknown format "'+m+'" ignored in schema at path "'+s.errSchemaPath+'"'),O&&(a+=" if (true) { "),a;if(S&&b.indexOf(m)>=0)return O&&(a+=" if (true) { "),a;throw new Error('unknown format "'+m+'" is used in schema at path "'+s.errSchemaPath+'"')}var k=typeof E=="object"&&!(E instanceof RegExp)&&E.validate,D=k&&E.type||"string";if(k){var T=E.async===!0;E=E.validate}if(D!=p)return O&&(a+=" if (true) { "),a;if(T){if(!s.async)throw new Error("async format in sync schema");var R="formats"+s.util.getProperty(m)+".validate";a+=" if (!(await "+R+"("+x+"))) { "}else{a+=" if (! ";var R="formats"+s.util.getProperty(m);k&&(R+=".validate"),typeof E=="function"?a+=" "+R+"("+x+") ":a+=" "+R+".test("+x+") ",a+=") { "}}var F=F||[];F.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { format: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match format "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var P=a;return a=F.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),Pf}var Tf,MS;function ZN(){return MS||(MS=1,Tf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s);b.level++;var S="valid"+b.level,E=s.schema.then,k=s.schema.else,D=E!==void 0&&(s.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===!1:s.util.schemaHasRules(E,s.RULES.all)),T=k!==void 0&&(s.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:s.util.schemaHasRules(k,s.RULES.all)),R=b.baseId;if(D||T){var F;b.createErrors=!1,b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" var "+f+" = errors; var "+g+" = true; ";var P=s.compositeRule;s.compositeRule=b.compositeRule=!0,a+=" "+s.validate(b)+" ",b.baseId=R,b.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",s.compositeRule=b.compositeRule=P,D?(a+=" if ("+S+") { ",b.schema=s.schema.then,b.schemaPath=s.schemaPath+".then",b.errSchemaPath=s.errSchemaPath+"/then",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'then'; "):F="'then'",a+=" } ",T&&(a+=" else { ")):a+=" if (!"+S+") { ",T&&(b.schema=s.schema.else,b.schemaPath=s.schemaPath+".else",b.errSchemaPath=s.errSchemaPath+"/else",a+=" "+s.validate(b)+" ",b.baseId=R,a+=" "+g+" = "+S+"; ",D&&T?(F="ifClause"+d,a+=" var "+F+" = 'else'; "):F="'else'",a+=" } "),a+=" if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { failingKeyword: "+F+" } ",s.opts.messages!==!1&&(a+=` , message: 'should match "' + `+F+` + '" schema' `),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Tf}var Df,$S;function XN(){return $S||($S=1,Df=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k="i"+d,D=b.dataLevel=s.dataLevel+1,T="data"+D,R=s.baseId;if(a+="var "+f+" = errors;var "+g+";",Array.isArray(m)){var F=s.schema.additionalItems;if(F===!1){a+=" "+g+" = "+x+".length <= "+m.length+"; ";var P=y;y=s.errSchemaPath+"/additionalItems",a+=" if (!"+g+") { ";var N=N||[];N.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+m.length+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+m.length+" items' "),s.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var I=a;a=N.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+I+"]); ":a+=" validate.errors = ["+I+"]; return false; ":a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",y=P,O&&(S+="}",a+=" else { ")}var L=m;if(L){for(var j,G=-1,U=L.length-1;G0||j===!1:s.util.schemaHasRules(j,s.RULES.all)){a+=" "+E+" = true; if ("+x+".length > "+G+") { ";var Q=x+"["+G+"]";b.schema=j,b.schemaPath=o+"["+G+"]",b.errSchemaPath=y+"/"+G,b.errorPath=s.util.getPathExpr(s.errorPath,G,s.opts.jsonPointers,!0),b.dataPathArr[D]=G;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",a+=" } ",O&&(a+=" if ("+E+") { ",S+="}")}}if(typeof F=="object"&&(s.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:s.util.schemaHasRules(F,s.RULES.all))){b.schema=F,b.schemaPath=s.schemaPath+".additionalItems",b.errSchemaPath=s.errSchemaPath+"/additionalItems",a+=" "+E+" = true; if ("+x+".length > "+m.length+") { for (var "+k+" = "+m.length+"; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" } } ",O&&(a+=" if ("+E+") { ",S+="}")}}else if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){b.schema=m,b.schemaPath=o,b.errSchemaPath=y,a+=" for (var "+k+" = 0; "+k+" < "+x+".length; "+k+"++) { ",b.errorPath=s.util.getPathExpr(s.errorPath,k,s.opts.jsonPointers,!0);var Q=x+"["+k+"]";b.dataPathArr[D]=k;var $=s.validate(b);b.baseId=R,s.util.varOccurences($,T)<2?a+=" "+s.util.varReplace($,T,Q)+" ":a+=" var "+T+" = "+Q+"; "+$+" ",O&&(a+=" if (!"+E+") break; "),a+=" }"}return O&&(a+=" "+S+" if ("+f+" == errors) {"),a}),Df}var If,jS;function qS(){return jS||(jS=1,If=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,R,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=u=="maximum",S=b?"exclusiveMaximum":"exclusiveMinimum",E=s.schema[S],k=s.opts.$data&&E&&E.$data,D=b?"<":">",T=b?">":"<",R=void 0;if(!(g||typeof m=="number"||m===void 0))throw new Error(u+" must be number");if(!(k||E===void 0||typeof E=="number"||typeof E=="boolean"))throw new Error(S+" must be number or boolean");if(k){var F=s.util.getData(E.$data,v,s.dataPathArr),P="exclusive"+d,N="exclType"+d,I="exclIsNumber"+d,L="op"+d,j="' + "+L+" + '";a+=" var schemaExcl"+d+" = "+F+"; ",F="schemaExcl"+d,a+=" var "+P+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var R=S,G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+N+" == 'number' ? ( ("+P+" = "+f+" === undefined || "+F+" "+D+"= "+f+") ? "+x+" "+T+"= "+F+" : "+x+" "+T+" "+f+" ) : ( ("+P+" = "+F+" === true) ? "+x+" "+T+"= "+f+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { var op"+d+" = "+P+" ? '"+D+"' : '"+D+"='; ",m===void 0&&(R=S,y=s.errSchemaPath+"/"+S,f=F,g=k)}else{var I=typeof E=="number",j=D;if(I&&g){var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ( "+f+" === undefined || "+E+" "+D+"= "+f+" ? "+x+" "+T+"= "+E+" : "+x+" "+T+" "+f+" ) || "+x+" !== "+x+") { "}else{I&&m===void 0?(P=!0,R=S,y=s.errSchemaPath+"/"+S,f=E,T+="="):(I&&(f=Math[b?"min":"max"](E,m)),E===(I?f:!0)?(P=!0,R=S,y=s.errSchemaPath+"/"+S,T+="="):(P=!1,j+="="));var L="'"+j+"'";a+=" if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+" "+T+" "+f+" || "+x+" !== "+x+") { "}}R=R||u;var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { comparison: "+L+", limit: "+f+", exclusive: "+P+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be "+j+" ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;return a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { "),a}),If}var Rf,QS;function US(){return QS||(QS=1,Rf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxItems"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+x+".length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxItems"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" items' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Rf}var Ff,VS;function WS(){return VS||(VS=1,Ff=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxLength"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),s.opts.unicode===!1?a+=" "+x+".length ":a+=" ucs2length("+x+") ",a+=" "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be ",u=="maxLength"?a+="longer":a+="shorter",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" characters' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Ff}var _f,GS;function zS(){return GS||(GS=1,_f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,S,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");var b=u=="maxProperties"?">":"<";a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+x+").length "+b+" "+f+") { ";var S=u,E=E||[];E.push(a),a="",s.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { limit: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have ",u=="maxProperties"?a+="more":a+="fewer",a+=" than ",g?a+="' + "+f+" + '":a+=""+m,a+=" properties' "),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var k=a;return a=E.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),_f}var Bf,ZS;function YN(){return ZS||(ZS=1,Bf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;if(g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m,!(g||typeof m=="number"))throw new Error(u+" must be number");a+="var division"+d+";if (",g&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+d+" = "+x+" / "+f+", ",s.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+d+") - division"+d+") > 1e-"+s.opts.multipleOfPrecision+" ":a+=" division"+d+" !== parseInt(division"+d+") ",a+=" ) ",g&&(a+=" ) "),a+=" ) { ";var b=b||[];b.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { multipleOf: "+f+" } ",s.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",g?a+="' + "+f:a+=""+f+"'"),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var S=a;return a=b.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Bf}var Lf,XS;function HN(){return XS||(XS=1,Lf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s);f.level++;var b="valid"+f.level;if(s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y,a+=" var "+g+" = errors; ";var S=s.compositeRule;s.compositeRule=f.compositeRule=!0,f.createErrors=!1;var E;f.opts.allErrors&&(E=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+s.validate(f)+" ",f.createErrors=!0,E&&(f.opts.allErrors=E),s.compositeRule=f.compositeRule=S,a+=" if ("+b+") { ";var k=k||[];k.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var D=a;a=k.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+g+"; if (vErrors !== null) { if ("+g+") vErrors.length = "+g+"; else vErrors = null; } ",s.opts.allErrors&&(a+=" } ")}else a+=" var err = ",s.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: {} ",s.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O&&(a+=" if (false) { ");return a}),Lf}var Nf,YS;function KN(){return YS||(YS=1,Nf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="valid"+d,f="errs__"+d,b=s.util.copy(s),S="";b.level++;var E="valid"+b.level,k=b.baseId,D="prevValid"+d,T="passingSchemas"+d;a+="var "+f+" = errors , "+D+" = false , "+g+" = false , "+T+" = null; ";var R=s.compositeRule;s.compositeRule=b.compositeRule=!0;var F=m;if(F)for(var P,N=-1,I=F.length-1;N0||P===!1:s.util.schemaHasRules(P,s.RULES.all))?(b.schema=P,b.schemaPath=o+"["+N+"]",b.errSchemaPath=y+"/"+N,a+=" "+s.validate(b)+" ",b.baseId=k):a+=" var "+E+" = true; ",N&&(a+=" if ("+E+" && "+D+") { "+g+" = false; "+T+" = ["+T+", "+N+"]; } else { ",S+="}"),a+=" if ("+E+") { "+g+" = "+D+" = true; "+T+" = "+N+"; }";return s.compositeRule=b.compositeRule=R,a+=""+S+"if (!"+g+") { var err = ",s.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { passingSchemas: "+T+" } ",s.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!s.compositeRule&&O&&(s.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",s.opts.allErrors&&(a+=" } "),a}),Nf}var Mf,HS;function JN(){return HS||(HS=1,Mf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g=s.opts.$data&&m&&m.$data,f;g?(a+=" var schema"+d+" = "+s.util.getData(m.$data,v,s.dataPathArr)+"; ",f="schema"+d):f=m;var b=g?"(new RegExp("+f+"))":s.usePattern(m);a+="if ( ",g&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+b+".test("+x+") ) { ";var S=S||[];S.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { pattern: ",g?a+=""+f:a+=""+s.util.toQuotedString(m),a+=" } ",s.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,g?a+="' + "+f+" + '":a+=""+s.util.escapeQuotes(m),a+=`"' `),s.opts.verbose&&(a+=" , schema: ",g?a+="validate.schema"+o:a+=""+s.util.toQuotedString(m),a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var E=a;return a=S.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",O&&(a+=" else { "),a}),Mf}var $f,KS;function eM(){return KS||(KS=1,$f=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level,E="key"+d,k="idx"+d,D=f.dataLevel=s.dataLevel+1,T="data"+D,R="dataProperties"+d,F=Object.keys(m||{}).filter(V),P=s.schema.patternProperties||{},N=Object.keys(P).filter(V),I=s.schema.additionalProperties,L=F.length||N.length,j=I===!1,G=typeof I=="object"&&Object.keys(I).length,U=s.opts.removeAdditional,Q=j||G||U,$=s.opts.ownProperties,W=s.baseId,K=s.schema.required;if(K&&!(s.opts.$data&&K.$data)&&K.length8)a+=" || validate.schema"+o+".hasOwnProperty("+E+") ";else{var ae=F;if(ae)for(var z,ue=-1,ne=ae.length-1;ue0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){var Ve=s.util.getProperty(z),it=x+Ve,mt=kt&&fe.default!==void 0;f.schema=fe,f.schemaPath=o+Ve,f.errSchemaPath=y+"/"+s.util.escapeFragment(z),f.errorPath=s.util.getPath(s.errorPath,z,s.opts.jsonPointers),f.dataPathArr[D]=s.util.toQuotedString(z);var pt=s.validate(f);if(f.baseId=W,s.util.varOccurences(pt,T)<2){pt=s.util.varReplace(pt,T,it);var Pt=it}else{var Pt=T;a+=" var "+T+" = "+it+"; "}if(mt)a+=" "+pt+" ";else{if(te&&te[z]){a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = false; ";var Z=s.errorPath,Re=y,Bt=s.util.escapeQuotes(z);s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPath(Z,z,s.opts.jsonPointers)),y=s.errSchemaPath+"/required";var Se=Se||[];Se.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+Bt+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Bt+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var we=a;a=Se.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+we+"]); ":a+=" validate.errors = ["+we+"]; return false; ":a+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=Re,s.errorPath=Z,a+=" } else { "}else O?(a+=" if ( "+Pt+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Pt+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", '"+s.util.escapeQuotes(z)+"') "),a+=" ) { ");a+=" "+pt+" } "}}O&&(a+=" if ("+S+") { ",b+="}")}}if(N.length){var se=N;if(se)for(var pe,Kt=-1,Vt=se.length-1;Kt0||fe===!1:s.util.schemaHasRules(fe,s.RULES.all)){f.schema=fe,f.schemaPath=s.schemaPath+".patternProperties"+s.util.getProperty(pe),f.errSchemaPath=s.errSchemaPath+"/patternProperties/"+s.util.escapeFragment(pe),$?a+=" "+R+" = "+R+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+R+".length; "+k+"++) { var "+E+" = "+R+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" if ("+s.usePattern(pe)+".test("+E+")) { ",f.errorPath=s.util.getPathExpr(s.errorPath,E,s.opts.jsonPointers);var it=x+"["+E+"]";f.dataPathArr[D]=E;var pt=s.validate(f);f.baseId=W,s.util.varOccurences(pt,T)<2?a+=" "+s.util.varReplace(pt,T,it)+" ":a+=" var "+T+" = "+it+"; "+pt+" ",O&&(a+=" if (!"+S+") break; "),a+=" } ",O&&(a+=" else "+S+" = true; "),a+=" } ",O&&(a+=" if ("+S+") { ",b+="}")}}}return O&&(a+=" "+b+" if ("+g+" == errors) {"),a}),$f}var jf,JS;function tM(){return JS||(JS=1,jf=function(s,u,p){var a=" ",d=s.level,v=s.dataLevel,m=s.schema[u],o=s.schemaPath+s.util.getProperty(u),y=s.errSchemaPath+"/"+u,O=!s.opts.allErrors,x="data"+(v||""),g="errs__"+d,f=s.util.copy(s),b="";f.level++;var S="valid"+f.level;if(a+="var "+g+" = errors;",s.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:s.util.schemaHasRules(m,s.RULES.all)){f.schema=m,f.schemaPath=o,f.errSchemaPath=y;var E="key"+d,k="idx"+d,D="i"+d,T="' + "+E+" + '",R=f.dataLevel=s.dataLevel+1,F="data"+R,P="dataProperties"+d,N=s.opts.ownProperties,I=s.baseId;N&&(a+=" var "+P+" = undefined; "),N?a+=" "+P+" = "+P+" || Object.keys("+x+"); for (var "+k+"=0; "+k+"<"+P+".length; "+k+"++) { var "+E+" = "+P+"["+k+"]; ":a+=" for (var "+E+" in "+x+") { ",a+=" var startErrs"+d+" = errors; ";var L=E,j=s.compositeRule;s.compositeRule=f.compositeRule=!0;var G=s.validate(f);f.baseId=I,s.util.varOccurences(G,F)<2?a+=" "+s.util.varReplace(G,F,L)+" ":a+=" var "+F+" = "+L+"; "+G+" ",s.compositeRule=f.compositeRule=j,a+=" if (!"+S+") { for (var "+D+"=startErrs"+d+"; "+D+"0||R===!1:s.util.schemaHasRules(R,s.RULES.all))||(S[S.length]=k)}}else var S=m;if(f||S.length){var F=s.errorPath,P=f||S.length>=s.opts.loopRequired,N=s.opts.ownProperties;if(O)if(a+=" var missing"+d+"; ",P){f||(a+=" var "+b+" = validate.schema"+o+"; ");var I="i"+d,L="schema"+d+"["+I+"]",j="' + "+L+" + '";s.opts._errorDataPathProperty&&(s.errorPath=s.util.getPathExpr(F,L,s.opts.jsonPointers)),a+=" var "+g+" = true; ",f&&(a+=" if (schema"+d+" === undefined) "+g+" = true; else if (!Array.isArray(schema"+d+")) "+g+" = false; else {"),a+=" for (var "+I+" = 0; "+I+" < "+b+".length; "+I+"++) { "+g+" = "+x+"["+b+"["+I+"]] !== undefined ",N&&(a+=" && Object.prototype.hasOwnProperty.call("+x+", "+b+"["+I+"]) "),a+="; if (!"+g+") break; } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var G=G||[];G.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { missingProperty: '"+j+"' } ",s.opts.messages!==!1&&(a+=" , message: '",s.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+j+"\\'",a+="' "),s.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var U=a;a=G.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var $,I=-1,W=Q.length-1;I 1) { ";var S=s.schema.items&&s.schema.items.type,E=Array.isArray(S);if(!S||S=="object"||S=="array"||E&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+x+"[i], "+x+"[j])) { "+g+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+x+"[i]; ";var k="checkDataType"+(E?"s":"");a+=" if ("+s.util[k](S,"item",s.opts.strictNumbers,!0)+") continue; ",E&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+g+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",f&&(a+=" } "),a+=" if (!"+g+") { ";var D=D||[];D.push(a),a="",s.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+s.errorPath+" , schemaPath: "+s.util.toQuotedString(y)+" , params: { i: i, j: j } ",s.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),s.opts.verbose&&(a+=" , schema: ",f?a+="validate.schema"+o:a+=""+m,a+=" , parentSchema: validate.schema"+s.schemaPath+" , data: "+x+" "),a+=" } "):a+=" {} ";var T=a;a=D.pop(),!s.compositeRule&&O?s.async?a+=" throw new ValidationError(["+T+"]); ":a+=" validate.errors = ["+T+"]; return false; ":a+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",O&&(a+=" else { ")}else O&&(a+=" if (true) { ");return a}),Qf}var Uf,r1;function sM(){return r1||(r1=1,Uf={$ref:$N(),allOf:jN(),anyOf:qN(),$comment:QN(),const:UN(),contains:VN(),dependencies:WN(),enum:GN(),format:zN(),if:ZN(),items:XN(),maximum:qS(),minimum:qS(),maxItems:US(),minItems:US(),maxLength:WS(),minLength:WS(),maxProperties:zS(),minProperties:zS(),multipleOf:YN(),not:HN(),oneOf:KN(),pattern:JN(),properties:eM(),propertyNames:tM(),required:rM(),uniqueItems:nM(),validate:wS()}),Uf}var Vf,n1;function iM(){if(n1)return Vf;n1=1;var c=sM(),s=da().toHash;return Vf=function(){var p=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],d=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],v=["number","integer","string","array","object","boolean","null"];return p.all=s(a),p.types=s(v),p.forEach(function(m){m.rules=m.rules.map(function(o){var y;if(typeof o=="object"){var O=Object.keys(o)[0];y=o[O],o=O,y.forEach(function(g){a.push(g),p.all[g]=!0})}a.push(o);var x=p.all[o]={keyword:o,code:c[o],implements:y};return x}),p.all.$comment={keyword:"$comment",code:c.$comment},m.type&&(p.types[m.type]=m)}),p.keywords=s(a.concat(d)),p.custom={},p},Vf}var Wf,s1;function aM(){if(s1)return Wf;s1=1;var c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return Wf=function(s,u){for(var p=0;p(Se[we]=Me,Se),{}),x=[0,1,2,"off","warn","error"];function g(Se){const we=Array.isArray(Se)?Se[0]:Se;return we===0||we===1||we===2?we:typeof we=="string"&&O[we.toLowerCase()]||0}function f(Se){Se.rules&&Object.keys(Se.rules).forEach(we=>{const Me=Se.rules[we];typeof Me=="number"?Se.rules[we]=y[Me]||y[0]:Array.isArray(Me)&&typeof Me[0]=="number"&&(Me[0]=y[Me[0]]||y[0])})}function b(Se){return g(Se)===2}function S(Se){let we=Array.isArray(Se)?Se[0]:Se;return typeof we=="string"&&(we=we.toLowerCase()),x.indexOf(we)!==-1}function E(Se){return Object.keys(Se).every(we=>S(Se[we]))}function k(Se){switch(Se){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${Se}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var D={__proto__:null,getRuleSeverity:g,normalizeToStrings:f,isErrorSeverity:b,isValidSeverity:S,isEverySeverityValid:E,normalizeConfigGlobal:k};const T={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},R=new Set;function F(Se,we){const Me=JSON.stringify({source:Se,errorCode:we});if(R.has(Me))return;R.add(Me);const it=v.default.relative(process.cwd(),Se),pt=T[we];process.emitWarning(`${pt} (found in "${it}")`,"DeprecationWarning",we)}const P={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var N=(Se={})=>{const we=new m.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...Se});return we.addMetaSchema(P),we._opts.defaultMeta=P.id,we};const I={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},L={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...I},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...I},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};function j(Se,we){const Me={};for(const[it,pt]of Object.entries(Se))Object.hasOwnProperty.call(we,it)||(Me[it]=pt);return Me}const G=j(o.default.es2015,o.default.es5),U={Atomics:!1,SharedArrayBuffer:!1},Q={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},$={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var W=new Map(Object.entries({builtin:{globals:o.default.es5},es6:{globals:G,parserOptions:{ecmaVersion:6}},es2015:{globals:G,parserOptions:{ecmaVersion:6}},es2016:{globals:G,parserOptions:{ecmaVersion:7}},es2017:{globals:{...G,...U},parserOptions:{ecmaVersion:8}},es2018:{globals:{...G,...U},parserOptions:{ecmaVersion:9}},es2019:{globals:{...G,...U},parserOptions:{ecmaVersion:10}},es2020:{globals:{...G,...U,...Q},parserOptions:{ecmaVersion:11}},es2021:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:12}},es2022:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:13}},es2023:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:14}},es2024:{globals:{...G,...U,...Q,...$},parserOptions:{ecmaVersion:15}},browser:{globals:o.default.browser},node:{globals:o.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:o.default["shared-node-browser"]},worker:{globals:o.default.worker},serviceworker:{globals:o.default.serviceworker},commonjs:{globals:o.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:o.default.amd},mocha:{globals:o.default.mocha},jasmine:{globals:o.default.jasmine},jest:{globals:o.default.jest},phantomjs:{globals:o.default.phantomjs},jquery:{globals:o.default.jquery},qunit:{globals:o.default.qunit},prototypejs:{globals:o.default.prototypejs},shelljs:{globals:o.default.shelljs},meteor:{globals:o.default.meteor},mongo:{globals:o.default.mongo},protractor:{globals:o.default.protractor},applescript:{globals:o.default.applescript},nashorn:{globals:o.default.nashorn},atomtest:{globals:o.default.atomtest},embertest:{globals:o.default.embertest},webextensions:{globals:o.default.webextensions},greasemonkey:{globals:o.default.greasemonkey}}));const K=N(),te=new WeakMap,V=Function.prototype;let ae;const z={error:2,warn:1,off:0},ue=new WeakSet,ne=Object.freeze({type:"array",minItems:0,maxItems:0});class ce{constructor({builtInRules:we=new Map}={}){this.builtInRules=we}getRuleOptionsSchema(we){if(!we)return null;if(!we.meta)return{...ne};const Me=we.meta.schema;if(typeof Me>"u")return{...ne};if(Me===!1)return null;if(typeof Me!="object"||Me===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(Me)?Me.length?{type:"array",items:Me,minItems:0,maxItems:Me.length}:{...ne}:Me}validateRuleSeverity(we){const Me=Array.isArray(we)?we[0]:we,it=typeof Me=="string"?z[Me.toLowerCase()]:Me;if(it===0||it===1||it===2)return it;throw new Error(` Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${d.default.inspect(Me).replace(/'/gu,'"').replace(/\n/gu,"")}'). +`)}validateRuleSchema(we,Me){if(!te.has(we))try{const pt=this.getRuleOptionsSchema(we);pt&&te.set(we,K.compile(pt))}catch(pt){const kt=new Error(pt.message,{cause:pt});throw kt.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA",kt}const it=te.get(we);if(it&&(it(Me),it.errors))throw new Error(it.errors.map(pt=>` Value ${JSON.stringify(pt.data)} ${pt.message}. +`).join(""))}validateRuleOptions(we,Me,it,pt=null){try{this.validateRuleSeverity(it)!==0&&this.validateRuleSchema(we,Array.isArray(it)?it.slice(1):[])}catch(kt){let qt=kt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"?`Error while processing options validation schema of rule '${Me}': ${kt.message}`:`Configuration for rule "${Me}" is invalid: +${kt.message}`;typeof pt=="string"&&(qt=`${pt}: + ${qt}`);const Ut=new Error(qt,{cause:kt});throw kt.code&&(Ut.code=kt.code),Ut}}validateEnvironment(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{if(!(it(pt)||W.get(pt)||null)){const qt=`${Me}: + Environment key "${pt}" is unknown +`;throw new Error(qt)}})}validateRules(we,Me,it=V){we&&Object.keys(we).forEach(pt=>{const kt=it(pt)||this.builtInRules.get(pt)||null;this.validateRuleOptions(kt,pt,we[pt],Me)})}validateGlobals(we,Me=null){we&&Object.entries(we).forEach(([it,pt])=>{try{k(pt)}catch(kt){throw new Error(`ESLint configuration of global '${it}' in ${Me} is invalid: +${kt.message}`)}})}validateProcessor(we,Me,it){if(we&&!it(we))throw new Error(`ESLint configuration of processor in '${Me}' is invalid: '${we}' was not found.`)}formatErrors(we){return we.map(Me=>{if(Me.keyword==="additionalProperties")return`Unexpected top-level property "${Me.dataPath.length?`${Me.dataPath.slice(1)}.${Me.params.additionalProperty}`:Me.params.additionalProperty}"`;if(Me.keyword==="type"){const pt=Me.dataPath.slice(1),kt=Array.isArray(Me.schema)?Me.schema.join("/"):Me.schema,qt=JSON.stringify(Me.data);return`Property "${pt}" is the wrong type (expected ${kt} but got \`${qt}\`)`}return`"${Me.dataPath[0]==="."?Me.dataPath.slice(1):Me.dataPath}" ${Me.message}. Value: ${JSON.stringify(Me.data)}`}).map(Me=>` - ${Me}. +`).join("")}validateConfigSchema(we,Me=null){if(ae=ae||K.compile(L),!ae(we))throw new Error(`ESLint configuration in ${Me} is invalid: +${this.formatErrors(ae.errors)}`);Object.hasOwnProperty.call(we,"ecmaFeatures")&&F(Me,"ESLINT_LEGACY_ECMAFEATURES")}validate(we,Me,it,pt){this.validateConfigSchema(we,Me),this.validateRules(we.rules,Me,it),this.validateEnvironment(we.env,Me,pt),this.validateGlobals(we.globals,Me);for(const kt of we.overrides||[])this.validateRules(kt.rules,Me,it),this.validateEnvironment(kt.env,Me,pt),this.validateGlobals(we.globals,Me)}validateConfigArray(we){const Me=Map.prototype.get.bind(we.pluginEnvironments),it=Map.prototype.get.bind(we.pluginProcessors),pt=Map.prototype.get.bind(we.pluginRules);for(const kt of we)ue.has(kt)||(ue.add(kt),this.validateEnvironment(kt.env,kt.name,Me),this.validateGlobals(kt.globals,kt.name),this.validateProcessor(kt.processor,kt.name,it),this.validateRules(kt.rules,kt.name,pt))}}const pe=/^@.*\//iu;function Be(Se,we){let Me=Se;if(Me.includes("\\")&&(Me=Me.replace(/\\/gu,"/")),Me.charAt(0)==="@"){const it=new RegExp(`^(@[^/]+)(?:/(?:${we})?)?$`,"u"),pt=new RegExp(`^${we}(-|$)`,"u");it.test(Me)?Me=Me.replace(it,`$1/${we}`):pt.test(Me.split("/")[1])||(Me=Me.replace(/^@([^/]+)\/(.*)$/u,`@$1/${we}-$2`))}else Me.startsWith(`${we}-`)||(Me=`${we}-${Me}`);return Me}function oe(Se,we){if(Se[0]==="@"){let Me=new RegExp(`^(@[^/]+)/${we}$`,"u").exec(Se);if(Me)return Me[1];if(Me=new RegExp(`^(@[^/]+)/${we}-(.+)$`,"u").exec(Se),Me)return`${Me[1]}/${Me[2]}`}else if(Se.startsWith(`${we}-`))return Se.slice(we.length+1);return Se}function Z(Se){const we=Se.match(pe);return we?we[0]:""}var ge={__proto__:null,normalizePackageName:Be,getShorthandName:oe,getNamespaceFromTerm:Z};const Re={environments:W,ConfigOps:D,ConfigValidator:ce,naming:ge};return Tl.Legacy=Re,Tl}var Ql={exports:{}},Ul={exports:{}},Kf,m1;function l$(){if(m1)return Kf;m1=1;var c=1e3,s=c*60,u=s*60,p=u*24,a=p*7,d=p*365.25;Kf=function(O,x){x=x||{};var g=typeof O;if(g==="string"&&O.length>0)return v(O);if(g==="number"&&isFinite(O))return x.long?o(O):m(O);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))};function v(O){if(O=String(O),!(O.length>100)){var x=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(x){var g=parseFloat(x[1]),f=(x[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return g*d;case"weeks":case"week":case"w":return g*a;case"days":case"day":case"d":return g*p;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function m(O){var x=Math.abs(O);return x>=p?Math.round(O/p)+"d":x>=u?Math.round(O/u)+"h":x>=s?Math.round(O/s)+"m":x>=c?Math.round(O/c)+"s":O+"ms"}function o(O){var x=Math.abs(O);return x>=p?y(O,x,p,"day"):x>=u?y(O,x,u,"hour"):x>=s?y(O,x,s,"minute"):x>=c?y(O,x,c,"second"):O+" ms"}function y(O,x,g,f){var b=x>=g*1.5;return Math.round(O/g)+" "+f+(b?"s":"")}return Kf}var Jf,g1;function y1(){if(g1)return Jf;g1=1;function c(s){p.debug=p,p.default=p,p.coerce=y,p.disable=v,p.enable=d,p.enabled=m,p.humanize=l$(),p.destroy=O,Object.keys(s).forEach(x=>{p[x]=s[x]}),p.names=[],p.skips=[],p.formatters={};function u(x){let g=0;for(let f=0;f{if(N==="%%")return"%";F++;const L=p.formatters[I];if(typeof L=="function"){const j=k[F];N=L.call(D,j),k.splice(F,1),F--}return N}),p.formatArgs.call(D,k),(D.log||p.log).apply(D,k)}return E.namespace=x,E.useColors=p.useColors(),E.color=p.selectColor(x),E.extend=a,E.destroy=p.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(b!==p.namespaces&&(b=p.namespaces,S=p.enabled(x)),S),set:k=>{f=k}}),typeof p.init=="function"&&p.init(E),E}function a(x,g){const f=p(this.namespace+(typeof g>"u"?":":g)+x);return f.log=this.log,f}function d(x){p.save(x),p.namespaces=x,p.names=[],p.skips=[];let g;const f=(typeof x=="string"?x:"").split(/[\s,]+/),b=f.length;for(g=0;g"-"+g)].join(",");return p.enable(""),x}function m(x){if(x[x.length-1]==="*")return!0;let g,f;for(g=0,f=p.skips.length;g{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+c.exports.humanize(this.diff),!this.useColors)return;const y="color: "+this.color;o.splice(1,0,y,"color: inherit");let O=0,x=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(O++,g==="%c"&&(x=O))}),o.splice(x,0,y)}s.log=console.debug||console.log||(()=>{});function a(o){try{o?s.storage.setItem("debug",o):s.storage.removeItem("debug")}catch{}}function d(){let o;try{o=s.storage.getItem("debug")}catch{}return!o&&typeof xr<"u"&&"env"in xr&&(o=xr.env.DEBUG),o}function v(){try{return localStorage}catch{}}c.exports=y1()(s);const{formatters:m}=c.exports;m.j=function(o){try{return JSON.stringify(o)}catch(y){return"[UnexpectedJSONParseError]: "+y.message}}}(Ul,Ul.exports)),Ul.exports}var Vl={exports:{}};function v1(){return!1}function x1(){throw new Error("tty.ReadStream is not implemented")}function O1(){throw new Error("tty.ReadStream is not implemented")}var c$={isatty:v1,ReadStream:x1,WriteStream:O1},f$=Object.freeze({__proto__:null,ReadStream:x1,WriteStream:O1,default:c$,isatty:v1}),p$=i(f$),S1;function h$(){return S1||(S1=1,function(c,s){const u=p$,p=pS;s.init=O,s.log=m,s.formatArgs=d,s.save=o,s.load=y,s.useColors=a,s.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const g=gH();g&&(g.stderr||g).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}s.inspectOpts=Object.keys(xr.env).filter(g=>/^debug_/i.test(g)).reduce((g,f)=>{const b=f.substring(6).toLowerCase().replace(/_([a-z])/g,(E,k)=>k.toUpperCase());let S=xr.env[f];return/^(yes|on|true|enabled)$/i.test(S)?S=!0:/^(no|off|false|disabled)$/i.test(S)?S=!1:S==="null"?S=null:S=Number(S),g[b]=S,g},{});function a(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:u.isatty(xr.stderr.fd)}function d(g){const{namespace:f,useColors:b}=this;if(b){const S=this.color,E="\x1B[3"+(S<8?S:"8;5;"+S),k=` ${E};1m${f} \x1B[0m`;g[0]=k+g[0].split(` +`).join(` +`+k),g.push(E+"m+"+c.exports.humanize(this.diff)+"\x1B[0m")}else g[0]=v()+f+" "+g[0]}function v(){return s.inspectOpts.hideDate?"":new Date().toISOString()+" "}function m(...g){return xr.stderr.write(p.format(...g)+` +`)}function o(g){g?xr.env.DEBUG=g:delete xr.env.DEBUG}function y(){return xr.env.DEBUG}function O(g){g.inspectOpts={};const f=Object.keys(s.inspectOpts);for(let b=0;bf.trim()).join(" ")},x.O=function(g){return this.inspectOpts.colors=this.useColors,p.inspect(g,this.inspectOpts)}}(Vl,Vl.exports)),Vl.exports}var E1;function qi(){return E1||(E1=1,typeof xr>"u"||xr.type==="renderer"||xr.browser===!0||xr.__nwjs?Ql.exports=u$():Ql.exports=h$()),Ql.exports}var ep,C1;function tp(){if(C1)return ep;C1=1;const c=kl(),s=qi()("eslint:traverser");function u(){}function p(v){return v!==null&&typeof v=="object"&&typeof v.type=="string"}function a(v,m){let o=v[m.type];return o||(o=c.getKeys(m),s('Unknown node type "%s": Estimated visitor keys %j',m.type,o)),o}class d{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(m,o){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=o.visitorKeys||c.KEYS,this._enter=o.enter||u,this._leave=o.leave||u,this._traverse(m,null)}_traverse(m,o){if(p(m)){if(this._current=m,this._skipped=!1,this._enter(m,o),!this._skipped&&!this._broken){const y=a(this._visitorKeys,m);if(y.length>=1){this._parents.push(m);for(let O=0;O")}function o(Ie){return v(Ie,",")}function y(Ie){return v(Ie,";")}function O(Ie){return v(Ie,":")}function x(Ie){return v(Ie,"(")}function g(Ie){return v(Ie,")")}function f(Ie){return v(Ie,"[")}function b(Ie){return v(Ie,"]")}function S(Ie){return v(Ie,"{")}function E(Ie){return v(Ie,"}")}function k(Ie){return["Block","Line","Shebang"].includes(Ie.type)}const D=d(m),T=d(o),R=d(y),F=d(O),P=d(x),N=d(g),I=d(f),L=d(b),j=d(S),G=d(E),U=d(k);function Q(Ie,ke){return Ie.id?ke.getTokenAfter(Ie.id,x):ke.getFirstToken(Ie,x)}function $(Ie,ke){const Te=Ie.parent;let Ue=null,lt=null;if(Ie.type==="ArrowFunctionExpression"){const Oe=ke.getTokenBefore(Ie.body,m);Ue=Oe.loc.start,lt=Oe.loc.end}else Te.type==="Property"||Te.type==="MethodDefinition"||Te.type==="PropertyDefinition"?(Ue=Te.loc.start,lt=Q(Ie,ke).loc.start):(Ue=Ie.loc.start,lt=Q(Ie,ke).loc.start);return{start:{...Ue},end:{...lt}}}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof h<"u"?h:{},K=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),te=new Set([Array.isArray,typeof BigInt=="function"?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map(Ie=>Math[Ie]).filter(Ie=>typeof Ie=="function"),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter(Ie=>typeof Ie=="function")),V=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function ae(Ie,ke){let Te=Ie;for(;(typeof Te=="object"||typeof Te=="function")&&Te!==null;){const Ue=Object.getOwnPropertyDescriptor(Te,ke);if(Ue)return Ue;Te=Object.getPrototypeOf(Te)}return null}function z(Ie,ke){const Te=ae(Ie,ke);return Te!=null&&Te.get!=null}function ue(Ie,ke){const Te=[];for(let Ue=0;Ue":return{value:Te.value>Ue.value};case">=":return{value:Te.value>=Ue.value};case"<<":return{value:Te.value<>":return{value:Te.value>>Ue.value};case">>>":return{value:Te.value>>>Ue.value};case"+":return{value:Te.value+Ue.value};case"-":return{value:Te.value-Ue.value};case"*":return{value:Te.value*Ue.value};case"/":return{value:Te.value/Ue.value};case"%":return{value:Te.value%Ue.value};case"**":return{value:Te.value**Ue.value};case"|":return{value:Te.value|Ue.value};case"^":return{value:Te.value^Ue.value};case"&":return{value:Te.value&Ue.value}}return null},CallExpression(Ie,ke){const Te=Ie.callee,Ue=ue(Ie.arguments,ke);if(Ue!=null)if(Te.type==="MemberExpression"){if(Te.property.type==="PrivateIdentifier")return null;const lt=ce(Te.object,ke);if(lt!=null){if(lt.value==null&&(lt.optional||Ie.optional))return{value:void 0,optional:!0};const Oe=pe(Te,ke);if(Oe!=null){const Pe=lt.value,de=Oe.value;if(te.has(Pe[de]))return{value:Pe[de](...Ue)};if(V.has(Pe[de]))return{value:Ue[0]}}}}else{const lt=ce(Te,ke);if(lt!=null){if(lt.value==null&&Ie.optional)return{value:void 0,optional:!0};const Oe=lt.value;if(te.has(Oe))return{value:Oe(...Ue)};if(V.has(Oe))return{value:Ue[0]}}}return null},ConditionalExpression(Ie,ke){const Te=ce(Ie.test,ke);return Te!=null?Te.value?ce(Ie.consequent,ke):ce(Ie.alternate,ke):null},ExpressionStatement(Ie,ke){return ce(Ie.expression,ke)},Identifier(Ie,ke){if(ke!=null){const Te=p(ke,Ie);if(Te!=null&&Te.defs.length===0&&K.has(Te.name)&&Te.name in W)return{value:W[Te.name]};if(Te!=null&&Te.defs.length===1){const Ue=Te.defs[0];if(Ue.parent&&Ue.parent.kind==="const"&&Ue.node.id.type==="Identifier")return ce(Ue.node.init,ke)}}return null},Literal(Ie){return(Ie.regex!=null||Ie.bigint!=null)&&Ie.value==null?null:{value:Ie.value}},LogicalExpression(Ie,ke){const Te=ce(Ie.left,ke);if(Te!=null){if(Ie.operator==="||"&&Te.value||Ie.operator==="&&"&&!Te.value||Ie.operator==="??"&&Te.value!=null)return Te;const Ue=ce(Ie.right,ke);if(Ue!=null)return Ue}return null},MemberExpression(Ie,ke){if(Ie.property.type==="PrivateIdentifier")return null;const Te=ce(Ie.object,ke);if(Te!=null){if(Te.value==null&&(Te.optional||Ie.optional))return{value:void 0,optional:!0};const Ue=pe(Ie,ke);if(Ue!=null&&!z(Te.value,Ue.value))return{value:Te.value[Ue.value]}}return null},ChainExpression(Ie,ke){const Te=ce(Ie.expression,ke);return Te!=null?{value:Te.value}:null},NewExpression(Ie,ke){const Te=ce(Ie.callee,ke),Ue=ue(Ie.arguments,ke);if(Te!=null&&Ue!=null){const lt=Te.value;if(te.has(lt))return{value:new lt(...Ue)}}return null},ObjectExpression(Ie,ke){const Te={};for(const Ue of Ie.properties)if(Ue.type==="Property"){if(Ue.kind!=="init")return null;const lt=pe(Ue,ke),Oe=ce(Ue.value,ke);if(lt==null||Oe==null)return null;Te[lt.value]=Oe.value}else if(Ue.type==="SpreadElement"||Ue.type==="ExperimentalSpreadProperty"){const lt=ce(Ue.argument,ke);if(lt==null)return null;Object.assign(Te,lt.value)}else return null;return{value:Te}},SequenceExpression(Ie,ke){const Te=Ie.expressions[Ie.expressions.length-1];return ce(Te,ke)},TaggedTemplateExpression(Ie,ke){const Te=ce(Ie.tag,ke),Ue=ue(Ie.quasi.expressions,ke);if(Te!=null&&Ue!=null){const lt=Te.value,Oe=Ie.quasi.quasis.map(Pe=>Pe.value.cooked);if(Oe.raw=Ie.quasi.quasis.map(Pe=>Pe.value.raw),lt===String.raw)return{value:lt(Oe,...Ue)}}return null},TemplateLiteral(Ie,ke){const Te=ue(Ie.expressions,ke);if(Te!=null){let Ue=Ie.quasis[0].value.cooked;for(let lt=0;lt",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),Se=Object.freeze(new Set(["-","+","!","~"]));function we(Ie){return Ie!==null&&typeof Ie=="object"&&typeof Ie.type=="string"}const Me=Object.freeze(Object.assign(Object.create(null),{$visit(Ie,ke,Te){const{type:Ue}=Ie;return typeof this[Ue]=="function"?this[Ue](Ie,ke,Te):this.$visitChildren(Ie,ke,Te)},$visitChildren(Ie,ke,Te){const{type:Ue}=Ie;for(const lt of Te[Ue]||s.getKeys(Ie)){const Oe=Ie[lt];if(Array.isArray(Oe)){for(const Pe of Oe)if(we(Pe)&&this.$visit(Pe,ke,Te))return!0}else if(we(Oe)&&this.$visit(Oe,ke,Te))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Re.has(Ie.operator)&&(Ie.left.type!=="Literal"||Ie.right.type!=="Literal")?!0:this.$visitChildren(Ie,ke,Te)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(Ie,ke,Te){return ke.considerGetters||ke.considerImplicitTypeConversion&&Ie.computed&&Ie.property.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},MethodDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},NewExpression(){return!0},Property(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},PropertyDefinition(Ie,ke,Te){return ke.considerImplicitTypeConversion&&Ie.computed&&Ie.key.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UnaryExpression(Ie,ke,Te){return Ie.operator==="delete"||ke.considerImplicitTypeConversion&&Se.has(Ie.operator)&&Ie.argument.type!=="Literal"?!0:this.$visitChildren(Ie,ke,Te)},UpdateExpression(){return!0},YieldExpression(){return!0}}));function it(Ie,ke,{considerGetters:Te=!1,considerImplicitTypeConversion:Ue=!1}={}){return Me.$visit(Ie,{considerGetters:Te,considerImplicitTypeConversion:Ue},ke.visitorKeys||s.KEYS)}function pt(Ie,ke){const Te=Ie.parent;switch(Te.type){case"CallExpression":case"NewExpression":return Te.arguments.length===1&&Te.arguments[0]===Ie?ke.getTokenAfter(Te.callee,x):null;case"DoWhileStatement":return Te.test===Ie?ke.getTokenAfter(Te.body,x):null;case"IfStatement":case"WhileStatement":return Te.test===Ie?ke.getFirstToken(Te,1):null;case"ImportExpression":return Te.source===Ie?ke.getFirstToken(Te,1):null;case"SwitchStatement":return Te.discriminant===Ie?ke.getFirstToken(Te,1):null;case"WithStatement":return Te.object===Ie?ke.getFirstToken(Te,1):null;default:return null}}function kt(Ie,ke,Te){let Ue,lt,Oe,Pe,de;if(typeof Ie=="number"){if(Ue=Ie|0,lt=ke,Oe=Te,!(Ue>=1))throw new TypeError("'times' should be a positive integer.")}else Ue=1,lt=Ie,Oe=ke;if(lt==null||lt.parent==null||lt.parent.type==="CatchClause"&<.parent.param===lt)return!1;Pe=de=lt;do Pe=Oe.getTokenBefore(Pe),de=Oe.getTokenAfter(de);while(Pe!=null&&de!=null&&x(Pe)&&g(de)&&Pe!==pt(lt,Oe)&&--Ue>0);return Ue===0}const qt=/\$(?:[$&`']|[1-9][0-9]?)/gu,Ut=new WeakMap;function tr(Ie,ke){let Te=!1;for(let Ue=ke-1;Ue>=0&&Ie.charCodeAt(Ue)===92;--Ue)Te=!Te;return Te}function fe(Ie,ke,Te){const Ue=[];let lt=0,Oe=null;function Pe(de){switch(de){case"$$":return"$";case"$&":return Oe[0];case"$`":return ke.slice(0,Oe.index);case"$'":return ke.slice(Oe.index+Oe[0].length);default:{const ye=de.slice(1);return ye in Oe?Oe[ye]:de}}}for(Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(Te.replace(qt,Pe)),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}function Ve(Ie,ke,Te){const Ue=[];let lt=0;for(const Oe of Ie.execAll(ke))Ue.push(ke.slice(lt,Oe.index)),Ue.push(String(Te(...Oe,Oe.index,Oe.input))),lt=Oe.index+Oe[0].length;return Ue.push(ke.slice(lt)),Ue.join("")}class mt{constructor(ke,{escaped:Te=!1}={}){if(!(ke instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!ke.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Ut.set(this,{pattern:new RegExp(ke.source,ke.flags),escaped:!!Te})}*execAll(ke){const{pattern:Te,escaped:Ue}=Ut.get(this);let lt=null,Oe=0;for(Te.lastIndex=0;(lt=Te.exec(ke))!=null;)(Ue||!tr(ke,lt.index))&&(Oe=Te.lastIndex,yield lt,Te.lastIndex=Oe)}test(ke){return!this.execAll(ke).next().done}[Symbol.replace](ke,Te){return typeof Te=="function"?Ve(this,String(ke),Te):fe(this,String(ke),String(Te))}}const Pt=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,Bt=Function.call.bind(Object.hasOwnProperty),se=Symbol("read"),Kt=Symbol("call"),Vt=Symbol("construct"),ir=Symbol("esm"),Ot={require:{[Kt]:!0}};function Zt(Ie){return Ie==null||Ie.defs.length!==0||Ie.references.some(ke=>ke.isWrite())}function hr(Ie){const ke=Ie.parent;switch(ke&&ke.type){case"ConditionalExpression":return ke.consequent===Ie||ke.alternate===Ie;case"LogicalExpression":return!0;case"SequenceExpression":return ke.expressions[ke.expressions.length-1]===Ie;case"ChainExpression":return!0;default:return!1}}class Dt{constructor(ke,{mode:Te="strict",globalObjectNames:Ue=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=ke,this.mode=Te,this.globalObjectNames=Ue.slice(0)}*iterateGlobalReferences(ke){for(const Te of Object.keys(ke)){const Ue=ke[Te],lt=[Te],Oe=this.globalScope.set.get(Te);Zt(Oe)||(yield*this._iterateVariableReferences(Oe,lt,Ue,!0))}for(const Te of this.globalObjectNames){const Ue=[],lt=this.globalScope.set.get(Te);Zt(lt)||(yield*this._iterateVariableReferences(lt,Ue,ke,!1))}}*iterateCjsReferences(ke){for(const{node:Te}of this.iterateGlobalReferences(Ot)){const Ue=oe(Te.arguments[0]);if(Ue==null||!Bt(ke,Ue))continue;const lt=ke[Ue],Oe=[Ue];lt[se]&&(yield{node:Te,path:Oe,type:se,info:lt[se]}),yield*this._iteratePropertyReferences(Te,Oe,lt)}}*iterateEsmReferences(ke){const Te=this.globalScope.block;for(const Ue of Te.body){if(!Pt.test(Ue.type)||Ue.source==null)continue;const lt=Ue.source.value;if(!Bt(ke,lt))continue;const Oe=ke[lt],Pe=[lt];if(Oe[se]&&(yield{node:Ue,path:Pe,type:se,info:Oe[se]}),Ue.type==="ExportAllDeclaration")for(const de of Object.keys(Oe)){const ye=Oe[de];ye[se]&&(yield{node:Ue,path:Pe.concat(de),type:se,info:ye[se]})}else for(const de of Ue.specifiers){const ye=Bt(Oe,ir),Le=this._iterateImportReferences(de,Pe,ye?Oe:this.mode==="legacy"?{default:Oe,...Oe}:{default:Oe});if(ye)yield*Le;else for(const X of Le)X.path=X.path.filter(Dr),(X.path.length>=2||X.type!==se)&&(yield X)}}}*_iterateVariableReferences(ke,Te,Ue,lt){if(!this.variableStack.includes(ke)){this.variableStack.push(ke);try{for(const Oe of ke.references){if(!Oe.isRead())continue;const Pe=Oe.identifier;lt&&Ue[se]&&(yield{node:Pe,path:Te,type:se,info:Ue[se]}),yield*this._iteratePropertyReferences(Pe,Te,Ue)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(ke,Te,Ue){let lt=ke;for(;hr(lt);)lt=lt.parent;const Oe=lt.parent;if(Oe.type==="MemberExpression"){if(Oe.object===lt){const Pe=Z(Oe);if(Pe==null||!Bt(Ue,Pe))return;Te=Te.concat(Pe);const de=Ue[Pe];de[se]&&(yield{node:Oe,path:Te,type:se,info:de[se]}),yield*this._iteratePropertyReferences(Oe,Te,de)}return}if(Oe.type==="CallExpression"){Oe.callee===lt&&Ue[Kt]&&(yield{node:Oe,path:Te,type:Kt,info:Ue[Kt]});return}if(Oe.type==="NewExpression"){Oe.callee===lt&&Ue[Vt]&&(yield{node:Oe,path:Te,type:Vt,info:Ue[Vt]});return}if(Oe.type==="AssignmentExpression"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue),yield*this._iteratePropertyReferences(Oe,Te,Ue));return}if(Oe.type==="AssignmentPattern"){Oe.right===lt&&(yield*this._iterateLhsReferences(Oe.left,Te,Ue));return}Oe.type==="VariableDeclarator"&&Oe.init===lt&&(yield*this._iterateLhsReferences(Oe.id,Te,Ue))}*_iterateLhsReferences(ke,Te,Ue){if(ke.type==="Identifier"){const lt=p(this.globalScope,ke);lt!=null&&(yield*this._iterateVariableReferences(lt,Te,Ue,!1));return}if(ke.type==="ObjectPattern"){for(const lt of ke.properties){const Oe=Z(lt);if(Oe==null||!Bt(Ue,Oe))continue;const Pe=Te.concat(Oe),de=Ue[Oe];de[se]&&(yield{node:lt,path:Pe,type:se,info:de[se]}),yield*this._iterateLhsReferences(lt.value,Pe,de)}return}ke.type==="AssignmentPattern"&&(yield*this._iterateLhsReferences(ke.left,Te,Ue))}*_iterateImportReferences(ke,Te,Ue){const lt=ke.type;if(lt==="ImportSpecifier"||lt==="ImportDefaultSpecifier"){const Oe=lt==="ImportDefaultSpecifier"?"default":ke.imported.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]}),yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Pe,!1);return}if(lt==="ImportNamespaceSpecifier"){yield*this._iterateVariableReferences(p(this.globalScope,ke.local),Te,Ue,!1);return}if(lt==="ExportSpecifier"){const Oe=ke.local.name;if(!Bt(Ue,Oe))return;Te=Te.concat(Oe);const Pe=Ue[Oe];Pe[se]&&(yield{node:ke,path:Te,type:se,info:Pe[se]})}}}Dt.READ=se,Dt.CALL=Kt,Dt.CONSTRUCT=Vt,Dt.ESM=ir;function Dr(Ie,ke){return!(ke===1&&Ie==="default")}var Et={CALL:Kt,CONSTRUCT:Vt,ESM:ir,findVariable:p,getFunctionHeadLocation:$,getFunctionNameWithKind:ge,getInnermostScope:u,getPropertyName:Z,getStaticValue:Be,getStringIfConstant:oe,hasSideEffect:it,isArrowToken:m,isClosingBraceToken:E,isClosingBracketToken:b,isClosingParenToken:g,isColonToken:O,isCommaToken:o,isCommentToken:k,isNotArrowToken:D,isNotClosingBraceToken:G,isNotClosingBracketToken:L,isNotClosingParenToken:N,isNotColonToken:F,isNotCommaToken:T,isNotCommentToken:U,isNotOpeningBraceToken:j,isNotOpeningBracketToken:I,isNotOpeningParenToken:P,isNotSemicolonToken:R,isOpeningBraceToken:S,isOpeningBracketToken:f,isOpeningParenToken:x,isParenthesized:kt,isSemicolonToken:y,PatternMatcher:mt,READ:se,ReferenceTracker:Dt};c.CALL=Kt,c.CONSTRUCT=Vt,c.ESM=ir,c.PatternMatcher=mt,c.READ=se,c.ReferenceTracker=Dt,c.default=Et,c.findVariable=p,c.getFunctionHeadLocation=$,c.getFunctionNameWithKind=ge,c.getInnermostScope=u,c.getPropertyName=Z,c.getStaticValue=Be,c.getStringIfConstant=oe,c.hasSideEffect=it,c.isArrowToken=m,c.isClosingBraceToken=E,c.isClosingBracketToken=b,c.isClosingParenToken=g,c.isColonToken=O,c.isCommaToken=o,c.isCommentToken=k,c.isNotArrowToken=D,c.isNotClosingBraceToken=G,c.isNotClosingBracketToken=L,c.isNotClosingParenToken=N,c.isNotColonToken=F,c.isNotCommaToken=T,c.isNotCommentToken=U,c.isNotOpeningBraceToken=j,c.isNotOpeningBracketToken=I,c.isNotOpeningParenToken=P,c.isNotSemicolonToken=R,c.isOpeningBraceToken=S,c.isOpeningBracketToken=f,c.isOpeningParenToken=x,c.isParenthesized=kt,c.isSemicolonToken=y}(rp)),rp}function A1(c,s){if(c===s)return 0;for(var u=c.length,p=s.length,a=0,d=Math.min(u,p);a=0){var v=p.indexOf(` +`,d+1);p=p.substring(v+1)}this.stack=p}}}fo(Wl,Error);function _1(c,s){return typeof c=="string"?c.length=0;y--)if(v[y]!==m[y])return!1;for(y=v.length-1;y>=0;y--)if(o=v[y],!ga(c[o],s[o],u,p))return!1;return!0}En.notDeepEqual=lp;function lp(c,s,u){ga(c,s,!1)&&Cn(c,s,u,"notDeepEqual",lp)}En.notDeepStrictEqual=up;function up(c,s,u){ga(c,s,!0)&&Cn(c,s,u,"notDeepStrictEqual",up)}En.strictEqual=cp;function cp(c,s,u){c!==s&&Cn(c,s,u,"===",cp)}En.notStrictEqual=fp;function fp(c,s,u){c===s&&Cn(c,s,u,"!==",fp)}function N1(c,s){if(!c||!s)return!1;if(Object.prototype.toString.call(s)=="[object RegExp]")return s.test(c);try{if(c instanceof s)return!0}catch{}return Error.isPrototypeOf(s)?!1:s.call({},c)===!0}function v$(c){var s;try{c()}catch(u){s=u}return s}function M1(c,s,u,p){var a;if(typeof s!="function")throw new TypeError('"block" argument must be a function');typeof u=="string"&&(p=u,u=null),a=v$(s),p=(u&&u.name?" ("+u.name+").":".")+(p?" "+p:"."),c&&!a&&Cn(a,u,"Missing expected exception"+p);var d=typeof p=="string",v=!c&&ha(a),m=!c&&a&&!u;if((v&&d&&N1(a,u)||m)&&Cn(a,u,"Got unwanted exception"+p),c&&a&&u&&!N1(a,u)||!c&&a)throw a}En.throws=$1;function $1(c,s,u){M1(!0,c,s,u)}En.doesNotThrow=j1;function j1(c,s,u){M1(!1,c,s,u)}En.ifError=q1;function q1(c){if(c)throw c}var x$=Object.freeze({__proto__:null,AssertionError:Wl,assert:mo,deepEqual:ap,deepStrictEqual:op,default:En,doesNotThrow:j1,equal:sp,fail:Cn,ifError:q1,notDeepEqual:lp,notDeepStrictEqual:up,notEqual:ip,notStrictEqual:fp,ok:mo,strictEqual:cp,throws:$1}),Gl=i(x$),pp,Q1;function go(){return Q1||(Q1=1,pp=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const s=[];for(;this.moveNext();)s.push(this.current);return s}moveNext(){throw new Error("Not implemented.")}}),pp}var yo={},U1;function bo(){return U1||(U1=1,yo.search=function(s,u){for(let p=0,a=s.length-1;p<=a;){const d=(p+a)/2|0,m=s[d].range[0];if(u<=m){if(d===p)return d;a=d}else p=d+1}return s.length},yo.getFirstIndex=function(s,u,p){if(p in u)return u[p];if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[0]>=p?a:a+1:s.length}return 0},yo.getLastIndex=function(s,u,p){if(p in u)return u[p]-1;if(p-1 in u){const a=u[p-1],d=s[a];return d?d.range[1]>p?a-1:a:s.length-1}return s.length-1}),yo}var hp,V1;function O$(){if(V1)return hp;V1=1;const c=go(),s=bo();return hp=class extends c{constructor(p,a,d,v,m){super(),this.tokens=p,this.comments=a,this.tokenIndex=s.getLastIndex(p,d,m),this.commentIndex=s.search(a,m)-1,this.border=v}moveNext(){const p=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,a=this.commentIndex>=0?this.comments[this.commentIndex]:null;return p&&(!a||p.range[1]>a.range[1])?(this.current=p,this.tokenIndex-=1):a?(this.current=a,this.commentIndex-=1):this.current=null,!!this.current&&(this.border===-1||this.current.range[0]>=this.border)}},hp}var dp,W1;function S$(){if(W1)return dp;W1=1;const c=go(),{getLastIndex:s,getFirstIndex:u}=bo();return dp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.index=s(a,v,o),this.indexEnd=u(a,v,m)}moveNext(){return this.index>=this.indexEnd?(this.current=this.tokens[this.index],this.index-=1,!0):!1}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}},dp}var mp,G1;function gp(){if(G1)return mp;G1=1;const c=go();return mp=class extends c{constructor(u){super(),this.cursor=u}moveNext(){const u=this.cursor.moveNext();return this.current=this.cursor.current,u}},mp}var yp,z1;function E$(){if(z1)return yp;z1=1;const c=gp();return yp=class extends c{constructor(u,p){super(u),this.predicate=p}moveNext(){const u=this.predicate;for(;super.moveNext();)if(u(this.current))return!0;return!1}},yp}var bp,Z1;function C$(){if(Z1)return bp;Z1=1;const c=go(),{getFirstIndex:s,search:u}=bo();return bp=class extends c{constructor(a,d,v,m,o){super(),this.tokens=a,this.comments=d,this.tokenIndex=s(a,v,m),this.commentIndex=u(d,m),this.border=o}moveNext(){const a=this.tokenIndex0?(this.count-=1,super.moveNext()):!1}},Op}var Sp,H1;function k$(){if(H1)return Sp;H1=1;const c=gp();return Sp=class extends c{constructor(u,p){super(u),this.count=p}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},Sp}var Ep,K1;function A$(){if(K1)return Ep;K1=1;const c=O$(),s=S$(),u=E$(),p=C$(),a=xp(),d=w$(),v=k$();class m{constructor(y,O){this.TokenCursor=y,this.TokenCommentCursor=O}createBaseCursor(y,O,x,g,f,b){const S=b?this.TokenCommentCursor:this.TokenCursor;return new S(y,O,x,g,f)}createCursor(y,O,x,g,f,b,S,E,k){let D=this.createBaseCursor(y,O,x,g,f,b);return S&&(D=new u(D,S)),E>=1&&(D=new v(D,E)),k>=0&&(D=new d(D,k)),D}}return Ep={forward:new m(a,p),backward:new m(s,c)},Ep}var Cp,J1;function P$(){if(J1)return Cp;J1=1;const c=xp();return Cp=class extends c{constructor(u,p,a,d,v,m,o){super(u,p,a,d,v),this.index=Math.max(0,this.index-m),this.indexEnd=Math.min(u.length-1,this.indexEnd+o)}},Cp}var wp,eE;function T$(){if(eE)return wp;eE=1;const c=Gl,{isCommentToken:s}=Kr(),u=A$(),p=xp(),a=P$(),d=bo(),v=Symbol("tokens"),m=Symbol("comments"),o=Symbol("indexMap");function y(b,S){const E=Object.create(null);let k=0,D=0,T,R;for(;k=0,"options.skip should be zero or a positive integer."),c(!N||typeof N=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,N,P,-1)}function x(b,S,E,k,D,T,R){let F=!1,P=0,N=!1,I=null;return typeof R=="number"?(P=R|0,N=!0):typeof R=="function"?I=R:R&&(F=!!R.includeComments,P=R.count|0,N=typeof R.count=="number",I=R.filter||null),c(P>=0,"options.count should be zero or a positive integer."),c(!I||typeof I=="function","options.filter should be a function."),b.createCursor(S,E,k,D,T,F,I,0,N?P:-1)}function g(b,S,E,k,D,T,R){return typeof T>"u"&&typeof R>"u"?new p(b,S,E,k,D):typeof T=="number"||typeof T>"u"?new a(b,S,E,k,D,T|0,R|0):x(u.forward,b,S,E,k,D,T)}function f(b){const S=[];let E=b.getOneToken();for(;E&&s(E);)S.push(E),E=b.getOneToken();return S}return wp=class{constructor(S,E){this[v]=S,this[m]=E,this[o]=y(S,E)}getTokenByRangeStart(S,E){const k=E&&E.includeComments,D=u.forward.createBaseCursor(this[v],this[m],this[o],S,-1,k).getOneToken();return D&&D.range[0]===S?D:null}getFirstToken(S,E){return O(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getLastToken(S,E){return O(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getOneToken()}getTokenBefore(S,E){return O(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getOneToken()}getTokenAfter(S,E){return O(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getOneToken()}getFirstTokenBetween(S,E,k){return O(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getLastTokenBetween(S,E,k){return O(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getOneToken()}getTokenOrCommentBefore(S,E){return this.getTokenBefore(S,{includeComments:!0,skip:E})}getTokenOrCommentAfter(S,E){return this.getTokenAfter(S,{includeComments:!0,skip:E})}getFirstTokens(S,E){return x(u.forward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens()}getLastTokens(S,E){return x(u.backward,this[v],this[m],this[o],S.range[0],S.range[1],E).getAllTokens().reverse()}getTokensBefore(S,E){return x(u.backward,this[v],this[m],this[o],-1,S.range[0],E).getAllTokens().reverse()}getTokensAfter(S,E){return x(u.forward,this[v],this[m],this[o],S.range[1],-1,E).getAllTokens()}getFirstTokensBetween(S,E,k){return x(u.forward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens()}getLastTokensBetween(S,E,k){return x(u.backward,this[v],this[m],this[o],S.range[1],E.range[0],k).getAllTokens().reverse()}getTokens(S,E,k){return g(this[v],this[m],this[o],S.range[0],S.range[1],E,k).getAllTokens()}getTokensBetween(S,E,k){return g(this[v],this[m],this[o],S.range[1],E.range[0],k,k).getAllTokens()}commentsExistBetween(S,E){const k=d.search(this[m],S.range[1]);return k=0&&m.nodes[o]===u(p,"enter")?m.nodes[o]=u(p,void 0):m.nodes.push(u(p,"exit"))}else m.nodes.push(u(p,"enter"))}c([`${a.currentSegments.map(s).join(",")})`,`${p.type}${d?":exit":""}`].join(" "))}:c,dumpDot:c.enabled?function(p){let a=` +digraph { +node[shape=box,style="rounded,filled",fillcolor=white]; +initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`;p.returnedSegments.length>0&&(a+=`final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25]; +`),p.thrownSegments.length>0&&(a+=`thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true]; +`);const d=Object.create(null),v=this.makeDotArrows(p,d);for(const m in d){const o=d[m];a+=`${m}[`,o.reachable?a+='label="':a+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',o.internal.nodes.length>0?a+=o.internal.nodes.join("\\n"):a+="????",a+=`"]; +`}a+=`${v} +`,a+="}",c("DOT",a)}:c,makeDotArrows(p,a){const d=[[p.initialSegment,0]],v=a||Object.create(null);let m=p.initialSegment.id,o=`initial->${p.initialSegment.id}`;for(;d.length>0;){const y=d.pop(),O=y[0],x=y[1];if(v[O.id]&&x===0)continue;v[O.id]=O;const g=O.allNextSegments[x];g&&(m===O.id?o+=`->${g.id}`:o+=`; +${O.id}->${g.id}`,m=g.id,d.unshift([O,1+x]),d.push([g,0]))}return p.returnedSegments.forEach(y=>{m===y.id?o+="->final":o+=`; +${y.id}->final`,m=null}),p.thrownSegments.forEach(y=>{m===y.id?o+="->thrown":o+=`; +${y.id}->thrown`,m=null}),`${o};`}},Tp}var Dp,lE;function Ip(){if(lE)return Dp;lE=1;const c=oE();function s(p){return p.reachable}class u{constructor(a,d,v){this.id=a,this.nextSegments=[],this.prevSegments=d.filter(s),this.allNextSegments=[],this.allPrevSegments=d,this.reachable=v,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),c.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(a){return this.internal.loopedPrevSegments.includes(a)}static newRoot(a){return new u(a,[],!0)}static newNext(a,d){return new u(a,u.flattenUnusedSegments(d),d.some(s))}static newUnreachable(a,d){const v=new u(a,u.flattenUnusedSegments(d),!1);return u.markUsed(v),v}static newDisconnected(a,d){return new u(a,[],d.some(s))}static markUsed(a){if(a.internal.used)return;a.internal.used=!0;let d;if(a.reachable)for(d=0;d=0?m:O.length+m,g=o>=0?o:O.length+o,f=[];for(let b=0;bv.count;){const y=[];for(let O=0,x=Math.floor(o.length/2);O0&&m.some(u)}makeNext(m,o){return p(this,m,o,s.newNext)}makeUnreachable(m,o){return p(this,m,o,s.newUnreachable)}makeDisconnected(m,o){return p(this,m,o,s.newDisconnected)}add(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.push(a(this,m))}replaceHead(m){c(m.length>=this.count,`${m.length} >= ${this.count}`),this.segmentsList.splice(-1,1,a(this,m))}addAll(m){c(m.count===this.count),this.segmentsList.push(...m.segmentsList)}clear(){this.segmentsList=[]}static newRoot(m){const o=new d(m,null,1);return o.add([s.newRoot(m.next())]),o}static newEmpty(m,o){return new d(m.idGenerator,m,(o?2:1)*m.count)}}return Rp=d,Rp}var Fp,cE;function I$(){if(cE)return Fp;cE=1;const c=Ip(),s=D$();class u{constructor(I,L,j,G){this.upper=I,this.breakable=L,this.label=j,this.brokenForkContext=s.newEmpty(G)}}class p{constructor(I){this.upper=I,this.choiceContextCount=0}}class a{constructor(I,L,j,G){this.upper=I,this.kind=L,this.isForkingAsResult=j,this.trueForkContext=s.newEmpty(G),this.falseForkContext=s.newEmpty(G),this.nullishForkContext=s.newEmpty(G),this.processed=!1}}class d{constructor(I,L,j,G){this.upper=I,this.type=L,this.label=j,this.brokenForkContext=G.brokenForkContext}}class v extends d{constructor(I,L,j){super(I,"WhileStatement",L,j),this.test=void 0,this.continueDestSegments=null}}class m extends d{constructor(I,L,j,G){super(I,"DoWhileStatement",L,j),this.test=void 0,this.entrySegments=null,this.continueForkContext=s.newEmpty(G)}}class o extends d{constructor(I,L,j){super(I,"ForStatement",L,j),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class y extends d{constructor(I,L,j){super(I,"ForInStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class O extends d{constructor(I,L,j){super(I,"ForOfStatement",L,j),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class x{constructor(I,L){this.upper=I,this.hasCase=L,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class g{constructor(I,L,j){this.upper=I,this.hasFinalizer=L,this.position="try",this.returnedForkContext=L?s.newEmpty(j):null,this.thrownForkContext=s.newEmpty(j),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(N,I,L,j){for(let G=0;G=2&&c.markPrevSegmentAsLooped(W,$),N.notifyLooped($,W)}}function F(N,I,L){I.processed||(I.trueForkContext.add(L),I.falseForkContext.add(L),I.nullishForkContext.add(L)),N.test!==!0&&N.brokenForkContext.addAll(I.falseForkContext),N.endOfTestSegments=I.trueForkContext.makeNext(0,-1)}class P{constructor(I,L){this.idGenerator=I,this.notifyLooped=L,this.forkContext=s.newRoot(I),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const j=this.finalSegments,G=this.returnedForkContext,U=this.thrownForkContext;G.add=f.bind(null,G,U,j),U.add=f.bind(null,U,G,j)}get headSegments(){return this.forkContext.head}get parentForkContext(){const I=this.forkContext;return I&&I.upper}pushForkContext(I){return this.forkContext=s.newEmpty(this.forkContext,I),this.forkContext}popForkContext(){const I=this.forkContext;return this.forkContext=I.upper,this.forkContext.replaceHead(I.makeNext(0,-1)),I}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(I,L){this.choiceContext=new a(this.choiceContext,I,L,this.forkContext)}popChoiceContext(){const I=this.choiceContext,L=this.forkContext,j=L.head;switch(this.choiceContext=I.upper,I.kind){case"&&":case"||":case"??":if(I.processed||(I.trueForkContext.add(j),I.falseForkContext.add(j),I.nullishForkContext.add(j)),I.isForkingAsResult){const U=this.choiceContext;return U.trueForkContext.addAll(I.trueForkContext),U.falseForkContext.addAll(I.falseForkContext),U.nullishForkContext.addAll(I.nullishForkContext),U.processed=!0,I}break;case"test":I.processed?(I.falseForkContext.clear(),I.falseForkContext.add(j)):(I.trueForkContext.clear(),I.trueForkContext.add(j));break;case"loop":return I;default:throw new Error("unreachable")}const G=I.trueForkContext;return G.addAll(I.falseForkContext),L.replaceHead(G.makeNext(0,-1)),I}makeLogicalRight(){const I=this.choiceContext,L=this.forkContext;if(I.processed){let j;switch(I.kind){case"&&":j=I.trueForkContext;break;case"||":j=I.falseForkContext;break;case"??":j=I.nullishForkContext;break;default:throw new Error("unreachable")}L.replaceHead(j.makeNext(0,-1)),j.clear(),I.processed=!1}else{switch(I.kind){case"&&":I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head);break;case"||":I.trueForkContext.add(L.head);break;case"??":I.trueForkContext.add(L.head),I.falseForkContext.add(L.head);break;default:throw new Error("unreachable")}L.replaceHead(L.makeNext(-1,-1))}}makeIfConsequent(){const I=this.choiceContext,L=this.forkContext;I.processed||(I.trueForkContext.add(L.head),I.falseForkContext.add(L.head),I.nullishForkContext.add(L.head)),I.processed=!1,L.replaceHead(I.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const I=this.choiceContext,L=this.forkContext;I.trueForkContext.clear(),I.trueForkContext.add(L.head),I.processed=!0,L.replaceHead(I.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new p(this.chainContext)}popChainContext(){const I=this.chainContext;this.chainContext=I.upper;for(let L=I.choiceContextCount;L>0;--L)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(I,L){this.switchContext=new x(this.switchContext,I),this.pushBreakContext(!0,L)}popSwitchContext(){const I=this.switchContext;this.switchContext=I.upper;const L=this.forkContext,j=this.popBreakContext().brokenForkContext;if(I.forkCount===0){j.empty||(j.add(L.makeNext(-1,-1)),L.replaceHead(j.makeNext(0,-1)));return}const G=L.head;this.forkBypassPath();const U=L.head;j.add(G),I.lastIsDefault||(I.defaultBodySegments?(T(I.defaultSegments,I.defaultBodySegments),R(this,U,I.defaultBodySegments)):j.add(U));for(let Q=0;Q0&&I[0].reachable&&this.returnedForkContext.add(I)}}return Fp=P,Fp}var _p,fE;function pE(){if(fE)return _p;fE=1;class c{constructor(u){this.prefix=String(u),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}return _p=c,_p}var Bp,hE;function R$(){if(hE)return Bp;hE=1;const c=I$(),s=pE();class u{constructor({id:a,origin:d,upper:v,onLooped:m}){this.id=a,this.origin=d,this.upper=v,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new c(new s(`${a}_`),m)}),v&&v.childCodePaths.push(this)}static getState(a){return a.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}traverseSegments(a,d){let v,m;typeof a=="function"?(m=a,v={}):(v=a||{},m=d);const o=v.first||this.internal.initialSegment,y=v.last;let O,x,g,f=null;const b=new Set,S=[[o,0]],E=new Set;let k=!1;const D={skip(){E.add(f)},break(){k=!0}};function T(F){return b.has(F)||f.isLoopedPrevSegment(F)}function R(F){return E.has(F)||f.isLoopedPrevSegment(F)}for(;S.length>0;){if(O=S.at(-1),f=O[0],x=O[1],x===0){if(b.has(f)){S.pop();continue}if(f!==o&&f.prevSegments.length>0&&!f.prevSegments.every(T)){S.pop();continue}if(b.add(f),E.size>0&&f.prevSegments.length>0&&f.prevSegments.every(R))E.add(f);else if(m.call(this,f,D),f===y&&D.skip(),k)break}g=f.nextSegments.length-1,x=1&&L.arguments[0]===P&&I.makeOptionalRight();break;case"MemberExpression":L.optional===!0&&L.property===P&&I.makeOptionalRight();break;case"LogicalExpression":L.right===P&&o(L.operator)&&I.makeLogicalRight();break;case"AssignmentExpression":L.right===P&&y(L.operator)&&I.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":L.consequent===P?I.makeIfConsequent():L.alternate===P&&I.makeIfAlternate();break;case"SwitchCase":L.consequent[0]===P&&I.makeSwitchCaseBody(!1,!L.test);break;case"TryStatement":L.handler===P?I.makeCatchBlock():L.finalizer===P&&I.makeFinallyBlock();break;case"WhileStatement":L.test===P?I.makeWhileTest(g(P)):(c(L.body===P),I.makeWhileBody());break;case"DoWhileStatement":L.body===P?I.makeDoWhileBody():(c(L.test===P),I.makeDoWhileTest(g(P)));break;case"ForStatement":L.test===P?I.makeForTest(g(P)):L.update===P?I.makeForUpdate():L.body===P&&I.makeForBody();break;case"ForInStatement":case"ForOfStatement":L.left===P?I.makeForInOfLeft():L.right===P?I.makeForInOfRight():(c(L.body===P),I.makeForInOfBody());break;case"AssignmentPattern":L.right===P&&(I.pushForkContext(),I.forkBypassPath(),I.forkPath());break}}function k(F,P){let N=F.codePath,I=N&&u.getState(N);const L=P.parent;function j(G){N&&(b(F,P),d.dumpState(P,I,!1)),N=F.codePath=new u({id:F.idGenerator.next(),origin:G,upper:N,onLooped:F.onLooped}),I=u.getState(N),d.dump(`onCodePathStart ${N.id}`),F.emitter.emit("onCodePathStart",N,P)}switch(m(P)&&j("class-field-initializer"),P.type){case"Program":j("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":j("function");break;case"StaticBlock":j("class-static-block");break;case"ChainExpression":I.pushChainContext();break;case"CallExpression":P.optional===!0&&I.makeOptionalNode();break;case"MemberExpression":P.optional===!0&&I.makeOptionalNode();break;case"LogicalExpression":o(P.operator)&&I.pushChoiceContext(P.operator,x(P));break;case"AssignmentExpression":y(P.operator)&&I.pushChoiceContext(P.operator.slice(0,-1),x(P));break;case"ConditionalExpression":case"IfStatement":I.pushChoiceContext("test",!1);break;case"SwitchStatement":I.pushSwitchContext(P.cases.some(v),O(P));break;case"TryStatement":I.pushTryContext(!!P.finalizer);break;case"SwitchCase":L.discriminant!==P&&L.cases[0]!==P&&I.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.pushLoopContext(P.type,O(P));break;case"LabeledStatement":s.test(P.body.type)||I.pushBreakContext(!1,P.label.name);break}b(F,P),d.dumpState(P,I,!1)}function D(F,P){const N=F.codePath,I=u.getState(N);let L=!1;switch(P.type){case"ChainExpression":I.popChainContext();break;case"IfStatement":case"ConditionalExpression":I.popChoiceContext();break;case"LogicalExpression":o(P.operator)&&I.popChoiceContext();break;case"AssignmentExpression":y(P.operator)&&I.popChoiceContext();break;case"SwitchStatement":I.popSwitchContext();break;case"SwitchCase":P.consequent.length===0&&I.makeSwitchCaseBody(!0,!P.test),I.forkContext.reachable&&(L=!0);break;case"TryStatement":I.popTryContext();break;case"BreakStatement":b(F,P),I.makeBreak(P.label&&P.label.name),L=!0;break;case"ContinueStatement":b(F,P),I.makeContinue(P.label&&P.label.name),L=!0;break;case"ReturnStatement":b(F,P),I.makeReturn(),L=!0;break;case"ThrowStatement":b(F,P),I.makeThrow(),L=!0;break;case"Identifier":f(P)&&(I.makeFirstThrowablePathInTryBlock(),L=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":I.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":I.popLoopContext();break;case"AssignmentPattern":I.popForkContext();break;case"LabeledStatement":s.test(P.body.type)||I.popBreakContext();break}L||b(F,P),d.dumpState(P,I,!0)}function T(F,P){function N(){let I=F.codePath;u.getState(I).makeFinal(),S(F,P),d.dump(`onCodePathEnd ${I.id}`),F.emitter.emit("onCodePathEnd",I,P),d.dumpDot(I),I=F.codePath=F.codePath.upper,I&&d.dumpState(P,u.getState(I),!0)}switch(P.type){case"Program":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"StaticBlock":{N();break}case"CallExpression":P.optional===!0&&P.arguments.length===0&&u.getState(F.codePath).makeOptionalRight();break}m(P)&&N()}class R{constructor(P){this.original=P,this.emitter=P.emitter,this.codePath=null,this.idGenerator=new a("s"),this.currentNode=null,this.onLooped=this.onLooped.bind(this)}enterNode(P){this.currentNode=P,P.parent&&E(this,P),k(this,P),this.original.enterNode(P),this.currentNode=null}leaveNode(P){this.currentNode=P,D(this,P),this.original.leaveNode(P),T(this,P),this.currentNode=null}onLooped(P,N){P.reachable&&N.reachable&&(d.dump(`onCodePathSegmentLoop ${P.id} -> ${N.id}`),this.emitter.emit("onCodePathSegmentLoop",P,N,this.currentNode))}}return Lp=R,Lp}var Np,mE;function gE(){return mE||(mE=1,Np=()=>{const c=Object.create(null);return Object.freeze({on(s,u){s in c?c[s].push(u):c[s]=[u]},emit(s,...u){s in c&&c[s].forEach(p=>p(...u))},eventNames(){return Object.keys(c)}})}),Np}var Qi={},Mp={exports:{}},$p={exports:{}},jp,yE;function _$(){if(yE)return jp;yE=1;var c,s,u,p,a,d,v={}.toString;c=m(function(o,y){return o.apply(null,y)}),s=function(o){return m(o)},u=m(function(o,y,O){return o(O,y)}),p=function(o){return function(y){return function(){return o(y(y)).apply(null,arguments)}}(function(y){return function(){return o(y(y)).apply(null,arguments)}})},a=m(function(o,y,O,x){return o(y(O),y(x))}),d=function(o){var y;return y={},function(){var O,x,g,f,b,S;for(x=[],g=0,f=arguments.length;g1?function(){var f=g?g.concat():[];return O=this,f.push.apply(f,arguments)=0;--ye)Le=de[ye],Pe=Oe(Le,Pe);return Pe}),P=ke(function(Oe,Pe){return F(Oe,Pe[Pe.length-1],Pe.slice(0,-1))}),N=ke(function(Oe,Pe){var de,ye,Le;for(de=[],ye=Pe;(Le=Oe(ye))!=null;)de.push(Le[0]),ye=Le[1];return de}),I=function(Oe){return[].concat.apply([],Oe)},L=ke(function(Oe,Pe){var de;return[].concat.apply([],function(){var ye,Le,X,ee=[];for(ye=0,X=(Le=Pe).length;yede?1:PeOe(ye)?1:Oe(de)Pe&&(Pe=X);return Pe},ge=function(Oe){var Pe,de,ye,Le,X;for(Pe=Oe[0],de=0,Le=(ye=Oe.slice(1)).length;deOe(de)&&(de=ee);return de}),Se=ke(function(Oe,Pe){var de,ye,Le,X,ee;for(de=Pe[0],ye=0,X=(Le=Pe.slice(1)).length;ye1?function(){var X=Le?Le.concat():[];return de=this,X.push.apply(X,arguments)>>0;++de1?function(){var R=T?T.concat():[];return k=this,R.push.apply(R,arguments)1?k:k.toLowerCase())}).replace(/^([A-Z]+)/,function(S,E){return E.length>1?E+"-":E.toLowerCase()})},Up={split:c,join:s,lines:u,unlines:p,words:a,unwords:d,chars:v,unchars:m,reverse:o,repeat:y,capitalize:O,camelize:x,dasherize:g};function f(b,S){var E,k=function(D){return b.length>1?function(){var T=D?D.concat():[];return E=this,T.push.apply(T,arguments)V?te:V}),s=K(function(te,V){return te0?1:0},d=K(function(te,V){return~~(te/V)}),v=K(function(te,V){return te%V}),m=K(function(te,V){return Math.floor(te/V)}),o=K(function(te,V){var ae;return(te%(ae=V)+ae)%ae}),y=function(te){return 1/te},O=Math.PI,x=O*2,g=Math.exp,f=Math.sqrt,b=Math.log,S=K(function(te,V){return Math.pow(te,V)}),E=Math.sin,k=Math.tan,D=Math.cos,T=Math.asin,R=Math.acos,F=Math.atan,P=K(function(te,V){return Math.atan2(te,V)}),N=function(te){return~~te},I=Math.round,L=Math.ceil,j=Math.floor,G=function(te){return te!==te},U=function(te){return te%2===0},Q=function(te){return te%2!==0},$=K(function(te,V){var ae;for(te=Math.abs(te),V=Math.abs(V);V!==0;)ae=te%V,te=V,V=ae;return te}),W=K(function(te,V){return Math.abs(Math.floor(te/$(te,V)*V))}),Vp={max:c,min:s,negate:u,abs:p,signum:a,quot:d,rem:v,div:m,mod:o,recip:y,pi:O,tau:x,exp:g,sqrt:f,ln:b,pow:S,sin:E,tan:k,cos:D,acos:R,asin:T,atan:F,atan2:P,truncate:N,round:I,ceiling:L,floor:j,isItNaN:G,even:U,odd:Q,gcd:$,lcm:W};function K(te,V){var ae,z=function(ue){return te.length>1?function(){var ne=ue?ue.concat():[];return ae=this,ne.push.apply(ne,arguments)1?function(){var E=S?S.concat():[];return f=this,E.push.apply(E,arguments)|"+c.source+"|\\S","g"),Zp.exports=function(b){var S,E;if(!b.length)throw new Error("No type specified.");if(S=b.match(s)||[],f("->",S))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return g(S)}catch(k){throw E=k,new Error(E.message+" - Remaining tokens: "+JSON.stringify(S)+" - Initial input: '"+b+"'")}};function f(b,S){for(var E=-1,k=S.length>>>0;++E{if(!P)return;const[N,I=null]=P.split(":");R[N]=I}),R}parseJSONLikeConfig(T){try{const F=c.parse("Object",T)||{};if(a(F))return{ok:!0,config:F}}catch{}const R=T.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{return{ok:!0,config:JSON.parse(`{${R}}`)}}catch(F){const P=F instanceof Error?F.message:String(F);return{ok:!1,error:{message:`Failed to parse JSON from '${R}': ${P}`}}}}parseListConfig(T){const R={};return T.split(",").forEach(F=>{const P=F.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");P&&(R[P]=!0)}),R}parseDirective(T){const{directivePart:R,justificationPart:F}=xa(this,S,ZB).call(this,T),P=s.exec(R);if(!P)return;const N=P[1],I=R.slice(P.index+N.length);return new d(N,I.trim(),F)}}S=new WeakSet,ZB=function(T){const R=/\s-{2,}\s/u.exec(T);if(!R)return{directivePart:T.trim(),justificationPart:""};const F=T.slice(0,R.index).trim(),P=T.slice(R.index+R[0].length).trim();return{directivePart:F,justificationPart:P}};function m(D){return"loc"in D}function o(D){return"position"in D}function y(D){return"range"in D}function O(D){return"position"in D}class x{constructor({target:T,phase:R,args:F}){or(this,"type","visit");or(this,"kind",1);or(this,"target");or(this,"phase");or(this,"args");this.target=T,this.phase=R,this.args=F}}class g{constructor({target:T,args:R}){or(this,"type","call");or(this,"kind",2);or(this,"target");or(this,"args");this.target=T,this.args=R}}class f{constructor({type:T,node:R,value:F,justification:P}){or(this,"type");or(this,"node");or(this,"value");or(this,"justification");this.type=T,this.node=R,this.value=F,this.justification=P}}class b{constructor({text:T,ast:R,lineEndingPattern:F=/\r?\n/u}){An(this,k,void 0);or(this,"ast");or(this,"text");this.ast=R,this.text=T,Zi(this,k,T.split(F))}getLoc(T){if(m(T))return T.loc;if(o(T))return T.position;throw new Error("Custom getLoc() method must be implemented in the subclass.")}getRange(T){if(y(T))return T.range;if(O(T))return[T.position.start.offset,T.position.end.offset];throw new Error("Custom getRange() method must be implemented in the subclass.")}getParent(T){throw new Error("Not implemented.")}getAncestors(T){if(!T)throw new TypeError("Missing required argument: node.");const R=[];for(let F=this.getParent(T);F;F=this.getParent(F))R.push(F);return R.reverse()}getText(T,R,F){if(T){const P=this.getRange(T);return this.text.slice(Math.max(P[0]-(R||0),0),P[1]+(F||0))}return this.text}get lines(){return Cr(this,k)}traverse(){throw new Error("Not implemented.")}}return k=new WeakMap,Qi.CallMethodStep=g,Qi.ConfigCommentParser=v,Qi.Directive=f,Qi.TextSourceCodeBase=b,Qi.VisitNodeStep=x,Qi}var Yp,FE;function V$(){var j;if(FE)return Yp;FE=1;const{isCommentToken:c}=Kr(),s=T$(),u=zl(),p=tp(),a=nE(),{directivesPattern:d}=iE(),v=F$(),m=gE(),{ConfigCommentParser:o,VisitNodeStep:y,CallMethodStep:O,Directive:x}=RE(),g=jc(),f=new o,b=["onCodePathStart","onCodePathEnd","onCodePathSegmentStart","onCodePathSegmentEnd","onCodePathSegmentLoop","onUnreachableCodePathSegmentStart","onUnreachableCodePathSegmentEnd"];function S(G){if(!G.tokens)throw new Error("AST is missing the tokens array.");if(!G.comments)throw new Error("AST is missing the comments array.");if(!G.loc)throw new Error("AST is missing location information.");if(!G.range)throw new Error("AST is missing range information")}function E(G){switch(G){case 3:return a.es3;case 5:return a.es5;default:return G<2015?a[`es${G+2009}`]:a[`es${G}`]}}function k(G){return G.type==="ExportDefaultDeclaration"||G.type==="ExportNamedDeclaration"||G.type==="ExportAllDeclaration"||G.type==="ExportSpecifier"}function D(G,U){const Q=[];let $=0,W=0;for(;$=U.length||$=U.range[0]||U.range[0]<=G.range[0]&&U.range[1]>=G.range[0]}function F(G,U,Q,$){if(R(U,Q))return!1;const[W,K]=U.range[1]<=Q.range[0]?[U,Q]:[Q,U],te=G.getLastToken(W)||W,V=G.getFirstToken(K)||K;let ae=te;for(;ae!==V;){const z=G.getTokenAfter(ae,{includeComments:!0});if(ae.range[1]!==z.range[0]||$&&z!==V&&z.type==="JSXText"&&/\s/u.test(z.value))return!0;ae=z}return!1}function P(G,U={},Q={}){for(const $ of new Set([...Object.keys(U),...Object.keys(Q)])){const W=U[$]===void 0?void 0:T(U[$]),te=Q[$]&&Q[$].value||W,V=Q[$]&&Q[$].comments;if(te==="off")continue;let ae=G.set.get($);ae||(ae=new g.Variable($,G),G.variables.push(ae),G.set.set($,ae)),ae.eslintImplicitGlobalSetting=W,ae.eslintExplicitGlobal=V!==void 0,ae.eslintExplicitGlobalComments=V,ae.writeable=te==="writable"}G.through=G.through.filter($=>{const W=$.identifier.name,K=G.set.get(W);return K?($.resolved=K,K.references.push($),!1):!0})}function N(G,U){Object.keys(U).forEach(Q=>{const $=G.set.get(Q);$&&($.eslintUsed=!0,$.eslintExported=!0)})}const I=Symbol("caches");class L extends s{constructor(Q,$){let W,K,te,V,ae,z;typeof Q=="string"?(W=Q,te=$,K=!1):typeof Q=="object"&&Q!==null&&(W=Q.text,te=Q.ast,K=Q.hasBOM,V=Q.parserServices,ae=Q.scopeManager,z=Q.visitorKeys),S(te);super(te.tokens,te.comments);An(this,j,void 0);this[I]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.isESTree=te.type==="Program";const ue=W.charCodeAt(0)===65279;this.hasBOM=ue||!!K,this.text=ue?W.slice(1):W,this.ast=te,this.parserServices=V||{},this.scopeManager=ae||null,this.visitorKeys=z||p.DEFAULT_VISITOR_KEYS;const ne=this.text.match(u.shebangPattern);ne&&te.comments.length&&te.comments[0].value===ne[1]&&(te.comments[0].type="Shebang"),this.tokensAndComments=D(te.tokens,te.comments),this.lines=[],this.lineStartIndices=[0];const pe=u.createGlobalLinebreakMatcher();let Be;for(;Be=pe.exec(this.text);)this.lines.push(this.text.slice(this.lineStartIndices.at(-1),Be.index)),this.lineStartIndices.push(Be.index+Be[0].length);this.lines.push(this.text.slice(this.lineStartIndices.at(-1))),Object.freeze(this),Object.freeze(this.lines)}static splitLines(Q){return Q.split(u.createGlobalLinebreakMatcher())}getText(Q,$,W){return Q?this.text.slice(Math.max(Q.range[0]-($||0),0),Q.range[1]+(W||0)):this.text}getLines(){return this.lines}getAllComments(){return this.ast.comments}getJSDocComment(Q){const $=K=>{const te=this.getTokenBefore(K,{includeComments:!0});return te&&c(te)&&te.type==="Block"&&te.value.charAt(0)==="*"&&K.loc.start.line-te.loc.end.line<=1?te:null};let W=Q.parent;switch(Q.type){case"ClassDeclaration":case"FunctionDeclaration":return $(k(W)?W:Q);case"ClassExpression":return $(W.parent);case"ArrowFunctionExpression":case"FunctionExpression":if(W.type!=="CallExpression"&&W.type!=="NewExpression"){for(;!this.getCommentsBefore(W).length&&!/Function/u.test(W.type)&&W.type!=="MethodDefinition"&&W.type!=="Property"&&(W=W.parent,!!W););if(W&&W.type!=="FunctionDeclaration"&&W.type!=="Program")return $(W)}return $(Q);default:return null}}getNodeByRangeIndex(Q){let $=null;return p.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(W){W.range[0]<=Q&&Qthis.text.length)throw new RangeError(`Index out of range (requested index ${Q}, but source text has length ${this.text.length}).`);if(Q===this.text.length)return{line:this.lines.length,column:this.lines.at(-1).length};const $=Q>=this.lineStartIndices.at(-1)?this.lineStartIndices.length:this.lineStartIndices.findIndex(W=>Qthis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${Q.line} requested, but only ${this.lineStartIndices.length} lines present).`);const $=this.lineStartIndices[Q.line-1],W=Q.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[Q.line],K=$+Q.column;if(Q.line===this.lineStartIndices.length&&K>W||Q.line=W)throw new RangeError(`Column number out of range (column ${Q.column} requested, but the length of line ${Q.line} is ${W-$}).`);return K}getScope(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=this[I].get("scopes"),W=$.get(Q);if(W)return W;const K=Q.type!=="Program";for(let te=Q;te;te=te.parent){const V=this.scopeManager.acquire(te,K);if(V)return V.type==="function-expression-name"?($.set(Q,V.childScopes[0]),V.childScopes[0]):($.set(Q,V),V)}return $.set(Q,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(Q){return this.scopeManager.getDeclaredVariables(Q)}getAncestors(Q){if(!Q)throw new TypeError("Missing required argument: node.");const $=[];for(let W=Q.parent;W;W=W.parent)$.push(W);return $.reverse()}getLoc(Q){return Q.loc}getRange(Q){return Q.range}markVariableAsUsed(Q,$=this.ast){const W=this.getScope($);let K=W;W.type==="global"&&W.childScopes.length>0&&W.childScopes[0].block===this.ast&&(K=W.childScopes[0]);for(let te=K;te;te=te.upper){const V=te.variables.find(ae=>ae.name===Q);if(V)return V.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let Q=this[I].get("configNodes");return Q||(Q=this.ast.comments.filter($=>{if($.type==="Shebang")return!1;const W=f.parseDirective($.value);return!W||!d.test(W.label)?!1:$.type!=="Line"||!!/^eslint-disable-(next-)?line$/u.test(W.label)}),this[I].set("configNodes",Q),Q)}getDisableDirectives(){const Q=this[I].get("disableDirectives");if(Q)return Q;const $=[],W=[];this.getInlineConfigNodes().forEach(te=>{const{label:V,value:ae,justification:z}=f.parseDirective(te.value),ue=/^eslint-disable-(next-)?line$/u.test(V);if(!(te.type==="Line"&&!ue)){if(V==="eslint-disable-line"&&te.loc.start.line!==te.loc.end.line){const ne=`${V} comment should not span multiple lines.`;$.push({ruleId:null,message:ne,loc:te.loc});return}switch(V){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const ne=V.slice(7);W.push(new x({type:ne,node:te,value:ae,justification:z}))}}}});const K={problems:$,directives:W};return this[I].set("disableDirectives",K),K}applyLanguageOptions(Q){const $=Object.assign(Object.create(null),E(Q.ecmaVersion),Q.sourceType==="commonjs"?a.commonjs:void 0,Q.globals);this[I].get("vars").set("configGlobals",$)}applyInlineConfig(){const Q=[],$=[],W={},K=Object.create(null);this.getInlineConfigNodes().forEach(V=>{const{label:ae,value:z}=f.parseDirective(V.value);switch(ae){case"exported":Object.assign(W,f.parseListConfig(z));break;case"globals":case"global":for(const[ue,ne]of Object.entries(f.parseStringConfig(z))){let ce;try{ce=T(ne)}catch(pe){Q.push({ruleId:null,loc:V.loc,message:pe.message});continue}K[ue]?(K[ue].comments.push(V),K[ue].value=ce):K[ue]={comments:[V],value:ce}}break;case"eslint":{const ue=f.parseJSONLikeConfig(z);ue.ok?$.push({config:{rules:ue.config},loc:V.loc}):Q.push({ruleId:null,loc:V.loc,message:ue.error.message});break}}});const te=this[I].get("vars");return te.set("inlineGlobals",K),te.set("exportedVariables",W),{configs:$,problems:Q}}finalize(){const Q=this[I].get("vars"),$=Q.get("configGlobals"),W=Q.get("inlineGlobals"),K=Q.get("exportedVariables"),te=this.scopeManager.scopes[0];P(te,$,W),K&&N(te,K)}traverse(){if(Cr(this,j))return Cr(this,j);const Q=Zi(this,j,[]),$=m();let W={enterNode(K){Q.push(new y({target:K,phase:1,args:[K,K.parent]}))},leaveNode(K){Q.push(new y({target:K,phase:2,args:[K,K.parent]}))},emitter:$};return this.isESTree&&(W=new v(W),b.forEach(K=>{$.on(K,(...te)=>{Q.push(new O({target:K,args:te}))})})),p.traverse(this.ast,{enter(K,te){K.parent=te,W.enterNode(K)},leave(K){W.leaveNode(K)},visitorKeys:this.visitorKeys}),Q}}return j=new WeakMap,Yp=L,Yp}var Hp,_E;function BE(){return _E||(_E=1,Hp={SourceCode:V$()}),Hp}var Kp,LE;function Zl(){return LE||(LE=1,Kp=c=>{if(typeof c!="string")throw new TypeError("Expected a string");return c.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Kp}var Jp,NE;function W$(){if(NE)return Jp;NE=1;const c=Zl(),{Legacy:{ConfigOps:s}}=d1();function u(y,O){return y.line-O.line||y.column-O.column}function p(y){const O=new Map;for(const x of y){const{unprocessedDirective:{parentDirective:g}}=x;O.has(g)?O.get(g).push(x):O.set(g,[x])}return[...O.values()]}function a(y,O,x){const g=O.value.trim(),f=x.text.indexOf(g,x.getRange(O.node)[0]);return y.map(b=>{const{ruleId:S}=b,k=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${c(S)}\k(?:\s*,\s*|$)`,"u").exec(g),D=k[0],T=f+k.index,R=T+D.length,F=D.indexOf(","),P=D.lastIndexOf(",");let N,I;return F!==P?(N=T+F,I=T+P):(N=T,I=R),{description:`'${S}'`,fix:{range:[N,I],text:""},unprocessedDirective:b.unprocessedDirective}})}function d(y,O,x){const g=x.getRange(O),f=y.filter(b=>b.ruleId).map(b=>`'${b.ruleId}'`);return{description:f.length<=2?f.join(" or "):`${f.slice(0,f.length-1).join(", ")}, or ${f.at(-1)}`,fix:{range:g,text:" "},unprocessedDirective:y[0].unprocessedDirective}}function v(y,O){return p(y).flatMap(g=>{const{parentDirective:f}=g[0].unprocessedDirective,b=new Set(f.ruleIds);for(const S of g)b.delete(S.ruleId);return b.size?a(g,f,O):[d(g,f.node,O)]})}function m(y){const O=new Map,x=new Set;for(let g=y.length-1;g>=0;g--){const f=y[g];if(f.type==="disable"){if(O.size===0)continue;if(f.ruleId===null){for(const b of O.values())x.add(b);O.clear()}else{const b=O.get(f.ruleId);if(b)x.add(b);else{const S=O.get(null);S&&x.add(S)}}}else f.type==="enable"&&(f.ruleId===null?(O.clear(),O.set(null,f)):O.set(f.ruleId,f))}return x}function o(y){const O=[],x=new Set,{sourceCode:g}=y;for(const T of y.problems){let R=[],F=0;for(;F0){const P=R.map(N=>({kind:"directive",justification:N.unprocessedDirective.justification}));T.suppressions?T.suppressions=T.suppressions.concat(P):(T.suppressions=P,x.add(R.at(-1)))}O.push(T)}const f=y.directives.filter(T=>T.type==="disable"&&!x.has(T)&&!y.rulesToIgnore.has(T.ruleId)),b=new Set(y.directives.filter(T=>T.unprocessedDirective.type==="enable"&&!y.rulesToIgnore.has(T.ruleId)));if(b.size>0)for(const T of m(y.directives))b.delete(T);const S=v(f,g).concat(v(b,g)),E=y.language.columnStart===1?0:1,k=y.language.lineStart===1?0:1,D=S.map(({description:T,fix:R,unprocessedDirective:F})=>{const{parentDirective:P,type:N,line:I,column:L}=F;let j;N==="enable"?j=T?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${T}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":j=T?`Unused eslint-disable directive (no problems were reported from ${T}).`:"Unused eslint-disable directive (no problems were reported).";const G=g.getLoc(P.node);return{ruleId:null,message:j,line:N==="disable-next-line"?G.start.line+k:I,column:N==="disable-next-line"?G.start.column+E:L,severity:y.reportUnusedDisableDirectives==="warn"?1:2,nodeType:null,...y.disableFixes?{}:{fix:R}}});return{problems:O,unusedDirectives:D}}return Jp=({language:y,sourceCode:O,directives:x,disableFixes:g,problems:f,configuredRules:b,ruleFilter:S,reportUnusedDisableDirectives:E="off"})=>{const k=x.filter(P=>P.type==="disable"||P.type==="enable").map(P=>Object.assign({},P,{unprocessedDirective:P})).sort(u),D=x.flatMap(P=>{switch(P.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:P.line,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+1,column:0,ruleId:P.ruleId,unprocessedDirective:P}];case"disable-next-line":return[{type:"disable",line:P.line+1,column:1,ruleId:P.ruleId,unprocessedDirective:P},{type:"enable",line:P.line+2,column:0,ruleId:P.ruleId,unprocessedDirective:P}];default:throw new TypeError(`Unrecognized directive type '${P.type}'`)}}).sort(u),T=b&&S?new Set(Object.keys(b).filter(P=>{const N=s.getRuleSeverity(b[P]);return N===0?!1:!S({severity:N,ruleId:P})})):new Set;T.size>0&&T.add(null);const R=o({language:y,sourceCode:O,problems:f,directives:k,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T}),F=o({language:y,sourceCode:O,problems:R.problems,directives:D,disableFixes:g,reportUnusedDisableDirectives:E,rulesToIgnore:T});return E!=="off"?F.problems.concat(R.unusedDirectives).concat(F.unusedDirectives).sort(u):F.problems},Jp}function vo(c){return(vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(c)}function eh(c,s){return function(u){if(Array.isArray(u))return u}(c)||function(u,p){var a=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(a!=null){var d,v,m,o,y=[],O=!0,x=!1;try{if(m=(a=a.call(u)).next,p!==0)for(;!(O=(d=m.call(a)).done)&&(y.push(d.value),y.length!==p);O=!0);}catch(g){x=!0,v=g}finally{try{if(!O&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(x)throw v}}return y}}(c,s)||ME(c,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function G$(c){return function(s){if(Array.isArray(s))return th(s)}(c)||function(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}(c)||ME(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ME(c,s){if(c){if(typeof c=="string")return th(c,s);var u=Object.prototype.toString.call(c).slice(8,-1);return u==="Object"&&c.constructor&&(u=c.constructor.name),u==="Map"||u==="Set"?Array.from(c):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?th(c,s):void 0}}function th(c,s){(s==null||s>c.length)&&(s=c.length);for(var u=0,p=new Array(s);u=0;--F)if(T[F].node===R)return!0;return!1}function k(T,R){return new f().traverse(T,R)}function D(T,R){var F;return F=function(P,N){var I,L,j,G;for(L=P.length,j=0;L;)N(P[G=j+(I=L>>>1)])?L=I:(j=G+1,L-=I+1);return j}(R,function(P){return P.range[0]>T.range[0]}),T.extendedRange=[T.range[0],T.range[1]],F!==R.length&&(T.extendedRange[1]=R[F].range[0]),(F-=1)>=0&&(T.extendedRange[0]=R[F].range[1]),T}return a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},v={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={Break:m={},Skip:o={},Remove:y={}},x.prototype.replace=function(T){this.parent[this.key]=T},x.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var T,R,F,P,N;function I(L,j){if(Array.isArray(j))for(F=0,P=j.length;F=0;)if(W=I[G=$[U]]){if(Array.isArray(W)){for(Q=W.length;(Q-=1)>=0;)if(W[Q]&&!E(P,W[Q])){if(S(L,$[U]))N=new g(W[Q],[G,Q],"Property",null);else{if(!b(W[Q]))continue;N=new g(W[Q],[G,Q],null,null)}F.push(N)}}else if(b(W)){if(E(P,W))continue;F.push(new g(W,G,null,null))}}}}else if(N=P.pop(),j=this.__execute(R.leave,N),this.__state===m||j===m)return},f.prototype.replace=function(T,R){var F,P,N,I,L,j,G,U,Q,$,W,K,te;function V(ae){var z,ue,ne,ce;if(ae.ref.remove()){for(ue=ae.ref.key,ce=ae.ref.parent,z=F.length;z--;)if((ne=F[z]).ref&&ne.ref.parent===ce){if(ne.ref.key=0;)if($=N[te=Q[G]])if(Array.isArray($)){for(U=$.length;(U-=1)>=0;)if($[U]){if(S(I,Q[G]))j=new g($[U],[te,U],"Property",new x($,U));else{if(!b($[U]))continue;j=new g($[U],[te,U],null,new x($,U))}F.push(j)}}else b($)&&F.push(new g($,te,null,new x(N,te)))}}else if(j=P.pop(),(L=this.__execute(R.leave,j))!==void 0&&L!==m&&L!==o&&L!==y&&j.ref.replace(L),this.__state!==y&&L!==y||V(j),this.__state===m||L===m)return K.root;return K.root},p.Syntax=a,p.traverse=k,p.replace=function(T,R){return new f().replace(T,R)},p.attachComments=function(T,R,F){var P,N,I,L,j=[];if(!T.range)throw new Error("attachComments needs range information");if(!F.length){if(R.length){for(I=0,N=R.length;IG.range[0]);)U.extendedRange[1]===G.range[0]?(G.leadingComments||(G.leadingComments=[]),G.leadingComments.push(U),j.splice(L,1)):L+=1;return L===j.length?d.Break:j[L].extendedRange[0]>G.range[1]?d.Skip:void 0}}),L=0,k(T,{leave:function(G){for(var U;LG.range[1]?d.Skip:void 0}}),T},p.VisitorKeys=v,p.VisitorOption=d,p.Controller=f,p.cloneEnvironment=function(){return u({})},p})(s)}),z$=$E(function(c){c.exports&&(c.exports=function(){function s(u,p,a,d){this.message=u,this.expected=p,this.found=a,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}return function(u,p){function a(){this.constructor=u}a.prototype=p.prototype,u.prototype=new a}(s,Error),s.buildMessage=function(u,p){var a={literal:function(o){return'"'+v(o.text)+'"'},class:function(o){var y,O="";for(y=0;y0){for(y=1,O=1;y<~+.]/,f=hr([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),b=Zt(">",!1),S=Zt("~",!1),E=Zt("+",!1),k=Zt(",",!1),D=Zt("!",!1),T=Zt("*",!1),R=Zt("#",!1),F=Zt("[",!1),P=Zt("]",!1),N=/^[>","<","!"],!1,!1),L=Zt("=",!1),j=function(ee){return(ee||"")+"="},G=/^[><]/,U=hr([">","<"],!1,!1),Q=Zt(".",!1),$=function(ee,be,Ee){return{type:"attribute",name:ee,operator:be,value:Ee}},W=Zt('"',!1),K=/^[^\\"]/,te=hr(["\\",'"'],!0,!1),V=Zt("\\",!1),ae={type:"any"},z=function(ee,be){return ee+be},ue=function(ee){return{type:"literal",value:(be=ee.join(""),be.replace(/\\(.)/g,function(Ee,ve){switch(ve){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return" ";case"v":return"\v";default:return ve}}))};var be},ne=Zt("'",!1),ce=/^[^\\']/,pe=hr(["\\","'"],!0,!1),Be=/^[0-9]/,oe=hr([["0","9"]],!1,!1),Z=Zt("type(",!1),ge=/^[^ )]/,Re=hr([" ",")"],!0,!1),Se=Zt(")",!1),we=/^[imsu]/,Me=hr(["i","m","s","u"],!1,!1),it=Zt("/",!1),pt=/^[^\/]/,kt=hr(["/"],!0,!1),qt=Zt(":not(",!1),Ut=Zt(":matches(",!1),tr=Zt(":has(",!1),fe=Zt(":first-child",!1),Ve=Zt(":last-child",!1),mt=Zt(":nth-child(",!1),Pt=Zt(":nth-last-child(",!1),Bt=Zt(":",!1),se=0,Kt=[{line:1,column:1}],Vt=0,ir=[],Ot={};if("startRule"in p){if(!(p.startRule in y))throw new Error(`Can't start parsing from rule "`+p.startRule+'".');O=y[p.startRule]}function Zt(ee,be){return{type:"literal",text:ee,ignoreCase:be}}function hr(ee,be,Ee){return{type:"class",parts:ee,inverted:be,ignoreCase:Ee}}function Dt(ee){var be,Ee=Kt[ee];if(Ee)return Ee;for(be=ee-1;!Kt[be];)be--;for(Ee={line:(Ee=Kt[be]).line,column:Ee.column};beVt&&(Vt=se,ir=[]),ir.push(ee))}function Ie(){var ee,be,Ee,ve,Ne=30*se+0,Ke=Ot[Ne];return Ke?(se=Ke.nextPos,Ke.result):(ee=se,(be=ke())!==o&&(Ee=lt())!==o&&ke()!==o?ee=be=(ve=Ee).length===1?ve[0]:{type:"matches",selectors:ve}:(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o&&(be=void 0),ee=be),Ot[Ne]={nextPos:se,result:ee},ee)}function ke(){var ee,be,Ee=30*se+1,ve=Ot[Ee];if(ve)return se=ve.nextPos,ve.result;for(ee=[],u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));be!==o;)ee.push(be),u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x));return Ot[Ee]={nextPos:se,result:ee},ee}function Te(){var ee,be,Ee,ve=30*se+2,Ne=Ot[ve];if(Ne)return se=Ne.nextPos,Ne.result;if(be=[],g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f)),Ee!==o)for(;Ee!==o;)be.push(Ee),g.test(u.charAt(se))?(Ee=u.charAt(se),se++):(Ee=o,Et(f));else be=o;return be!==o&&(be=be.join("")),ee=be,Ot[ve]={nextPos:se,result:ee},ee}function Ue(){var ee,be,Ee,ve=30*se+3,Ne=Ot[ve];return Ne?(se=Ne.nextPos,Ne.result):(ee=se,(be=ke())!==o?(u.charCodeAt(se)===62?(Ee=">",se++):(Ee=o,Et(b)),Ee!==o&&ke()!==o?ee=be="child":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===126?(Ee="~",se++):(Ee=o,Et(S)),Ee!==o&&ke()!==o?ee=be="sibling":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,(be=ke())!==o?(u.charCodeAt(se)===43?(Ee="+",se++):(Ee=o,Et(E)),Ee!==o&&ke()!==o?ee=be="adjacent":(se=ee,ee=o)):(se=ee,ee=o),ee===o&&(ee=se,u.charCodeAt(se)===32?(be=" ",se++):(be=o,Et(x)),be!==o&&(Ee=ke())!==o?ee=be="descendant":(se=ee,ee=o)))),Ot[ve]={nextPos:se,result:ee},ee)}function lt(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+4,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Oe())!==o){for(Ee=[],ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=ke())!==o?(u.charCodeAt(se)===44?(Ke=",",se++):(Ke=o,Et(k)),Ke!==o&&(at=ke())!==o&&(dt=Oe())!==o?ve=Ne=[Ne,Ke,at,dt]:(se=ve,ve=o)):(se=ve,ve=o);Ee!==o?ee=be=[be].concat(Ee.map(function(xe){return xe[3]})):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Oe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+5,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,(be=Pe())!==o){for(Ee=[],ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,(Ne=Ue())!==o&&(Ke=Pe())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,ee=be=Ee.reduce(function(Ce,xe){return{type:xe[0],left:Ce,right:xe[1]}},at)):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function Pe(){var ee,be,Ee,ve,Ne,Ke,at,dt=30*se+6,ht=Ot[dt];if(ht)return se=ht.nextPos,ht.result;if(ee=se,u.charCodeAt(se)===33?(be="!",se++):(be=o,Et(D)),be===o&&(be=null),be!==o){if(Ee=[],(ve=de())!==o)for(;ve!==o;)Ee.push(ve),ve=de();else Ee=o;Ee!==o?(Ne=be,at=(Ke=Ee).length===1?Ke[0]:{type:"compound",selectors:Ke},Ne&&(at.subject=!0),ee=be=at):(se=ee,ee=o)}else se=ee,ee=o;return Ot[dt]={nextPos:se,result:ee},ee}function de(){var ee,be=30*se+7,Ee=Ot[be];return Ee?(se=Ee.nextPos,Ee.result):((ee=function(){var ve,Ne,Ke=30*se+8,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.charCodeAt(se)===42?(Ne="*",se++):(Ne=o,Et(T)),Ne!==o&&(Ne={type:"wildcard",value:Ne}),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+9,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===35?(Ne="#",se++):(Ne=o,Et(R)),Ne===o&&(Ne=null),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"identifier",value:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+10,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.charCodeAt(se)===91?(Ne="[",se++):(Ne=o,Et(F)),Ne!==o&&ke()!==o&&(Ke=function(){var Ce,xe,je,ze,Ge=30*se+14,ut=Ot[Ge];return ut?(se=ut.nextPos,ut.result):(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+12,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,u.charCodeAt(se)===33?(et="!",se++):(et=o,Et(D)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt=30*se+18,Wt=Ot[jt];if(Wt)return se=Wt.nextPos,Wt.result;if(qe=se,u.substr(se,5)==="type("?(et="type(",se+=5):(et=o,Et(Z)),et!==o)if(ke()!==o){if(bt=[],ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re)),rt!==o)for(;rt!==o;)bt.push(rt),ge.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(Re));else bt=o;bt!==o&&(rt=ke())!==o?(u.charCodeAt(se)===41?(St=")",se++):(St=o,Et(Se)),St!==o?(et={type:"type",value:bt.join("")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;else se=qe,qe=o;return Ot[jt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+20,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===47?(et="/",se++):(et=o,Et(it)),et!==o){if(bt=[],pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt)),rt!==o)for(;rt!==o;)bt.push(rt),pt.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(kt));else bt=o;bt!==o?(u.charCodeAt(se)===47?(rt="/",se++):(rt=o,Et(it)),rt!==o?((St=function(){var rr,ar,nr=30*se+19,Lr=Ot[nr];if(Lr)return se=Lr.nextPos,Lr.result;if(rr=[],we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me)),ar!==o)for(;ar!==o;)rr.push(ar),we.test(u.charAt(se))?(ar=u.charAt(se),se++):(ar=o,Et(Me));else rr=o;return Ot[nr]={nextPos:se,result:rr},rr}())===o&&(St=null),St!==o?(jt=St,et={type:"regexp",value:new RegExp(bt.join(""),jt?jt.join(""):"")},qe=et):(se=qe,qe=o)):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&ke()!==o&&(je=function(){var qe,et,bt,rt=30*se+11,St=Ot[rt];return St?(se=St.nextPos,St.result):(qe=se,N.test(u.charAt(se))?(et=u.charAt(se),se++):(et=o,Et(I)),et===o&&(et=null),et!==o?(u.charCodeAt(se)===61?(bt="=",se++):(bt=o,Et(L)),bt!==o?(et=j(et),qe=et):(se=qe,qe=o)):(se=qe,qe=o),qe===o&&(G.test(u.charAt(se))?(qe=u.charAt(se),se++):(qe=o,Et(U))),Ot[rt]={nextPos:se,result:qe},qe)}())!==o&&ke()!==o?((ze=function(){var qe,et,bt,rt,St,jt,Wt=30*se+15,Lt=Ot[Wt];if(Lt)return se=Lt.nextPos,Lt.result;if(qe=se,u.charCodeAt(se)===34?(et='"',se++):(et=o,Et(W)),et!==o){for(bt=[],K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),K.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(te)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===34?(rt='"',se++):(rt=o,Et(W)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;if(qe===o)if(qe=se,u.charCodeAt(se)===39?(et="'",se++):(et=o,Et(ne)),et!==o){for(bt=[],ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));rt!==o;)bt.push(rt),ce.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(pe)),rt===o&&(rt=se,u.charCodeAt(se)===92?(St="\\",se++):(St=o,Et(V)),St!==o?(u.length>se?(jt=u.charAt(se),se++):(jt=o,Et(ae)),jt!==o?(St=z(St,jt),rt=St):(se=rt,rt=o)):(se=rt,rt=o));bt!==o?(u.charCodeAt(se)===39?(rt="'",se++):(rt=o,Et(ne)),rt!==o?(et=ue(bt),qe=et):(se=qe,qe=o)):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Wt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt,rt,St,jt,Wt,Lt=30*se+16,rr=Ot[Lt];if(rr)return se=rr.nextPos,rr.result;for(qe=se,et=se,bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));if(bt!==o?(u.charCodeAt(se)===46?(rt=".",se++):(rt=o,Et(Q)),rt!==o?et=bt=[bt,rt]:(se=et,et=o)):(se=et,et=o),et===o&&(et=null),et!==o){if(bt=[],Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe)),rt!==o)for(;rt!==o;)bt.push(rt),Be.test(u.charAt(se))?(rt=u.charAt(se),se++):(rt=o,Et(oe));else bt=o;bt!==o?(jt=bt,Wt=(St=et)?[].concat.apply([],St).join(""):"",et={type:"literal",value:parseFloat(Wt+jt.join(""))},qe=et):(se=qe,qe=o)}else se=qe,qe=o;return Ot[Lt]={nextPos:se,result:qe},qe}())===o&&(ze=function(){var qe,et,bt=30*se+17,rt=Ot[bt];return rt?(se=rt.nextPos,rt.result):((et=Te())!==o&&(et={type:"literal",value:et}),qe=et,Ot[bt]={nextPos:se,result:qe},qe)}()),ze!==o?(xe=$(xe,je,ze),Ce=xe):(se=Ce,Ce=o)):(se=Ce,Ce=o),Ce===o&&(Ce=se,(xe=ye())!==o&&(xe={type:"attribute",name:xe}),Ce=xe)),Ot[Ge]={nextPos:se,result:Ce},Ce)}())!==o&&ke()!==o?(u.charCodeAt(se)===93?(at="]",se++):(at=o,Et(P)),at!==o?ve=Ne=Ke:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht,Ce,xe,je=30*se+21,ze=Ot[je];if(ze)return se=ze.nextPos,ze.result;if(ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o)if((Ke=Te())!==o){for(at=[],dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);dt!==o;)at.push(dt),dt=se,u.charCodeAt(se)===46?(ht=".",se++):(ht=o,Et(Q)),ht!==o&&(Ce=Te())!==o?dt=ht=[ht,Ce]:(se=dt,dt=o);at!==o?(xe=Ke,Ne={type:"field",name:at.reduce(function(Ge,ut){return Ge+ut[0]+ut[1]},xe)},ve=Ne):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[je]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+22,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":not("?(Ne=":not(",se+=5):(Ne=o,Et(qt)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"not",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+23,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,9)===":matches("?(Ne=":matches(",se+=9):(Ne=o,Et(Ut)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"matches",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt=30*se+24,ht=Ot[dt];return ht?(se=ht.nextPos,ht.result):(ve=se,u.substr(se,5)===":has("?(Ne=":has(",se+=5):(Ne=o,Et(tr)),Ne!==o&&ke()!==o&&(Ke=lt())!==o&&ke()!==o?(u.charCodeAt(se)===41?(at=")",se++):(at=o,Et(Se)),at!==o?ve=Ne={type:"has",selectors:Ke}:(se=ve,ve=o)):(se=ve,ve=o),Ot[dt]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+25,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,12)===":first-child"?(Ne=":first-child",se+=12):(Ne=o,Et(fe)),Ne!==o&&(Ne=Le(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke=30*se+26,at=Ot[Ke];return at?(se=at.nextPos,at.result):(u.substr(se,11)===":last-child"?(Ne=":last-child",se+=11):(Ne=o,Et(Ve)),Ne!==o&&(Ne=X(1)),ve=Ne,Ot[Ke]={nextPos:se,result:ve},ve)}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+27,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,11)===":nth-child("?(Ne=":nth-child(",se+=11):(Ne=o,Et(mt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=Le(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at,dt,ht=30*se+28,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ve=se,u.substr(se,16)===":nth-last-child("?(Ne=":nth-last-child(",se+=16):(Ne=o,Et(Pt)),Ne!==o)if(ke()!==o){if(Ke=[],Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe)),at!==o)for(;at!==o;)Ke.push(at),Be.test(u.charAt(se))?(at=u.charAt(se),se++):(at=o,Et(oe));else Ke=o;Ke!==o&&(at=ke())!==o?(u.charCodeAt(se)===41?(dt=")",se++):(dt=o,Et(Se)),dt!==o?(Ne=X(parseInt(Ke.join(""),10)),ve=Ne):(se=ve,ve=o)):(se=ve,ve=o)}else se=ve,ve=o;else se=ve,ve=o;return Ot[ht]={nextPos:se,result:ve},ve}())===o&&(ee=function(){var ve,Ne,Ke,at=30*se+29,dt=Ot[at];return dt?(se=dt.nextPos,dt.result):(ve=se,u.charCodeAt(se)===58?(Ne=":",se++):(Ne=o,Et(Bt)),Ne!==o&&(Ke=Te())!==o?ve=Ne={type:"class",name:Ke}:(se=ve,ve=o),Ot[at]={nextPos:se,result:ve},ve)}()),Ot[be]={nextPos:se,result:ee},ee)}function ye(){var ee,be,Ee,ve,Ne,Ke,at,dt,ht=30*se+13,Ce=Ot[ht];if(Ce)return se=Ce.nextPos,Ce.result;if(ee=se,(be=Te())!==o){for(Ee=[],ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);ve!==o;)Ee.push(ve),ve=se,u.charCodeAt(se)===46?(Ne=".",se++):(Ne=o,Et(Q)),Ne!==o&&(Ke=Te())!==o?ve=Ne=[Ne,Ke]:(se=ve,ve=o);Ee!==o?(at=be,dt=Ee,ee=be=[].concat.apply([at],dt).join("")):(se=ee,ee=o)}else se=ee,ee=o;return Ot[ht]={nextPos:se,result:ee},ee}function Le(ee){return{type:"nth-child",index:{type:"literal",value:ee}}}function X(ee){return{type:"nth-last-child",index:{type:"literal",value:ee}}}if((a=O())!==o&&se===u.length)return a;throw a!==o&&se0&&o(P,N,I))&&m(N[0],N.slice(1),I)};case"descendant":var y=an(c.left),O=an(c.right);return function(P,N,I){if(O(P,N,I)){for(var L=0,j=N.length;L":return function(P){return ls(P,x)>c.value.value};case">=":return function(P){return ls(P,x)>=c.value.value}}throw new Error("Unknown operator: ".concat(c.operator));case"sibling":var b=an(c.left),S=an(c.right);return function(P,N,I){return S(P,N,I)&&qE(P,b,N,"LEFT_SIDE",I)||c.left.subject&&b(P,N,I)&&qE(P,S,N,"RIGHT_SIDE",I)};case"adjacent":var E=an(c.left),k=an(c.right);return function(P,N,I){return k(P,N,I)&&QE(P,E,N,"LEFT_SIDE",I)||c.right.subject&&E(P,N,I)&&QE(P,k,N,"RIGHT_SIDE",I)};case"nth-child":var D=c.index.value,T=an(c.right);return function(P,N,I){return T(P,N,I)&&UE(P,N,D,I)};case"nth-last-child":var R=-c.index.value,F=an(c.right);return function(P,N,I){return F(P,N,I)&&UE(P,N,R,I)};case"class":return function(P,N,I){if(I&&I.matchClass)return I.matchClass(c.name,P,N);if(I&&I.nodeTypeKey)return!1;switch(c.name.toLowerCase()){case"statement":if(P.type.slice(-9)==="Statement")return!0;case"declaration":return P.type.slice(-11)==="Declaration";case"pattern":if(P.type.slice(-7)==="Pattern")return!0;case"expression":return P.type.slice(-10)==="Expression"||P.type.slice(-7)==="Literal"||P.type==="Identifier"&&(N.length===0||N[0].type!=="MetaProperty")||P.type==="MetaProperty";case"function":return P.type==="FunctionDeclaration"||P.type==="FunctionExpression"||P.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: ".concat(c.name))}}throw new Error("Unknown selector type: ".concat(c.type))}function nh(c,s){var u=s&&s.nodeTypeKey||"type",p=c[u];return s&&s.visitorKeys&&s.visitorKeys[p]?s.visitorKeys[p]:Xl.VisitorKeys[p]?Xl.VisitorKeys[p]:s&&typeof s.fallback=="function"?s.fallback(c):Object.keys(c).filter(function(a){return a!==u})}function sh(c,s){var u=s&&s.nodeTypeKey||"type";return c!==null&&vo(c)==="object"&&typeof c[u]=="string"}function qE(c,s,u,p,a){var d=eh(u,1)[0];if(!d)return!1;for(var v=nh(d,a),m=0;m0&&sh(o[y-1],a)&&s(o[y-1],u,a)||p==="RIGHT_SIDE"&&y=0&&of.includes(b));return g}function p(x){switch(x.type){case"identifier":return[x.value];case"matches":{const g=x.selectors.map(p);return g.every(Boolean)?s(...g):null}case"compound":{const g=x.selectors.map(p).filter(f=>f);return g.length?u(...g):null}case"child":case"descendant":case"sibling":case"adjacent":return p(x.right);case"class":return x.name==="function"?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function a(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return a(x.left)+a(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+a(f),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function d(x){switch(x.type){case"child":case"descendant":case"sibling":case"adjacent":return d(x.left)+d(x.right);case"compound":case"not":case"matches":return x.selectors.reduce((g,f)=>g+d(f),0);case"identifier":return 1;default:return 0}}function v(x,g){return x.attributeCount-g.attributeCount||x.identifierCount-g.identifierCount||(x.rawSelector<=g.rawSelector?-1:1)}function m(x){try{return c.parse(x.replace(/:exit$/u,""))}catch(g){throw g.location&&g.location.start&&typeof g.location.start.offset=="number"?new SyntaxError(`Syntax error in selector "${x}" at position ${g.location.start.offset}: ${g.message}`):g}}const o=new Map;function y(x){if(o.has(x))return o.get(x);const g=m(x),f={rawSelector:x,isExit:x.endsWith(":exit"),parsedSelector:g,listenerTypes:p(g),attributeCount:a(g),identifierCount:d(g)};return o.set(x,f),f}class O{constructor(g,f){this.emitter=g,this.esqueryOptions=f,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],g.eventNames().forEach(b=>{const S=y(b);if(S.listenerTypes){const k=S.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;S.listenerTypes.forEach(D=>{k.has(D)||k.set(D,[]),k.get(D).push(S)});return}(S.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(S)}),this.anyTypeEnterSelectors.sort(v),this.anyTypeExitSelectors.sort(v),this.enterSelectorsByNodeType.forEach(b=>b.sort(v)),this.exitSelectorsByNodeType.forEach(b=>b.sort(v))}applySelector(g,f){c.matches(g,f.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(f.rawSelector,g)}applySelectors(g,f){const b=(f?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(g.type)||[],S=f?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let E=0,k=0;for(;E=b.length||k{const m=v.trim();return m in p?p[m]:d})}return oh={getPlaceholderMatcher:c,interpolate:s},oh}var lh,YE;function H$(){if(YE)return lh;YE=1;const c=Gl,{RuleFixer:s}=X$(),{interpolate:u}=Y$();function p(...b){return b.length===1?Object.assign({},b[0]):typeof b[1]=="string"?{node:b[0],message:b[1],data:b[2],fix:b[3]}:{node:b[0],loc:b[1],message:b[2],data:b[3],fix:b[4]}}function a(b){b.node?c(typeof b.node=="object","Node must be an object"):c(b.loc,"Node must be provided when reporting error if location is not provided")}function d(b){return b.loc.start?b.loc:{start:b.loc,end:null}}function v(b){return b?{range:[b.range[0],b.range[1]],text:b.text}:null}function m(b){b&&c(b.range&&typeof b.range[0]=="number"&&typeof b.range[1]=="number",`Fix has invalid range: ${JSON.stringify(b,null,2)}`)}function o(b,S){return b.range[0]-S.range[0]||b.range[1]-S.range[1]}function y(b,S){for(const F of b)m(F);if(b.length===0)return null;if(b.length===1)return v(b[0]);b.sort(o);const E=S.text,k=b[0].range[0],D=b.at(-1).range[1];let T="",R=Number.MIN_SAFE_INTEGER;for(const F of b)c(F.range[0]>=R,"Fix objects must not be overlapped in a report."),F.range[0]>=0&&(T+=E.slice(Math.max(0,k,R),F.range[0])),T+=F.text,R=F.range[1];return T+=E.slice(Math.max(0,k,R),D),{range:[k,D],text:T}}function O(b,S){if(typeof b.fix!="function")return null;const E=new s({sourceCode:S}),k=b.fix(E);return k&&Symbol.iterator in k?y(Array.from(k),S):(m(k),v(k))}function x(b,S,E){return!b.suggest||!Array.isArray(b.suggest)?[]:b.suggest.map(k=>{const D=k.desc||E[k.messageId];return{...k,desc:u(D,k.data),fix:O(k,S)}}).filter(({fix:k})=>k)}function g(b){const{language:S}=b,E=S.columnStart===1?0:1,k=S.lineStart===1?0:1,D={ruleId:b.ruleId,severity:b.severity,message:b.message,line:b.loc.start.line+k,column:b.loc.start.column+E,nodeType:b.node&&b.node.type||null};return b.messageId&&(D.messageId=b.messageId),b.loc.end&&(D.endLine=b.loc.end.line+k,D.endColumn=b.loc.end.column+E),b.fix&&(D.fix=b.fix),b.suggestions&&b.suggestions.length>0&&(D.suggestions=b.suggestions),D}function f(b,S){b&&Array.isArray(b)&&b.forEach(E=>{if(E.messageId){const{messageId:k}=E;if(!S)throw new TypeError(`context.report() called with a suggest option with a messageId '${k}', but no messages were present in the rule metadata.`);if(!S[k])throw new TypeError(`context.report() called with a suggest option with a messageId '${k}' which is not present in the 'messages' config: ${JSON.stringify(S,null,2)}`);if(E.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!E.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if(typeof E.fix!="function")throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${E}`)})}return lh=function(S){return(...E)=>{const k=p(...E),D=S.messageIds,{sourceCode:T}=S;a(k);let R;if(k.messageId){if(!D)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const F=k.messageId;if(k.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!D||!Object.hasOwn(D,F))throw new TypeError(`context.report() called with a messageId of '${F}' which is not present in the 'messages' config: ${JSON.stringify(D,null,2)}`);R=D[F]}else if(k.message)R=k.message;else throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");return f(k.suggest,D),g({ruleId:S.ruleId,severity:S.severity,node:k.node,message:u(R,k.data),messageId:k.messageId,loc:k.loc?d(k):T.getLoc(k.node),fix:S.disableFixes?null:O(k,T),suggestions:S.disableFixes?[]:x(k,T,D),language:S.language})}},lh}function K$(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uh,HE;function J$(){if(HE)return uh;HE=1;const c=qi()("eslint:rules");class s extends Map{constructor(p){let a=p.length;super(c.enabled?p.map(([d,v])=>{let m=null;return[d,()=>(m||(c("Loading rule %o (remaining=%d)",d,--a),m=v()),m)]}):p),Object.defineProperty(s.prototype,"set",{configurable:!0,value:void 0})}get(p){const a=super.get(p);return a&&a()}*values(){for(const p of super.values())yield p()}*entries(){for(const[p,a]of super.entries())yield[p,a()]}forEach(p,a){for(const[d,v]of super.entries())p.call(a,v(),d,this)}}return Object.defineProperties(s.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:s.prototype.entries}}),uh={LazyLoadingRuleMap:s},uh}var ch={exports:{}},xo={},fh={exports:{}},KE;function e3(){return KE||(KE=1,function(){function c(v){if(v==null)return!1;switch(v.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function s(v){if(v==null)return!1;switch(v.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function u(v){if(v==null)return!1;switch(v.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function p(v){return u(v)||v!=null&&v.type==="FunctionDeclaration"}function a(v){switch(v.type){case"IfStatement":return v.alternate!=null?v.alternate:v.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return v.body}return null}function d(v){var m;if(v.type!=="IfStatement"||v.alternate==null)return!1;m=v.consequent;do{if(m.type==="IfStatement"&&m.alternate==null)return!0;m=a(m)}while(m);return!1}fh.exports={isExpression:c,isStatement:u,isIterationStatement:s,isSourceElement:p,isProblematicIfStatement:d,trailingStatement:a}}()),fh.exports}var ph={exports:{}},JE;function eC(){return JE||(JE=1,function(){var c,s,u,p,a,d;s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function v(E){return 48<=E&&E<=57}function m(E){return 48<=E&&E<=57||97<=E&&E<=102||65<=E&&E<=70}function o(E){return E>=48&&E<=55}u=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(E){return E===32||E===9||E===11||E===12||E===160||E>=5760&&u.indexOf(E)>=0}function O(E){return E===10||E===13||E===8232||E===8233}function x(E){if(E<=65535)return String.fromCharCode(E);var k=String.fromCharCode(Math.floor((E-65536)/1024)+55296),D=String.fromCharCode((E-65536)%1024+56320);return k+D}for(p=new Array(128),d=0;d<128;++d)p[d]=d>=97&&d<=122||d>=65&&d<=90||d===36||d===95;for(a=new Array(128),d=0;d<128;++d)a[d]=d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===36||d===95;function g(E){return E<128?p[E]:s.NonAsciiIdentifierStart.test(x(E))}function f(E){return E<128?a[E]:s.NonAsciiIdentifierPart.test(x(E))}function b(E){return E<128?p[E]:c.NonAsciiIdentifierStart.test(x(E))}function S(E){return E<128?a[E]:c.NonAsciiIdentifierPart.test(x(E))}ph.exports={isDecimalDigit:v,isHexDigit:m,isOctalDigit:o,isWhiteSpace:y,isLineTerminator:O,isIdentifierStartES5:g,isIdentifierPartES5:f,isIdentifierStartES6:b,isIdentifierPartES6:S}}()),ph.exports}var hh={exports:{}},tC;function t3(){return tC||(tC=1,function(){var c=eC();function s(g){switch(g){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function u(g,f){return!f&&g==="yield"?!1:p(g,f)}function p(g,f){if(f&&s(g))return!0;switch(g.length){case 2:return g==="if"||g==="in"||g==="do";case 3:return g==="var"||g==="for"||g==="new"||g==="try";case 4:return g==="this"||g==="else"||g==="case"||g==="void"||g==="with"||g==="enum";case 5:return g==="while"||g==="break"||g==="catch"||g==="throw"||g==="const"||g==="yield"||g==="class"||g==="super";case 6:return g==="return"||g==="typeof"||g==="delete"||g==="switch"||g==="export"||g==="import";case 7:return g==="default"||g==="finally"||g==="extends";case 8:return g==="function"||g==="continue"||g==="debugger";case 10:return g==="instanceof";default:return!1}}function a(g,f){return g==="null"||g==="true"||g==="false"||u(g,f)}function d(g,f){return g==="null"||g==="true"||g==="false"||p(g,f)}function v(g){return g==="eval"||g==="arguments"}function m(g){var f,b,S;if(g.length===0||(S=g.charCodeAt(0),!c.isIdentifierStartES5(S)))return!1;for(f=1,b=g.length;f=b||(E=g.charCodeAt(f),!(56320<=E&&E<=57343)))return!1;S=o(S,E)}if(!k(S))return!1;k=c.isIdentifierPartES6}return!0}function O(g,f){return m(g)&&!a(g,f)}function x(g,f){return y(g)&&!d(g,f)}hh.exports={isKeywordES5:u,isKeywordES6:p,isReservedWordES5:a,isReservedWordES6:d,isRestrictedWord:v,isIdentifierNameES5:m,isIdentifierNameES6:y,isIdentifierES5:O,isIdentifierES6:x}}()),hh.exports}var rC;function nC(){return rC||(rC=1,function(){xo.ast=e3(),xo.code=eC(),xo.keyword=t3()}()),xo}var dh,sC;function iC(){return sC||(sC=1,dh={LATEST_ECMA_VERSION:2025}),dh}var aC;function Ze(){return aC||(aC=1,function(c){const{KEYS:s}=kl(),u=nC(),p=Pl(),a=Zl(),{breakableTypePattern:d,createGlobalLinebreakMatcher:v,lineBreakPattern:m,shebangPattern:o}=zl(),y=nE(),{LATEST_ECMA_VERSION:O}=iC(),x=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,g=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,f=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,b=/Array$/u,S=/^(?:bind|call|apply)$/u,E=/^[\s*]*@this/mu,k=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,D=/^(?:eslint[- ]|(?:globals?|exported) )/u,T=new Set([`\r +`,"\r",` +`,"\u2028","\u2029"]),R=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),F=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,P=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,N=new Set(["&&=","||=","??="]),I=y[`es${O}`];function L(X,ee,be){const Ee=X.identifier,ve=ee===0||be[ee-1].identifier!==Ee;return Ee&&X.init===!1&&X.isWrite()&&ve}function j(X){return X[0]!==X[0].toLocaleLowerCase()}function G(X){return X.id&&j(X.id.name)}function U(X){for(let ee=X;ee;ee=ee.parent)if(x.test(ee.type))return ee;return null}function Q(X){return!!(X&&x.test(X.type))}function $(X){return!!(X&&g.test(X.type))}function W(X){for(let ee=X;ee&&!Q(ee);ee=ee.parent)if($(ee))return!0;return!1}function K(X){return X.type==="Literal"&&X.value===null&&!X.regex&&!X.bigint}function te(X){return K(X)||X.type==="Identifier"&&X.name==="undefined"||X.type==="UnaryExpression"&&X.operator==="void"}function V(X){return X.parent.type==="CallExpression"&&X.parent.callee===X}function ae(X){switch(X.type){case"Literal":if(X.value===null){if(K(X))return String(X.value);if(X.regex)return`/${X.regex.pattern}/${X.regex.flags}`;if(X.bigint)return X.bigint}else return String(X.value);break;case"TemplateLiteral":if(X.expressions.length===0&&X.quasis.length===1)return X.quasis[0].value.cooked;break}return null}function z(X){let ee;switch(X&&X.type){case"ChainExpression":return z(X.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":ee=X.key;break;case"MemberExpression":ee=X.property;break}return ee?ee.type==="Identifier"&&!X.computed?ee.name:ae(ee):null}function ue(X){return X&&X.type==="ChainExpression"?X.expression:X}function ne(X,ee){return typeof ee=="string"?X===ee:ee.test(X)}function ce(X,ee){return X.type==="Identifier"&&ne(X.name,ee)}function pe(X,ee,be){const Ee=ue(X);if(Ee.type!=="MemberExpression"||ee&&!ce(Ee.object,ee))return!1;if(be){const ve=z(Ee);if(typeof ve!="string"||!ne(ve,be))return!1}return!0}function Be(X,ee){return X.regex||ee.regex?!!(X.regex&&ee.regex&&X.regex.pattern===ee.regex.pattern&&X.regex.flags===ee.regex.flags):X.bigint||ee.bigint?X.bigint===ee.bigint:X.value===ee.value}function oe(X,ee,be=!1){if(X.type!==ee.type)return X.type==="ChainExpression"?oe(X.expression,ee,be):ee.type==="ChainExpression"?oe(X,ee.expression,be):!1;switch(X.type){case"Super":case"ThisExpression":return!0;case"Identifier":case"PrivateIdentifier":return X.name===ee.name;case"Literal":return Be(X,ee);case"ChainExpression":return oe(X.expression,ee.expression,be);case"MemberExpression":{if(!be){const Ee=z(X);if(Ee!==null)return oe(X.object,ee.object,be)&&Ee===z(ee)}return X.computed===ee.computed&&oe(X.object,ee.object,be)&&oe(X.property,ee.property,be)}default:return!1}}function Z(X){return pe(X,"Reflect","apply")}function ge(X){return pe(X,b,"from")}function Re(X){return pe(X,null,f)}function Se(X){return ee=>!X(ee)}function we(X,ee){const be=ee.getJSDocComment(X);return be&&E.test(be.value)?!0:ee.getCommentsBefore(X).some(Ee=>E.test(Ee.value))}function Me(X,ee){const be=X.getTokenBefore(ee),Ee=X.getTokenAfter(ee);return!!(be&&Ee)&&be.value==="("&&be.range[1]<=ee.range[0]&&Ee.value===")"&&Ee.range[0]>=ee.range[1]}function it(X){return X.value==="="&&X.type==="Punctuator"}function pt(X){return X.value==="=>"&&X.type==="Punctuator"}function kt(X){return X.value===","&&X.type==="Punctuator"}function qt(X){return X.value==="."&&X.type==="Punctuator"}function Ut(X){return X.value==="?."&&X.type==="Punctuator"}function tr(X){return X.value===";"&&X.type==="Punctuator"}function fe(X){return X.value===":"&&X.type==="Punctuator"}function Ve(X){return X.value==="("&&X.type==="Punctuator"}function mt(X){return X.value===")"&&X.type==="Punctuator"}function Pt(X){return X.value==="["&&X.type==="Punctuator"}function Bt(X){return X.value==="]"&&X.type==="Punctuator"}function se(X){return X.value==="{"&&X.type==="Punctuator"}function Kt(X){return X.value==="}"&&X.type==="Punctuator"}function Vt(X){return X.type==="Line"||X.type==="Block"||X.type==="Shebang"}function ir(X){return X.type==="Keyword"}function Ot(X,ee){if(X.type==="ArrowFunctionExpression"&&X.params.length===1){const be=ee.getFirstToken(X.params[0]),Ee=ee.getTokenBefore(be);return Ve(Ee)?Ee:be}return X.id?ee.getTokenAfter(X.id,Ve):ee.getFirstToken(X,Ve)}function Zt(X,ee,be){const Ee=be.getTokens(X),ve=be.getTokens(ee);if(Ee.length!==ve.length)return!1;for(let Ne=0;NeEe.identifier===ee);return!!(be&&be.resolved&&be.resolved.scope.type==="global"&&be.resolved.defs.length===0)}function Oe(X,ee,be){if(!ee)return!0;switch(ee.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"ClassExpression":case"ObjectExpression":return!0;case"TemplateLiteral":return be&&ee.quasis.some(Ee=>Ee.value.cooked.length)||ee.expressions.every(Ee=>Oe(X,Ee,!1));case"ArrayExpression":return be?!0:ee.elements.every(Ee=>Oe(X,Ee,!1));case"UnaryExpression":return ee.operator==="void"||ee.operator==="typeof"&&be?!0:ee.operator==="!"?Oe(X,ee.argument,!0):Oe(X,ee.argument,!1);case"BinaryExpression":return Oe(X,ee.left,!1)&&Oe(X,ee.right,!1)&&ee.operator!=="in";case"LogicalExpression":{const Ee=Oe(X,ee.left,be),ve=Oe(X,ee.right,be),Ne=Ee&&Ue(ee.left,ee.operator),Ke=be&&ve&&Ue(ee.right,ee.operator);return Ee&&ve||Ne||Ke}case"NewExpression":return be;case"AssignmentExpression":return ee.operator==="="?Oe(X,ee.right,be):["||=","&&="].includes(ee.operator)&&be?Ue(ee.right,ee.operator.slice(0,-1)):!1;case"SequenceExpression":return Oe(X,ee.expressions.at(-1),be);case"SpreadElement":return Oe(X,ee.argument,be);case"CallExpression":return ee.callee.type==="Identifier"&&ee.callee.name==="Boolean"&&(ee.arguments.length===0||Oe(X,ee.arguments[0],!0))?lt(X,ee.callee):!1;case"Identifier":return ee.name==="undefined"&<(X,ee)}return!1}function Pe(X){if(X.type!=="ExpressionStatement")return!1;const ee=X.parent;return ee.type==="Program"||ee.type==="BlockStatement"&&Q(ee.parent)}function de(X){return X.type==="ExpressionStatement"&&typeof X.directive=="string"}function ye(X){const ee=X.range[0];let be=X;for(;(be=be.parent)&&be.range[0]===ee;)if(be.type==="ExpressionStatement")return!0;return!1}let Le;{const X=new Set(["BreakStatement","ContinueStatement"]),ee=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),be=new Set(["Identifier","Keyword"]),Ee={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},ve=new Set([":",";","{","=>","++","--"]),Ne=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);Le=function(Ke,at){const dt=Ke.getTokenBefore(at);if(!dt||dt.type==="Punctuator"&&ve.has(dt.value))return!1;const ht=Ke.getNodeByRangeIndex(dt.range[0]);if(mt(dt))return!Ne.has(ht.type);if(Kt(dt))return ht.type==="BlockStatement"&&ht.parent.type==="FunctionExpression"&&ht.parent.parent.type!=="MethodDefinition"||ht.type==="ClassBody"&&ht.parent.type==="ClassExpression"||ht.type==="ObjectExpression";if(be.has(dt.type)){if(X.has(ht.parent.type))return!1;const Ce=dt.value,xe=Ee[Ce];return ht.type!==xe}return dt.type==="String"?!ee.has(ht.parent.type):!0}}c.exports={COMMENTS_IGNORE_PATTERN:k,LINEBREAKS:T,LINEBREAK_MATCHER:m,SHEBANG_MATCHER:o,STATEMENT_LIST_PARENTS:R,ECMASCRIPT_GLOBALS:I,isTokenOnSameLine(X,ee){return X.loc.end.line===ee.loc.start.line},isNullOrUndefined:te,isCallee:V,isES5Constructor:G,getUpperFunction:U,isFunction:Q,isLoop:$,isInLoop:W,isArrayFromMethod:ge,isParenthesised:Me,createGlobalLinebreakMatcher:v,equalTokens:Zt,isArrowToken:pt,isClosingBraceToken:Kt,isClosingBracketToken:Bt,isClosingParenToken:mt,isColonToken:fe,isCommaToken:kt,isCommentToken:Vt,isDotToken:qt,isQuestionDotToken:Ut,isKeywordToken:ir,isNotClosingBraceToken:Se(Kt),isNotClosingBracketToken:Se(Bt),isNotClosingParenToken:Se(mt),isNotColonToken:Se(fe),isNotCommaToken:Se(kt),isNotDotToken:Se(qt),isNotQuestionDotToken:Se(Ut),isNotOpeningBraceToken:Se(se),isNotOpeningBracketToken:Se(Pt),isNotOpeningParenToken:Se(Ve),isNotSemicolonToken:Se(tr),isOpeningBraceToken:se,isOpeningBracketToken:Pt,isOpeningParenToken:Ve,isSemicolonToken:tr,isEqToken:it,isStringLiteral(X){return X.type==="Literal"&&typeof X.value=="string"||X.type==="TemplateLiteral"},isBreakableStatement(X){return d.test(X.type)},getModifyingReferences(X){return X.filter(L)},isSurroundedBy(X,ee){return X[0]===ee&&X.at(-1)===ee},isDirectiveComment(X){const ee=X.value.trim();return X.type==="Line"&&ee.startsWith("eslint-")||X.type==="Block"&&D.test(ee)},getTrailingStatement:u.ast.trailingStatement,getVariableByName(X,ee){let be=X;for(;be;){const Ee=be.set.get(ee);if(Ee)return Ee;be=be.upper}return null},isDefaultThisBinding(X,ee,{capIsConstructor:be=!0}={}){if(X.parent.type==="PropertyDefinition"&&X.parent.value===X||X.type==="StaticBlock"||be&&G(X)||we(X,ee))return!1;const Ee=X.id===null;let ve=X;for(;ve;){const Ne=ve.parent;switch(Ne.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":ve=Ne;break;case"ReturnStatement":{const Ke=U(Ne);if(Ke===null||!V(Ke))return!0;ve=Ke.parent;break}case"ArrowFunctionExpression":if(ve!==Ne.body||!V(Ne))return!0;ve=Ne.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return Ne.value!==ve;case"AssignmentExpression":case"AssignmentPattern":return!(Ne.left.type==="MemberExpression"||be&&Ee&&Ne.left.type==="Identifier"&&j(Ne.left.name));case"VariableDeclarator":return!(be&&Ee&&Ne.init===ve&&Ne.id.type==="Identifier"&&j(Ne.id.name));case"MemberExpression":if(Ne.object===ve&&pe(Ne,null,S)){const Ke=Ne.parent.type==="ChainExpression"?Ne.parent:Ne;return!(V(Ke)&&Ke.parent.arguments.length>=1&&!te(Ke.parent.arguments[0]))}return!0;case"CallExpression":return Z(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[0]!==ve||te(Ne.arguments[1]):ge(Ne.callee)?Ne.arguments.length!==3||Ne.arguments[1]!==ve||te(Ne.arguments[2]):Re(Ne.callee)?Ne.arguments.length!==2||Ne.arguments[0]!==ve||te(Ne.arguments[1]):!0;default:return!0}}return!0},getPrecedence(X){switch(X.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(X.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(X.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return X.type in s?20:-1}},isEmptyBlock(X){return!!(X&&X.type==="BlockStatement"&&X.body.length===0)},isEmptyFunction(X){return Q(X)&&c.exports.isEmptyBlock(X.body)},getDirectivePrologue(X){const ee=[];if(X.type==="Program"||X.type==="FunctionDeclaration"||X.type==="FunctionExpression"||X.type==="ArrowFunctionExpression"&&X.body.type==="BlockStatement"){const be=X.type==="Program"?X.body:X.body.body;for(const Ee of be)if(Ee.type==="ExpressionStatement"&&Ee.expression.type==="Literal")ee.push(Ee);else break}return ee},isDecimalInteger(X){return X.type==="Literal"&&typeof X.value=="number"&&F.test(X.raw)},isDecimalIntegerNumericToken(X){return X.type==="Numeric"&&F.test(X.value)},getFunctionNameWithKind(X){const ee=X.parent,be=[];if((ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")&&(ee.static&&be.push("static"),!ee.computed&&ee.key.type==="PrivateIdentifier"&&be.push("private")),X.async&&be.push("async"),X.generator&&be.push("generator"),ee.type==="Property"||ee.type==="MethodDefinition"){if(ee.kind==="constructor")return"constructor";ee.kind==="get"?be.push("getter"):ee.kind==="set"?be.push("setter"):be.push("method")}else ee.type==="PropertyDefinition"?be.push("method"):(X.type==="ArrowFunctionExpression"&&be.push("arrow"),be.push("function"));if(ee.type==="Property"||ee.type==="MethodDefinition"||ee.type==="PropertyDefinition")if(!ee.computed&&ee.key.type==="PrivateIdentifier")be.push(`#${ee.key.name}`);else{const Ee=z(ee);Ee!==null?be.push(`'${Ee}'`):X.id&&be.push(`'${X.id.name}'`)}else X.id&&be.push(`'${X.id.name}'`);return be.join(" ")},getFunctionHeadLoc(X,ee){const be=X.parent;let Ee,ve;if(be.type==="Property"||be.type==="MethodDefinition"||be.type==="PropertyDefinition")Ee=be.loc.start,ve=Ot(X,ee).loc.start;else if(X.type==="ArrowFunctionExpression"){const Ne=ee.getTokenBefore(X.body,pt);Ee=Ne.loc.start,ve=Ne.loc.end}else Ee=X.loc.start,ve=Ot(X,ee).loc.start;return{start:Object.assign({},Ee),end:Object.assign({},ve)}},getNextLocation(X,{line:ee,column:be}){return beEe.range[0])&&(Ee=at)}}else Ee=X;if(Ee.type==="Shebang"||Ee.type==="Hashbang")return!1;let ve;if(typeof ee=="string"){let Ne;try{Ne=p.tokenize(ee,be)}catch{return!1}const Ke=Ne.comments;if(ve=Ne[0],Ke.length){const at=Ke[0];(!ve||at.range[0]F.type==="Property"))}function E(R){const F=new Set(R.properties.filter(I=>I.type==="Property"&&I.kind==="init"&&!I.computed).map(({key:I})=>I.name)),P=F.has("get"),N=F.has("set");y&&N&&!P&&g(R,"missingGetter"),o&&P&&!N&&g(R,"missingSetter")}function k(R){S(R),d(R)&&E(R)}function D(R){const F=R.body.filter(P=>P.type==="MethodDefinition");b(F.filter(P=>P.static)),b(F.filter(P=>!P.static))}const T={};return(y||o)&&(T.ObjectExpression=k,O&&(T.ClassBody=D)),T}},mh}var gh,lC;function n3(){if(lC)return gh;lC=1;const c=Ze();return gh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(s){const u=s.sourceCode;function p(O){let x=!1,g=!1,f;return O?O==="consistent"?(x=!0,f=Number.POSITIVE_INFINITY):O==="always"||O.minItems===0?f=0:O==="never"?f=Number.POSITIVE_INFINITY:(g=!!O.multiline,f=O.minItems||Number.POSITIVE_INFINITY):(x=!1,g=!0,f=Number.POSITIVE_INFINITY),{consistent:x,multiline:g,minItems:f}}function a(O){const x=p(O);return{ArrayExpression:x,ArrayPattern:x}}function d(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedOpeningLinebreak",fix(g){const f=u.getTokenAfter(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([x.range[1],f.range[0]])}})}function v(O,x){s.report({node:O,loc:x.loc,messageId:"unexpectedClosingLinebreak",fix(g){const f=u.getTokenBefore(x,{includeComments:!0});return c.isCommentToken(f)?null:g.removeRange([f.range[1],x.range[0]])}})}function m(O,x){s.report({node:O,loc:x.loc,messageId:"missingOpeningLinebreak",fix(g){return g.insertTextAfter(x,` +`)}})}function o(O,x){s.report({node:O,loc:x.loc,messageId:"missingClosingLinebreak",fix(g){return g.insertTextBefore(x,` +`)}})}function y(O){const x=O.elements,f=a(s.options[0])[O.type],b=u.getFirstToken(O),S=u.getLastToken(O),E=u.getTokenAfter(b,{includeComments:!0}),k=u.getTokenBefore(S,{includeComments:!0}),D=u.getTokenAfter(b),T=u.getTokenBefore(S);x.length>=f.minItems||f.multiline&&x.length>0&&E.loc.start.line!==k.loc.end.line||x.length===0&&E.type==="Block"&&E.loc.start.line!==k.loc.end.line&&E===k||f.consistent&&b.loc.end.line!==D.loc.start.line?(c.isTokenOnSameLine(b,D)&&m(O,b),c.isTokenOnSameLine(T,S)&&o(O,S)):(c.isTokenOnSameLine(b,D)||d(O,b),c.isTokenOnSameLine(T,S)||v(O,S))}return{ArrayPattern:y,ArrayExpression:y}}},gh}var yh,uC;function s3(){if(uC)return yh;uC=1;const c=Ze();return yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(f){return s.options[1]?s.options[1][f]===!u:!1}const d={spaced:u,singleElementException:a("singleValue"),objectsInArraysException:a("objectsInArrays"),arraysInArraysException:a("arraysInArrays")};function v(f,b){const S=p.getTokenAfter(b);s.report({node:f,loc:{start:b.loc.end,end:S.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:b.value},fix(E){return E.removeRange([b.range[1],S.range[0]])}})}function m(f,b){const S=p.getTokenBefore(b);s.report({node:f,loc:{start:S.loc.end,end:b.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:b.value},fix(E){return E.removeRange([S.range[1],b.range[0]])}})}function o(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceAfter",data:{tokenValue:b.value},fix(S){return S.insertTextAfter(b," ")}})}function y(f,b){s.report({node:f,loc:b.loc,messageId:"missingSpaceBefore",data:{tokenValue:b.value},fix(S){return S.insertTextBefore(b," ")}})}function O(f){return f&&(f.type==="ObjectExpression"||f.type==="ObjectPattern")}function x(f){return f&&(f.type==="ArrayExpression"||f.type==="ArrayPattern")}function g(f){if(d.spaced&&f.elements.length===0)return;const b=p.getFirstToken(f),S=p.getFirstToken(f,1),E=f.typeAnnotation?p.getTokenBefore(f.typeAnnotation):p.getLastToken(f),k=p.getTokenBefore(E),D=f.elements[0],T=f.elements.at(-1),R=d.objectsInArraysException&&O(D)||d.arraysInArraysException&&x(D)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced,F=d.objectsInArraysException&&O(T)||d.arraysInArraysException&&x(T)||d.singleElementException&&f.elements.length===1?!d.spaced:d.spaced;c.isTokenOnSameLine(b,S)&&(R&&!p.isSpaceBetweenTokens(b,S)&&o(f,b),!R&&p.isSpaceBetweenTokens(b,S)&&v(f,b)),b!==k&&c.isTokenOnSameLine(k,E)&&(F&&!p.isSpaceBetweenTokens(k,E)&&y(f,E),!F&&p.isSpaceBetweenTokens(k,E)&&m(f,E))}return{ArrayPattern:g,ArrayExpression:g}}},yh}var bh,cC;function i3(){if(cC)return bh;cC=1;const c=Ze(),s=/^(?:Arrow)?FunctionExpression$/u,u=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function p(O){return c.isSpecificMemberAccess(O,null,u)}function a(O){for(const x of O)if(x.reachable)return!0;return!1}function d(O){return["from","of","isArray"].includes(O)?"Array.".concat(O):"Array.prototype.".concat(O)}function v(O){let x=O;for(;x;){const g=x.parent;switch(g.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":x=g;break;case"ReturnStatement":{const f=c.getUpperFunction(g);if(f===null||!c.isCallee(f))return null;x=f.parent;break}case"CallExpression":return c.isArrayFromMethod(g.callee)&&g.arguments.length>=2&&g.arguments[1]===x?"from":p(g.callee)&&g.arguments.length>=1&&g.arguments[0]===x?c.getStaticPropertyName(g.callee):null;default:return null}}return null}function m(O){return O.type==="UnaryExpression"&&O.operator==="void"}function o(O,x,g){const f=c.getPrecedence(x)k.type==="Keyword"&&k.value==="return"),S=O.getTokenAfter(b),E=b.value==="return"&&b.range[1]===S.range[0];return[g.insertTextBefore(S,`${E?" ":""}void ${f?"(":""}`),g.insertTextAfter(x,f?")":"")]}function y(O,x,g){const f=O.getTokenBefore(x.body,c.isArrowToken),b=O.getTokenAfter(f),S=O.getLastToken(x);return[g.insertTextBefore(b,"{"),g.insertTextAfter(S,"}")]}return bh={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(O){const x=O.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},g=O.sourceCode;let f={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function b(S){if(!f.shouldCheck)return;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.type==="ArrowFunctionExpression"&&S.expression)if(x.allowVoid){if(m(S.body))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}},{messageId:"prependVoid",fix(k){return o(g,S.body,k)}}]}else E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"wrapBraces",fix(k){return y(g,S,k)}}]}else S.body.type==="BlockStatement"&&a(f.currentSegments)&&(E.messageId=f.hasReturn?"expectedAtEnd":"expectedInside");if(E.messageId){const k=c.getFunctionNameWithKind(S);O.report({node:S,loc:c.getFunctionHeadLoc(S,g),messageId:E.messageId,data:{name:k,arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})}}return{onCodePathStart(S,E){let k=null;s.test(E.type)&&(k=v(E)),f={arrayMethodName:k,upper:f,codePath:S,hasReturn:!1,shouldCheck:k&&!E.async&&!E.generator,node:E,currentSegments:new Set}},onCodePathEnd(){f=f.upper},onUnreachableCodePathSegmentStart(S){f.currentSegments.add(S)},onUnreachableCodePathSegmentEnd(S){f.currentSegments.delete(S)},onCodePathSegmentStart(S){f.currentSegments.add(S)},onCodePathSegmentEnd(S){f.currentSegments.delete(S)},ReturnStatement(S){if(!f.shouldCheck)return;f.hasReturn=!0;const E={messageId:"",suggest:[]};if(f.arrayMethodName==="forEach"){if(x.checkForEach&&S.argument)if(x.allowVoid){if(m(S.argument))return;E.messageId="expectedNoReturnValue",E.suggest=[{messageId:"prependVoid",fix(k){return o(g,S.argument,k)}}]}else E.messageId="expectedNoReturnValue"}else!x.allowImplicit&&!S.argument&&(E.messageId="expectedReturnValue");E.messageId&&O.report({node:S,messageId:E.messageId,data:{name:c.getFunctionNameWithKind(f.node),arrayMethodName:d(f.arrayMethodName)},suggest:E.suggest.length!==0?E.suggest:null})},"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b}}},bh}var vh,fC;function a3(){if(fC)return vh;fC=1;const c=Ze();return vh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(s){const u=s.sourceCode;function p(o){let y=!1,O=!1,x;const g=o||"always";return!g||g==="always"||g.minItems===0?x=0:g==="never"?x=Number.POSITIVE_INFINITY:g==="consistent"?(y=!0,x=Number.POSITIVE_INFINITY):(O=!!g.multiline,x=g.minItems||Number.POSITIVE_INFINITY),{consistent:y,multiline:O,minItems:x}}function a(o){if(o&&(o.ArrayExpression||o.ArrayPattern)){let O,x;return o.ArrayExpression&&(O=p(o.ArrayExpression)),o.ArrayPattern&&(x=p(o.ArrayPattern)),{ArrayExpression:O,ArrayPattern:x}}const y=p(o);return{ArrayExpression:y,ArrayPattern:y}}function d(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"unexpectedLineBreak",fix(O){if(c.isCommentToken(y))return null;if(!c.isTokenOnSameLine(y,o))return O.replaceTextRange([y.range[1],o.range[0]]," ");const x=u.getTokenBefore(y,{includeComments:!0});return c.isCommentToken(x)?null:O.replaceTextRange([x.range[1],y.range[0]],"")}})}function v(o){const y=u.getTokenBefore(o,{includeComments:!0});s.report({loc:{start:y.loc.end,end:o.loc.start},messageId:"missingLineBreak",fix(O){return O.replaceTextRange([y.range[1],o.range[0]],` +`)}})}function m(o){const y=o.elements,x=a(s.options[0])[o.type];if(!x)return;let g=!1;x.multiline&&(g=y.filter(S=>S!==null).some(S=>S.loc.start.line!==S.loc.end.line));let f=0;for(let S=0;S=x.minItems||x.multiline&&g||x.consistent&&f>0&&f{const k=y[E-1];if(E===0||S===null||k===null)return;const D=u.getFirstTokenBetween(k,S,c.isCommaToken),T=u.getTokenBefore(D),R=u.getTokenAfter(D);b?c.isTokenOnSameLine(T,R)&&v(R):c.isTokenOnSameLine(T,R)||d(R)})}return{ArrayPattern:m,ArrayExpression:m}}},vh}var xh,pC;function o3(){if(pC)return xh;pC=1;const c=Ze();return xh={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(s){const u=s.options,p=u[0]==="always",a=!u[0]||u[0]==="as-needed",d=u[0]==="never",v=u[1]&&u[1].requireReturnForObjectLiteral,m=s.sourceCode;let o=null;function y(f){return f&&f.type==="Punctuator"&&/^[([/`+-]/u.test(f.value)}function O(f){let b=f;for(;!c.isParenthesised(m,b);)b=b.parent;return m.getTokenAfter(b)}function x(f){return f&&f.parent?f.parent.type==="ForStatement"&&f.parent.init===f?!0:x(f.parent):!1}function g(f){const b=f.body;if(b.type==="BlockStatement"){const S=b.body;if(S.length!==1&&!d||a&&v&&S[0].type==="ReturnStatement"&&S[0].argument&&S[0].argument.type==="ObjectExpression")return;if(d||a&&S[0].type==="ReturnStatement"){let E;S.length===0?E="unexpectedEmptyBlock":S.length>1?E="unexpectedOtherBlock":S[0].argument===null?E="unexpectedSingleBlock":c.isOpeningBraceToken(m.getFirstToken(S[0],{skip:1}))?E="unexpectedObjectBlock":E="unexpectedSingleBlock",s.report({node:f,loc:b.loc,messageId:E,fix(k){const D=[];if(S.length!==1||S[0].type!=="ReturnStatement"||!S[0].argument||y(m.getTokenAfter(b)))return D;const T=m.getFirstToken(b),R=m.getLastToken(b),F=m.getFirstToken(S[0],1),P=m.getLastToken(S[0]);return m.commentsExistBetween(T,F)||m.commentsExistBetween(P,R)?D.push(k.remove(T),k.remove(R),k.remove(m.getTokenAfter(T))):D.push(k.removeRange([T.range[0],F.range[0]]),k.removeRange([P.range[1],R.range[1]])),(c.isOpeningBraceToken(F)||S[0].argument.type==="SequenceExpression"||o.hasInOperator&&x(f))&&(c.isParenthesised(m,S[0].argument)||D.push(k.insertTextBefore(F,"("),k.insertTextAfter(P,")"))),c.isSemicolonToken(P)&&D.push(k.remove(P)),D}})}}else(p||a&&v&&b.type==="ObjectExpression")&&s.report({node:f,loc:b.loc,messageId:"expectedBlock",fix(S){const E=[],k=m.getTokenBefore(b,c.isArrowToken),[D,T]=m.getTokensAfter(k,{count:2}),R=m.getLastToken(f);let F=null;if(c.isOpeningParenToken(D)&&c.isOpeningBraceToken(T)){const P=m.getNodeByRangeIndex(T.range[0]);P.type==="ObjectExpression"&&(F=P)}if(F){const P=D,N=T;c.isTokenOnSameLine(P,N)?E.push(S.replaceText(P,"{return ")):E.push(S.replaceText(P,"{"),S.insertTextBefore(N,"return ")),E.push(S.remove(O(F))),E.push(S.insertTextAfter(R,"}"))}else E.push(S.insertTextBefore(D,"{return ")),E.push(S.insertTextAfter(R,"}"));return E}})}return{"BinaryExpression[operator='in']"(){let f=o;for(;f;)f.hasInOperator=!0,f=f.upper},ArrowFunctionExpression(){o={upper:o,hasInOperator:!1}},"ArrowFunctionExpression:exit"(f){g(f),o=o.upper}}}},xh}var Oh,hC;function l3(){if(hC)return Oh;hC=1;const c=Ze();function s(u){return u.body.type==="BlockStatement"}return Oh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(u){const p=u.options[0]==="as-needed",a=p&&u.options[1]&&u.options[1].requireForBlockBody===!0,d=u.sourceCode;function v(O){const x=d.getTokenBefore(O.params[0]);return x&&c.isOpeningParenToken(x)&&O.range[0]<=x.range[0]?x:null}function m(O){return d.getTokenAfter(O.params[0],c.isClosingParenToken)}function o(O,x){return d.commentsExistBetween(x,m(O))}function y(O,x){const g=O.async?1:0;return d.getFirstToken(O,{skip:g})!==x}return{"ArrowFunctionExpression[params.length=1]"(O){const x=!p||a&&s(O),g=v(O),f=g!==null,[b]=O.params;x&&!f&&u.report({node:O,messageId:a?"expectedParensBlock":"expectedParens",loc:b.loc,*fix(S){yield S.insertTextBefore(b,"("),yield S.insertTextAfter(b,")")}}),!x&&f&&b.type==="Identifier"&&!b.typeAnnotation&&!O.returnType&&!o(O,g)&&!y(O,g)&&u.report({node:O,messageId:a?"unexpectedParensInline":"unexpectedParens",loc:b.loc,*fix(S){const E=d.getTokenBefore(g),k=m(O);E&&E.range[1]===g.range[0]&&!c.canTokensBeAdjacent(E,d.getFirstToken(b))&&(yield S.insertTextBefore(g," ")),yield S.removeRange([g.range[0],b.range[0]]),yield S.removeRange([b.range[1],k.range[1]])}})}}}},Oh}var Sh,dC;function u3(){if(dC)return Sh;dC=1;const c=Ze();return Sh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(s){const u=Object.assign({},s.options[0]);u.before=u.before!==!1,u.after=u.after!==!1;const p=s.sourceCode;function a(m){const o=p.getTokenBefore(m.body,c.isArrowToken);return{before:p.getTokenBefore(o),arrow:o,after:p.getTokenAfter(o)}}function d(m){const o=m.arrow.range[0]-m.before.range[1],y=m.after.range[0]-m.arrow.range[1];return{before:o,after:y}}function v(m){const o=a(m),y=d(o);u.before?y.before===0&&s.report({node:o.before,messageId:"expectedBefore",fix(O){return O.insertTextBefore(o.arrow," ")}}):y.before>0&&s.report({node:o.before,messageId:"unexpectedBefore",fix(O){return O.removeRange([o.before.range[1],o.arrow.range[0]])}}),u.after?y.after===0&&s.report({node:o.after,messageId:"expectedAfter",fix(O){return O.insertTextAfter(o.arrow," ")}}):y.after>0&&s.report({node:o.after,messageId:"unexpectedAfter",fix(O){return O.removeRange([o.arrow.range[1],o.after.range[0]])}})}return{ArrowFunctionExpression:v}}},Sh}var Eh,mC;function c3(){return mC||(mC=1,Eh={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(c){let s=[];const u=c.sourceCode;function p(m){s.push(m.range)}function a(){s.pop()}function d(m,o){const y=m.identifier,O=o.name.loc.start;c.report({node:y,messageId:"outOfScope",data:{name:y.name,definitionLine:O.line,definitionColumn:O.column+1}})}function v(m){if(m.kind!=="var")return;const o=s.at(-1);function y(x){const g=x.identifier.range;return g[0]o[1]}const O=u.getDeclaredVariables(m);for(let x=0;xd(g,O[x].defs.find(f=>f.parent===m)))}return{Program(m){s=[m.range]},BlockStatement:p,"BlockStatement:exit":a,ForStatement:p,"ForStatement:exit":a,ForInStatement:p,"ForInStatement:exit":a,ForOfStatement:p,"ForOfStatement:exit":a,SwitchStatement:p,"SwitchStatement:exit":a,CatchClause:p,"CatchClause:exit":a,StaticBlock:p,"StaticBlock:exit":a,VariableDeclaration:v}}}),Eh}var Ch,gC;function f3(){if(gC)return Ch;gC=1;const c=Ze();return Ch={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(s){const u=s.options[0]!=="never",p=u?"missing":"extra",a=s.sourceCode;function d(o){return o.type==="SwitchStatement"?o.cases.length>0?a.getTokenBefore(o.cases[0]):a.getLastToken(o,1):o.type==="StaticBlock"?a.getFirstToken(o,{skip:1}):a.getFirstToken(o)}function v(o,y){return!c.isTokenOnSameLine(o,y)||a.isSpaceBetweenTokens(o,y)===u}function m(o){const y=d(o),O=a.getLastToken(o),x=a.getTokenAfter(y,{includeComments:!0}),g=a.getTokenBefore(O,{includeComments:!0});if(!(y.type!=="Punctuator"||y.value!=="{"||O.type!=="Punctuator"||O.value!=="}"||x===O)&&!(!u&&x.type==="Line")){if(!v(y,x)){let f=y.loc;p==="extra"&&(f={start:y.loc.end,end:x.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"after",token:y.value},fix(b){return u?b.insertTextBefore(x," "):b.removeRange([y.range[1],x.range[0]])}})}if(!v(g,O)){let f=O.loc;p==="extra"&&(f={start:g.loc.end,end:O.loc.start}),s.report({node:o,loc:f,messageId:p,data:{location:"before",token:O.value},fix(b){return u?b.insertTextAfter(g," "):b.removeRange([g.range[1],O.range[0]])}})}}}return{BlockStatement:m,StaticBlock:m,SwitchStatement:m}}},Ch}var wh,yC;function p3(){if(yC)return wh;yC=1;const c=Ze();return wh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(s){const u=s.options[0]||"1tbs",p=s.options[1]||{},a=s.sourceCode;function d(o,y){const O=[o.range[1],y.range[0]];return a.text.slice(O[0],O[1]).trim()?null:g=>g.replaceTextRange(O," ")}function v(o,y){const O=a.getTokenBefore(o),x=a.getTokenAfter(o),g=a.getTokenBefore(y),f=p.allowSingleLine&&c.isTokenOnSameLine(o,y);u!=="allman"&&!c.isTokenOnSameLine(O,o)&&s.report({node:o,messageId:"nextLineOpen",fix:d(O,o)}),u==="allman"&&c.isTokenOnSameLine(O,o)&&!f&&s.report({node:o,messageId:"sameLineOpen",fix:b=>b.insertTextBefore(o,` +`)}),c.isTokenOnSameLine(o,x)&&x!==y&&!f&&s.report({node:o,messageId:"blockSameLine",fix:b=>b.insertTextAfter(o,` +`)}),g!==o&&!f&&c.isTokenOnSameLine(g,y)&&s.report({node:y,messageId:"singleLineClose",fix:b=>b.insertTextBefore(y,` +`)})}function m(o){const y=a.getTokenAfter(o);u==="1tbs"&&!c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"nextLineClose",fix:d(o,y)}),u!=="1tbs"&&c.isTokenOnSameLine(o,y)&&s.report({node:o,messageId:"sameLineClose",fix:O=>O.insertTextAfter(o,` +`)})}return{BlockStatement(o){c.STATEMENT_LIST_PARENTS.has(o.parent.type)||v(a.getFirstToken(o),a.getLastToken(o))},StaticBlock(o){v(a.getFirstToken(o,{skip:1}),a.getLastToken(o))},ClassBody(o){v(a.getFirstToken(o),a.getLastToken(o))},SwitchStatement(o){const y=a.getLastToken(o),O=a.getTokenBefore(o.cases.length?o.cases[0]:y);v(O,y)},IfStatement(o){o.consequent.type==="BlockStatement"&&o.alternate&&m(a.getLastToken(o.consequent))},TryStatement(o){m(a.getLastToken(o.block)),o.handler&&o.finalizer&&m(a.getLastToken(o.handler.body))}}}},wh}var kh,bC;function h3(){return bC||(bC=1,kh={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(c){const s=c.options[0]||["callback","cb","next"],u=c.sourceCode;function p(m,o){return m.parent?o.includes(m.parent.type)?m.parent:p(m.parent,o):null}function a(m){if(m.type==="Identifier")return!0;if(m.type==="MemberExpression"){if(m.object.type==="Identifier")return!0;if(m.object.type==="MemberExpression")return a(m.object)}return!1}function d(m){return a(m.callee)&&s.includes(u.getText(m.callee))}function v(m,o){return!o||o.type!=="ExpressionStatement"?!1:o.expression===m||(o.expression.type==="BinaryExpression"||o.expression.type==="LogicalExpression")&&o.expression.right===m}return{CallExpression(m){if(!d(m))return;const o=p(m,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if(o.type!=="ReturnStatement"&&o.type!=="ArrowFunctionExpression"){if(o.type==="BlockStatement"){const y=o.body.at(-1);if(v(m,y)){const O=o.parent.type;if(O==="FunctionExpression"||O==="FunctionDeclaration"||O==="ArrowFunctionExpression")return}if(y.type==="ReturnStatement"&&v(m,o.body.at(-2)))return}p(m,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&c.report({node:m,messageId:"missingReturn"})}}}}}),kh}var Ah,vC;function d3(){if(vC)return Ah;vC=1;const c=Ze();return Ah={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(s){const u=s.options[0]||{},p=u.properties==="never"?"never":"always",a=u.ignoreDestructuring,d=u.ignoreImports,v=u.ignoreGlobals,m=u.allow||[],o=s.sourceCode,y=new Set;function O(k){const D=k.replace(/^_+|_+$/gu,"");return D.includes("_")&&D!==D.toUpperCase()}function x(k){return m.some(D=>k===D||k.match(new RegExp(D,"u")))}function g(k){return!O(k)||x(k)}function f(k){const D=k.parent;switch(D.type){case"AssignmentExpression":case"AssignmentPattern":return D.left===k;case"Property":return D.parent.type==="ObjectPattern"&&D.value===k;case"ArrayPattern":case"RestElement":return!0;default:return!1}}function b(k){const D=k.name,T=k.parent.type==="AssignmentPattern"?k.parent:k,R=T.parent;switch(R.type){case"Property":return(R.parent.type==="ObjectPattern"||R.parent.type==="ObjectExpression")&&R.value===T&&!R.computed&&R.key.type==="Identifier"&&R.key.name===D;case"ImportSpecifier":return R.local===k&&c.getModuleExportName(R.imported)===D;default:return!1}}function S(k){y.has(k.range[0])||(y.add(k.range[0]),s.report({node:k,messageId:k.type==="PrivateIdentifier"?"notCamelCasePrivate":"notCamelCase",data:{name:k.name}}))}function E(k){k.parent.type==="CallExpression"||k.parent.type==="NewExpression"||k.parent.type==="AssignmentPattern"&&k.parent.right===k||a&&b(k)||S(k)}return{Program(k){const D=o.getScope(k);if(!v){for(const T of D.variables)if(!(T.identifiers.length>0||g(T.name)))for(const R of T.references)E(R.identifier)}for(const T of D.through){const R=T.identifier;g(R.name)||E(R)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];a&&b(T)||S(T);for(const R of D.references)R.init||E(R.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](k){p==="never"||g(k.name)||S(k)},"MemberExpression[computed!=true] > Identifier.property"(k){p==="never"||!f(k.parent)||g(k.name)||S(k)},ImportDeclaration(k){for(const D of o.getDeclaredVariables(k)){if(g(D.name))continue;const T=D.identifiers[0];d&&b(T)||S(T);for(const R of D.references)E(R.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](k){g(k.name)||S(k)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](k){g(k.name)||S(k)}}}},Ah}var Ph,xC;function m3(){if(xC)return Ph;xC=1;const s=Ze().COMMENTS_IGNORE_PATTERN,u=/\s/gu,p=/^\s*[^:/?#\s]+:\/\/[^?#]/u,a=/\p{L}/u,d={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},v={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function m(O,x){return Object.assign({},v,O[x]||O)}function o(O={}){return{Line:m(O,"line"),Block:m(O,"block")}}function y(O){Object.keys(O).forEach(x=>{const g=O[x].ignorePattern;if(g){const f=RegExp(`^\\s*(?:${g})`,"u");O[x].ignorePatternRegExp=f}})}return Ph={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[d,{type:"object",properties:{line:d,block:d},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(O){const x=O.options[0]||"always",g=o(O.options[1]),f=O.sourceCode;y(g);function b(D){const T=f.getTokenBefore(D,{includeComments:!0}),R=f.getTokenAfter(D,{includeComments:!0});return!!(T&&R&&D.loc.start.line===T.loc.end.line&&D.loc.end.line===R.loc.start.line)}function S(D){const T=f.getTokenBefore(D,{includeComments:!0});return!!(T&&["Block","Line"].includes(T.type))}function E(D,T){if(s.test(D.value))return!0;const R=D.value.replace(/\*/gu,"");if(T.ignorePatternRegExp&&T.ignorePatternRegExp.test(R)||T.ignoreInlineComments&&b(D)||T.ignoreConsecutiveComments&&S(D)||p.test(R))return!0;const F=R.replace(u,"");if(F.length===0)return!0;const[P]=F;if(!a.test(P))return!0;const N=P!==P.toLocaleLowerCase(),I=P!==P.toLocaleUpperCase();return!(x==="always"&&I||x==="never"&&N)}function k(D){const T=g[D.type];if(!E(D,T)){const F=x==="always"?"unexpectedLowercaseComment":"unexpectedUppercaseComment";O.report({node:null,loc:D.loc,messageId:F,fix(P){const N=D.value.match(a),I=N[0],L=D.range[0]+N.index+2;return P.replaceTextRange([L,L+I.length],x==="always"?I.toLocaleUpperCase():I.toLocaleLowerCase())}})}}return{Program(){f.getAllComments().filter(T=>T.type!=="Shebang").forEach(k)}}}},Ph}var Th,OC;function g3(){if(OC)return Th;OC=1;const c=Ze();return Th={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(s){const u=Object.assign({},s.options[0]),p=u.enforceForClassFields!==!1,a=new Set(u.exceptMethods||[]),d=[];function v(){d.push(!1)}function m(){return d.pop()}function o(){v()}function y(f){switch(f.type){case"MethodDefinition":return!f.static&&f.kind!=="constructor";case"PropertyDefinition":return!f.static&&p;default:return!1}}function O(f){if(y(f)){if(f.computed)return!0;const b=f.key.type==="PrivateIdentifier"?"#":"",S=f.key.type==="Literal"?c.getStaticStringValue(f.key):f.key.name||"";return!a.has(b+S)}return!1}function x(f){const b=m();O(f.parent)&&!b&&s.report({node:f,loc:c.getFunctionHeadLoc(f,s.sourceCode),messageId:"missingThis",data:{name:c.getFunctionNameWithKind(f)}})}function g(){d.length&&(d[d.length-1]=!0)}return{FunctionDeclaration:o,"FunctionDeclaration:exit":x,FunctionExpression:o,"FunctionExpression:exit":x,"PropertyDefinition > *.key:exit":v,"PropertyDefinition:exit":m,StaticBlock:v,"StaticBlock:exit":m,ThisExpression:g,Super:g,...p&&{"PropertyDefinition > ArrowFunctionExpression.value":o,"PropertyDefinition > ArrowFunctionExpression.value:exit":x}}}},Th}var Dh,SC;function y3(){if(SC)return Dh;SC=1;const c=Ze(),s=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});function u(a){return!(a.type==="RestElement"||a.type==="RestProperty"||a.type==="ExperimentalRestProperty")}function p(a,d){return typeof a=="string"?{arrays:a,objects:a,imports:a,exports:a,functions:d<2017?"ignore":a}:typeof a=="object"&&a!==null?{arrays:a.arrays||s.arrays,objects:a.objects||s.objects,imports:a.imports||s.imports,exports:a.exports||s.exports,functions:a.functions||s.functions}:s}return Dh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(a){const d=p(a.options[0],a.languageOptions.ecmaVersion),v=a.sourceCode;function m(S){function E(k){return k.at(-1)}switch(S.type){case"ObjectExpression":case"ObjectPattern":return E(S.properties);case"ArrayExpression":case"ArrayPattern":return E(S.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return E(S.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return E(S.params);case"CallExpression":case"NewExpression":return E(S.arguments);default:return null}}function o(S,E){switch(S.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return v.getLastToken(S,1);default:{const k=v.getTokenAfter(E);return c.isCommaToken(k)?k:v.getLastToken(E)}}}function y(S){const E=m(S);if(!E)return!1;const k=o(S,E);return v.getTokenAfter(k).loc.end.line!==k.loc.end.line}function O(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;const k=o(S,E);c.isCommaToken(k)&&a.report({node:E,loc:k.loc,messageId:"unexpected",*fix(D){yield D.remove(k),yield D.insertTextBefore(v.getTokenBefore(k),""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function x(S){const E=m(S);if(!E||S.type==="ImportDeclaration"&&E.type!=="ImportSpecifier")return;if(!u(E)){O(S);return}const k=o(S,E);k.value!==","&&a.report({node:E,loc:{start:k.loc.end,end:c.getNextLocation(v,k.loc.end)},messageId:"missing",*fix(D){yield D.insertTextAfter(k,","),yield D.insertTextBefore(k,""),yield D.insertTextAfter(v.getTokenAfter(k),"")}})}function g(S){y(S)?x(S):O(S)}function f(S){y(S)||O(S)}const b={always:x,"always-multiline":g,"only-multiline":f,never:O,ignore(){}};return{ObjectExpression:b[d.objects],ObjectPattern:b[d.objects],ArrayExpression:b[d.arrays],ArrayPattern:b[d.arrays],ImportDeclaration:b[d.imports],ExportNamedDeclaration:b[d.exports],FunctionDeclaration:b[d.functions],FunctionExpression:b[d.functions],ArrowFunctionExpression:b[d.functions],CallExpression:b[d.functions],NewExpression:b[d.functions]}}},Dh}var Ih,EC;function b3(){if(EC)return Ih;EC=1;const c=Ze();return Ih={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(s){const u=s.sourceCode,p=u.tokensAndComments,a={before:s.options[0]?s.options[0].before:!1,after:s.options[0]?s.options[0].after:!0},d=[];function v(o,y,O){s.report({node:o,fix(x){if(a[y])return y==="before"?x.insertTextBefore(o," "):x.insertTextAfter(o," ");let g,f;const b="";return y==="before"?(g=O.range[1],f=o.range[0]):(g=o.range[1],f=O.range[0]),x.replaceTextRange([g,f],b)},messageId:a[y]?"missing":"unexpected",data:{loc:y}})}function m(o){let y=u.getFirstToken(o);o.elements.forEach(O=>{let x;O===null?(x=u.getTokenAfter(y),c.isCommaToken(x)&&d.push(x)):x=u.getTokenAfter(O),y=x})}return{"Program:exit"(){p.forEach((o,y)=>{if(!c.isCommaToken(o))return;const O=p[y-1],x=p[y+1];O&&!c.isCommaToken(O)&&!d.includes(o)&&c.isTokenOnSameLine(O,o)&&a.before!==u.isSpaceBetweenTokens(O,o)&&v(o,"before",O),x&&!c.isCommaToken(x)&&!c.isClosingParenToken(x)&&!c.isClosingBracketToken(x)&&!c.isClosingBraceToken(x)&&!(!a.after&&x.type==="Line")&&c.isTokenOnSameLine(o,x)&&a.after!==u.isSpaceBetweenTokens(o,x)&&v(o,"after",x)})},ArrayExpression:m,ArrayPattern:m}}},Ih}var Rh,CC;function v3(){if(CC)return Rh;CC=1;const c=Ze();return Rh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(s){const u=s.options[0]||"last",p=s.sourceCode,a={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(s.options.length===2&&Object.hasOwn(s.options[1],"exceptions")){const O=Object.keys(s.options[1].exceptions);for(let x=0;x1||f){let b=p.getFirstToken(O);if(g.forEach(S=>{const E=S?p.getTokenBefore(S):b,k=S?p.getFirstToken(S):p.getTokenAfter(E),D=S||k;if(c.isCommaToken(E)&&m(b,E,k,D),S){const T=p.getTokenAfter(S,c.isNotClosingParenToken);b=T?p.getTokenBefore(T):p.ast.tokens.at(-1)}else b=k}),f){const S=p.getLastToken(O),E=p.getTokenBefore(S);c.isCommaToken(E)&&m(p.getTokenBefore(E),E,S,S)}}}const y={};return a.VariableDeclaration||(y.VariableDeclaration=function(O){o(O,"declarations")}),a.ObjectExpression||(y.ObjectExpression=function(O){o(O,"properties")}),a.ObjectPattern||(y.ObjectPattern=function(O){o(O,"properties")}),a.ArrayExpression||(y.ArrayExpression=function(O){o(O,"elements")}),a.ArrayPattern||(y.ArrayPattern=function(O){o(O,"elements")}),a.FunctionDeclaration||(y.FunctionDeclaration=function(O){o(O,"params")}),a.FunctionExpression||(y.FunctionExpression=function(O){o(O,"params")}),a.ArrowFunctionExpression||(y.ArrowFunctionExpression=function(O){o(O,"params")}),a.CallExpression||(y.CallExpression=function(O){o(O,"arguments")}),a.ImportDeclaration||(y.ImportDeclaration=function(O){o(O,"specifiers")}),a.NewExpression||(y.NewExpression=function(O){o(O,"arguments")}),y}},Rh}var Fh,wC;function Vi(){if(wC)return Fh;wC=1;const c=/^[\u0000-\u007f]*$/u;let s;function u(a){return a.length<=1?a.toUpperCase():a[0].toUpperCase()+a.slice(1)}function p(a){if(c.test(a))return a.length;s??(s=new Intl.Segmenter("en-US"));let d=0;for(const v of s.segment(a))d++;return d}return Fh={upperCaseFirst:u,getGraphemeCount:p},Fh}var _h,kC;function x3(){if(kC)return _h;kC=1;const c=Ze(),{upperCaseFirst:s}=Vi();return _h={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0},variant:{enum:["classic","modified"]}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=20,d="classic";typeof p=="object"?((Object.hasOwn(p,"maximum")||Object.hasOwn(p,"max"))&&(a=p.maximum||p.max),Object.hasOwn(p,"variant")&&(d=p.variant)):typeof p=="number"&&(a=p);const v=d==="modified",m=[];function o(){m[m.length-1]++}return{onCodePathStart(){m.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,AssignmentPattern:o,"SwitchCase[test]":()=>v||o(),SwitchStatement:()=>v&&o(),AssignmentExpression(y){c.isLogicalAssignmentOperator(y.operator)&&o()},MemberExpression(y){y.optional===!0&&o()},CallExpression(y){y.optional===!0&&o()},onCodePathEnd(y,O){const x=m.pop();if(!(y.origin!=="function"&&y.origin!=="class-field-initializer"&&y.origin!=="class-static-block")&&x>a){let g;y.origin==="class-field-initializer"?g="class field initializer":y.origin==="class-static-block"?g="class static block":g=c.getFunctionNameWithKind(O),u.report({node:O,messageId:"complex",data:{name:s(g),complexity:x,max:a}})}}}}},_h}var Bh,AC;function O3(){if(AC)return Bh;AC=1;const c=Ze();return Bh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/computed-property-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always",a=!s.options[1]||s.options[1].enforceForClassMembers;function d(x,g,f){s.report({node:x,loc:{start:g.loc.end,end:f.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:g.value},fix(b){return b.removeRange([g.range[1],f.range[0]])}})}function v(x,g,f){s.report({node:x,loc:{start:f.loc.end,end:g.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:g.value},fix(b){return b.removeRange([f.range[1],g.range[0]])}})}function m(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceAfter",data:{tokenValue:g.value},fix(f){return f.insertTextAfter(g," ")}})}function o(x,g){s.report({node:x,loc:g.loc,messageId:"missingSpaceBefore",data:{tokenValue:g.value},fix(f){return f.insertTextBefore(g," ")}})}function y(x){return function(g){if(!g.computed)return;const f=g[x],b=u.getTokenBefore(f,c.isOpeningBracketToken),S=u.getTokenAfter(b,{includeComments:!0}),E=u.getTokenAfter(f,c.isClosingBracketToken),k=u.getTokenBefore(E,{includeComments:!0});c.isTokenOnSameLine(b,S)&&(p?!u.isSpaceBetweenTokens(b,S)&&c.isTokenOnSameLine(b,S)&&m(g,b):u.isSpaceBetweenTokens(b,S)&&d(g,b,S)),c.isTokenOnSameLine(k,E)&&(p?!u.isSpaceBetweenTokens(k,E)&&c.isTokenOnSameLine(k,E)&&o(g,E):u.isSpaceBetweenTokens(k,E)&&v(g,E,k))}}const O={Property:y("key"),MemberExpression:y("property")};return a&&(O.MethodDefinition=O.PropertyDefinition=O.Property),O}},Bh}var Lh,PC;function S3(){if(PC)return Lh;PC=1;const c=Ze(),{upperCaseFirst:s}=Vi();function u(a){for(const d of a)if(d.reachable)return!1;return!0}function p(a){return a.type==="FunctionExpression"&&a.parent&&a.parent.type==="MethodDefinition"&&a.parent.kind==="constructor"}return Lh={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(a){const v=(a.options[0]||{}).treatUndefinedAsUnspecified===!0;let m=null;function o(y){let O,x;!m.hasReturnValue||u(m.currentSegments)||c.isES5Constructor(y)||p(y)||(y.type==="Program"?(O={line:1,column:0},x="program"):y.type==="ArrowFunctionExpression"?O=a.sourceCode.getTokenBefore(y.body,c.isArrowToken).loc:y.parent.type==="MethodDefinition"||y.parent.type==="Property"&&y.parent.method?O=y.parent.key.loc:O=(y.id||a.sourceCode.getFirstToken(y)).loc,x||(x=c.getFunctionNameWithKind(y)),a.report({node:y,loc:O,messageId:"missingReturn",data:{name:x}}))}return{onCodePathStart(y,O){m={upper:m,codePath:y,hasReturn:!1,hasReturnValue:!1,messageId:"",node:O,currentSegments:new Set}},onCodePathEnd(){m=m.upper},onUnreachableCodePathSegmentStart(y){m.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){m.currentSegments.delete(y)},onCodePathSegmentStart(y){m.currentSegments.add(y)},onCodePathSegmentEnd(y){m.currentSegments.delete(y)},ReturnStatement(y){const O=y.argument;let x=!!O;v&&x&&(x=!c.isSpecificId(O,"undefined")&&O.operator!=="void"),m.hasReturn?m.hasReturnValue!==x&&a.report({node:y,messageId:m.messageId,data:m.data}):(m.hasReturn=!0,m.hasReturnValue=x,m.messageId=x?"missingReturnValue":"unexpectedReturnValue",m.data={name:m.node.type==="Program"?"Program":s(c.getFunctionNameWithKind(m.node))})},"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},Lh}var Nh,TC;function E3(){return TC||(TC=1,Nh={meta:{type:"suggestion",docs:{description:"Enforce consistent naming when capturing the current execution context",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-this"},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0},messages:{aliasNotAssignedToThis:"Designated alias '{{name}}' is not assigned to 'this'.",unexpectedAlias:"Unexpected alias '{{name}}' for 'this'."}},create(c){let s=[];const u=c.sourceCode;c.options.length===0?s.push("that"):s=c.options;function p(m,o){c.report({node:m,messageId:"aliasNotAssignedToThis",data:{name:o}})}function a(m,o,y){const O=y.type==="ThisExpression";s.includes(o)?(!O||m.operator&&m.operator!=="=")&&p(m,o):O&&c.report({node:m,messageId:"unexpectedAlias",data:{name:o}})}function d(m,o){const y=o.set.get(m);y&&(y.defs.some(O=>O.node.type==="VariableDeclarator"&&O.node.init!==null)||y.references.some(O=>{const x=O.writeExpr;return O.from===o&&x&&x.type==="ThisExpression"&&x.parent.operator==="="})||y.defs.map(O=>O.node).forEach(O=>{p(O,m)}))}function v(m){const o=u.getScope(m);s.forEach(y=>{d(y,o)})}return{"Program:exit":v,"FunctionExpression:exit":v,"FunctionDeclaration:exit":v,VariableDeclarator(m){const o=m.id,y=o.type==="ArrayPattern"||o.type==="ObjectPattern";m.init!==null&&!y&&a(m,o.name,m.init)},AssignmentExpression(m){m.left.type==="Identifier"&&a(m,m.left.name,m.right)}}}}),Nh}var Mh,DC;function C3(){if(DC)return Mh;DC=1;function c(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}function s(p){if(!p)return!1;switch(p.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return p.name!=="undefined";case"AssignmentExpression":return["=","&&="].includes(p.operator)?s(p.right):["||=","??="].includes(p.operator)?s(p.left)||s(p.right):!1;case"LogicalExpression":return p.operator==="&&"?s(p.right):s(p.left)||s(p.right);case"ConditionalExpression":return s(p.alternate)||s(p.consequent);case"SequenceExpression":{const a=p.expressions.at(-1);return s(a)}default:return!1}}class u{constructor(){or(this,"calledInEveryPaths",!1);or(this,"calledInSomePaths",!1);or(this,"validNodes",[])}}return Mh={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor."}},create(p){let a=null;const d=Object.create(null);function v(y){return y.reachable&&d[y.id].calledInSomePaths}function m(y){return!!d[y.id]}function o(y){return y.reachable&&d[y.id].calledInEveryPaths}return{onCodePathStart(y,O){if(c(O)){const g=O.parent.parent.parent.superClass;a={upper:a,isConstructor:!0,hasExtends:!!g,superIsConstructor:s(g),codePath:y,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:y,currentSegments:new Set}},onCodePathEnd(y,O){const x=a.hasExtends;if(a=a.upper,!x)return;const g=y.returnedSegments,f=g.every(o),b=g.some(v);f||p.report({messageId:b?"missingSome":"missingAll",node:O.parent})},onCodePathSegmentStart(y,O){if(a.currentSegments.add(y),!(a.isConstructor&&a.hasExtends))return;const x=d[y.id]=new u,g=y.prevSegments.filter(m);g.length>0&&(x.calledInSomePaths=g.some(v),x.calledInEveryPaths=g.every(o)),O.parent&&O.parent.type==="ForStatement"&&O.parent.update===O&&(x.calledInEveryPaths=!0)},onUnreachableCodePathSegmentStart(y){a.currentSegments.add(y)},onUnreachableCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentEnd(y){a.currentSegments.delete(y)},onCodePathSegmentLoop(y,O){a.isConstructor&&a.hasExtends&&a.codePath.traverseSegments({first:O,last:y},(x,g)=>{const f=d[x.id];if(!f){g.skip();return}const b=x.prevSegments.filter(m),S=b.some(v),E=b.every(o);if(f.calledInSomePaths||(f.calledInSomePaths=S),f.calledInEveryPaths||(f.calledInEveryPaths=E),S){const k=f.validNodes;f.validNodes=[];for(let D=0;D0}else P=!o(D);else P=!0;return{actual:F,expected:P,check(){this.expected!==null&&this.expected!==this.actual&&(this.expected?s.report({node:k,loc:D.loc,messageId:R&&R.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:T},fix:N=>N.replaceText(D,`{${v.getText(D)}}`)}):s.report({node:k,loc:D.loc,messageId:R&&R.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:T},fix(N){const I=k.type==="DoWhileStatement"&&v.getTokenBefore(D).range[1]===D.range[0]&&!c.canTokensBeAdjacent("do",v.getFirstToken(D,{skip:1})),L=v.getFirstToken(D),j=v.getLastToken(D),G=v.getTokenBefore(j);if(g(j))return null;const U=v.getText().slice(L.range[1],G.range[0])+v.getText(G)+v.getText().slice(G.range[1],j.range[0]);return N.replaceText(D,(I?" ":"")+U)}}))}}}function E(k){const D=[];for(let T=k;T;T=T.alternate)if(D.push(S(T,T.consequent,"if",{condition:!0})),T.alternate&&T.alternate.type!=="IfStatement"){D.push(S(T,T.alternate,"else"));break}if(d){const T=D.some(R=>R.expected!==null?R.expected:R.actual);D.forEach(R=>{R.expected=T})}return D}return{IfStatement(k){const D=k.parent;D.type==="IfStatement"&&D.alternate===k||E(k).forEach(R=>{R.check()})},WhileStatement(k){S(k,k.body,"while",{condition:!0}).check()},DoWhileStatement(k){S(k,k.body,"do").check()},ForStatement(k){S(k,k.body,"for",{condition:!0}).check()},ForInStatement(k){S(k,k.body,"for-in").check()},ForOfStatement(k){S(k,k.body,"for-of").check()}}}},$h}var jh,RC;function k3(){if(RC)return jh;RC=1;const c=/^no default$/iu;return jh={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(s){const u=s.options[0]||{},p=u.commentPattern?new RegExp(u.commentPattern,"u"):c,a=s.sourceCode;function d(v){return v.at(-1)}return{SwitchStatement(v){if(!v.cases.length)return;if(!v.cases.some(o=>o.test===null)){let o;const y=d(v.cases),O=a.getCommentsAfter(y);O.length&&(o=d(O)),(!o||!p.test(o.value.trim()))&&s.report({node:v,messageId:"missingDefaultCase"})}}}}},jh}var qh,FC;function A3(){return FC||(FC=1,qh={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(c){return{SwitchStatement(s){const u=s.cases,p=u.findIndex(a=>a.test===null);if(p!==-1&&p!==u.length-1){const a=u[p];c.report({node:a,messageId:"notLast"})}}}}}),qh}var Qh,_C;function P3(){return _C||(_C=1,Qh={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(c){function s(u){let p=!1;for(let a=u.params.length-1;a>=0;a-=1){const d=u.params[a];if(d.type!=="AssignmentPattern"&&d.type!=="RestElement"){p=!0;continue}p&&d.type==="AssignmentPattern"&&c.report({node:d,messageId:"shouldBeLast"})}}return{FunctionDeclaration:s,FunctionExpression:s,ArrowFunctionExpression:s}}}),Qh}var Uh,BC;function T3(){if(BC)return Uh;BC=1;const c=Ze();return Uh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(s){const u=s.options[0],p=u==="object"||!u,a=s.sourceCode;function d(m){const o=m.property,y=a.getTokenBefore(o);if(p){const O=a.getTokenBefore(y);c.isTokenOnSameLine(O,y)||s.report({node:m,loc:y.loc,messageId:"expectedDotAfterObject",*fix(x){y.value.startsWith(".")&&c.isDecimalIntegerNumericToken(O)?yield x.insertTextAfter(O,` ${y.value}`):yield x.insertTextAfter(O,y.value),yield x.remove(y)}})}else c.isTokenOnSameLine(y,o)||s.report({node:m,loc:y.loc,messageId:"expectedDotBeforeProperty",*fix(O){yield O.remove(y),yield O.insertTextBefore(o,y.value)}})}function v(m){m.computed||d(m)}return{MemberExpression:v}}},Uh}var Vh,LC;function Wh(){return LC||(LC=1,Vh=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"]),Vh}var Gh,NC;function D3(){if(NC)return Gh;NC=1;const c=Ze(),s=Wh(),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,p=new Set(["string","boolean"]);return Gh={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(a){const d=a.options[0]||{},v=d.allowKeywords===void 0||d.allowKeywords,m=a.sourceCode;let o;d.allowPattern&&(o=new RegExp(d.allowPattern,"u"));function y(O,x){if(u.test(x)&&(v||!s.includes(String(x)))&&!(o&&o.test(x))){const g=O.property.type==="Literal"?JSON.stringify(x):`\`${x}\``;a.report({node:O.property,messageId:"useDot",data:{key:g},*fix(f){const b=m.getTokenAfter(O.object,c.isOpeningBracketToken),S=m.getLastToken(O),E=m.getTokenAfter(O);m.commentsExistBetween(b,S)||(O.optional||(yield f.insertTextBefore(b,c.isDecimalInteger(O.object)?" .":".")),yield f.replaceTextRange([b.range[0],S.range[1]],x),E&&S.range[1]===E.range[0]&&!c.canTokensBeAdjacent(String(x),E)&&(yield f.insertTextAfter(O," ")))}})}}return{MemberExpression(O){O.computed&&O.property.type==="Literal"&&(p.has(typeof O.property.value)||c.isNullLiteral(O.property))&&y(O,O.property.value),O.computed&&c.isStaticTemplateLiteral(O.property)&&y(O,O.property.quasis[0].value.cooked),!v&&!O.computed&&O.property.type==="Identifier"&&s.includes(String(O.property.name))&&a.report({node:O.property,messageId:"useBrackets",data:{key:O.property.name},*fix(x){const g=m.getTokenBefore(O.property);O.object.type==="Identifier"&&O.object.name==="let"&&!O.optional||m.commentsExistBetween(g,O.property)||(O.optional||(yield x.remove(g)),yield x.replaceText(O.property,`["${O.property.name}"]`))}})}}}},Gh}var zh,MC;function I3(){return MC||(MC=1,zh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(c){return{Program:function(u){const p=c.sourceCode,a=p.getText(),d=p.lines.at(-1),v={column:d.length,line:p.lines.length},m=` +`,o=`\r${m}`,y=a.endsWith(m);if(!a.length)return;let O=c.options[0]||"always",x=!1;if(O==="unix"&&(O="always"),O==="windows"&&(O="always",x=!0),O==="always"&&!y)c.report({node:u,loc:v,messageId:"missing",fix(g){return g.insertTextAfterRange([0,a.length],x?o:m)}});else if(O==="never"&&y){const g=p.lines.at(-2);c.report({node:u,loc:{start:{line:p.lines.length-1,column:g.length},end:{line:p.lines.length,column:0}},messageId:"unexpected",fix(f){const b=/(?:\r?\n)+$/u,S=b.exec(p.text),E=S.index,k=p.text.length;return f.replaceTextRange([E,k],"")}})}}}}}),zh}var Zh,$C;function R3(){if($C)return Zh;$C=1;const c=Ze();return Zh={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(s){const u=s.options[0]||"always",p=s.options[1]||{},a=s.sourceCode,d=u==="always"?p.null||"always":"ignore",v=d==="always",m=d==="never";function o(f){return f.type==="UnaryExpression"&&f.operator==="typeof"}function y(f){return o(f.left)||o(f.right)}function O(f){return f.left.type==="Literal"&&f.right.type==="Literal"&&typeof f.left.value==typeof f.right.value}function x(f){return c.isNullLiteral(f.right)||c.isNullLiteral(f.left)}function g(f,b){const S=a.getFirstTokenBetween(f.left,f.right,E=>E.value===f.operator);s.report({node:f,loc:S.loc,messageId:"unexpected",data:{expectedOperator:b,actualOperator:f.operator},fix(E){return y(f)||O(f)?E.replaceText(S,b):null}})}return{BinaryExpression(f){const b=x(f);if(f.operator!=="=="&&f.operator!=="!="){m&&b&&g(f,f.operator.slice(0,-1));return}u==="smart"&&(y(f)||O(f)||b)||!v&&b||g(f,`${f.operator}=`)}}}},Zh}var Xh,jC;function F3(){if(jC)return Xh;jC=1;const{getStaticValue:c}=Kr();return Xh={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(s){const{sourceCode:u}=s;function p(m){s.report({node:m,messageId:"incorrectDirection"})}function a(m,o){const y=c(m.right,u.getScope(m));if(y&&["bigint","boolean","number"].includes(typeof y.value)){const O=Math.sign(Number(y.value))||0;return o*O}return 0}function d(m,o){if(m.argument.type==="Identifier"&&m.argument.name===o){if(m.operator==="++")return 1;if(m.operator==="--")return-1}return 0}function v(m,o){if(m.left.name===o){if(m.operator==="+=")return a(m,1);if(m.operator==="-=")return a(m,-1)}return 0}return{ForStatement(m){if(m.test&&m.test.type==="BinaryExpression"&&m.update)for(const o of["left","right"]){if(m.test[o].type!=="Identifier")continue;const y=m.test[o].name,O=m.test.operator,x=m.update;let g;if(O==="<"||O==="<=")g=o==="left"?-1:1;else if(O===">"||O===">=")g=o==="left"?1:-1;else return;x.type==="UpdateExpression"?d(x,y)===g&&p(m):x.type==="AssignmentExpression"&&v(x,y)===g&&p(m)}}}}},Xh}var Yh,qC;function _3(){if(qC)return Yh;qC=1;const c=Ze();return Yh={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(s){const u=s.options[0]!=="always",p=!u&&s.options[1]&&s.options[1].allowNewlines,a=s.sourceCode,d=a.getText();function v(m,o,y){const O=d.slice(o.range[1],y.range[0]).replace(/\/\*.*?\*\//gu,""),x=/\s/u.test(O),g=x&&c.LINEBREAK_MATCHER.test(O);u&&x?s.report({node:m,loc:{start:o.loc.end,end:{line:y.loc.start.line,column:y.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(f){return a.commentsExistBetween(o,y)?null:m.optional?f.replaceTextRange([o.range[1],y.range[0]],"?."):g?null:f.removeRange([o.range[1],y.range[0]])}}):!u&&!x?s.report({node:m,loc:{start:{line:o.loc.end.line,column:o.loc.end.column-1},end:y.loc.start},messageId:"missing",fix(f){return m.optional?null:f.insertTextBefore(y," ")}}):!u&&!p&&g&&s.report({node:m,loc:{start:o.loc.end,end:y.loc.start},messageId:"unexpectedNewline",fix(f){if(!m.optional||a.commentsExistBetween(o,y))return null;const b=[o.range[1],y.range[0]],S=a.getTokenAfter(o);return S.range[0]===o.range[1]?f.replaceTextRange(b,"?. "):S.range[1]===y.range[0]?f.replaceTextRange(b," ?."):f.replaceTextRange(b," ?. ")}})}return{"CallExpression, NewExpression"(m){const o=a.getLastToken(m),y=a.getLastToken(m.callee),O=a.getFirstTokenBetween(y,o,c.isOpeningParenToken),x=O&&a.getTokenBefore(O,c.isNotQuestionDotToken);O&&O.range[1]=2015?s.keyword.isIdentifierES6(v):s.keyword.isIdentifierES5(v)}const a={enum:["always","never"]},d={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return Hh={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[a,d]},{type:"array",additionalItems:!1,items:[d]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(v){const m=(typeof v.options[0]=="object"?v.options[0]:v.options[1])||{},o=typeof v.options[0]=="string"?v.options[0]:"always",y=m.considerPropertyDescriptor,O=m.includeCommonJSModuleExports,x=v.languageOptions.ecmaVersion;function g(E,k,D){return D?D.type==="CallExpression"&&c.isSpecificMemberAccess(D.callee,E,k):!1}function f(E,k){return o==="always"&&E!==k||o==="never"&&E===k}function b(E,k,D,T){let R;o==="always"&&T?R="matchProperty":o==="always"?R="matchVariable":T?R="notMatchProperty":R="notMatchVariable",v.report({node:E,messageId:R,data:{name:k,funcName:D}})}function S(E){return E.type==="Literal"&&typeof E.value=="string"}return{VariableDeclarator(E){!E.init||E.init.type!=="FunctionExpression"||E.id.type!=="Identifier"||E.init.id&&f(E.id.name,E.init.id.name)&&b(E,E.id.name,E.init.id.name,!1)},AssignmentExpression(E){if(E.right.type!=="FunctionExpression"||E.left.computed&&E.left.property.type!=="Literal"||!O&&u(E.left)||E.left.type!=="Identifier"&&E.left.type!=="MemberExpression")return;const k=E.left.type==="MemberExpression",D=k?c.getStaticPropertyName(E.left):E.left.name;E.right.id&&D&&p(D)&&f(D,E.right.id.name)&&b(E,D,E.right.id.name,k)},"Property, PropertyDefinition[value]"(E){if(E.value.type==="FunctionExpression"&&E.value.id){if(E.key.type==="Identifier"&&!E.computed){const k=E.value.id.name;let D=E.key.name;if(y&&D==="value"&&E.parent.type==="ObjectExpression")if(g("Object","defineProperty",E.parent.parent)||g("Reflect","defineProperty",E.parent.parent)){const T=E.parent.parent.arguments[1];S(T)&&f(T.value,k)&&b(E,T.value,k,!0)}else g("Object","defineProperties",E.parent.parent.parent.parent)||g("Object","create",E.parent.parent.parent.parent)?(D=E.parent.parent.key.name,!E.parent.parent.computed&&f(D,k)&&b(E,D,k,!0)):f(D,k)&&b(E,D,k,!0);else f(D,k)&&b(E,D,k,!0);return}S(E.key)&&p(E.key.value,x)&&f(E.key.value,E.value.id.name)&&b(E,E.key.value,E.value.id.name,!0)}}}}},Hh}var Kh,UC;function L3(){if(UC)return Kh;UC=1;const c=Ze();function s(u){return u&&u.defs[0].type==="FunctionName"}return Kh={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(u){const p=u.sourceCode;function a(O){return O.generator&&u.options.length>1&&u.options[1].generators?u.options[1].generators:u.options[0]||"always"}function d(O){const x=O.parent;return x.type==="MethodDefinition"||x.type==="Property"&&(x.method||x.kind==="get"||x.kind==="set")}function v(O){const x=O.parent;return d(O)||x.type==="VariableDeclarator"&&x.id.type==="Identifier"&&x.init===O||x.type==="Property"&&x.value===O||x.type==="PropertyDefinition"&&x.value===O||x.type==="AssignmentExpression"&&x.left.type==="Identifier"&&x.right===O||x.type==="AssignmentPattern"&&x.left.type==="Identifier"&&x.right===O}function m(O){u.report({node:O,messageId:"unnamed",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function o(O){u.report({node:O,messageId:"named",loc:c.getFunctionHeadLoc(O,p),data:{name:c.getFunctionNameWithKind(O)}})}function y(O){const x=p.getDeclaredVariables(O)[0];if(s(x)&&x.references.length>0)return;const g=!!(O.id&&O.id.name),f=a(O);f==="never"?g&&O.type!=="FunctionDeclaration"&&o(O):f==="as-needed"?!g&&!v(O)&&m(O):!g&&!d(O)&&m(O)}return{"FunctionExpression:exit":y,"ExportDefaultDeclaration > FunctionDeclaration":y}}},Kh}var Jh,VC;function N3(){return VC||(VC=1,Jh={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions assigned to variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1},overrides:{type:"object",properties:{namedExports:{enum:["declaration","expression","ignore"]}},additionalProperties:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(c){const s=c.options[0],u=c.options[1]&&c.options[1].allowArrowFunctions,p=s==="declaration",a=c.options[1]&&c.options[1].overrides&&c.options[1].overrides.namedExports,d=[],v={FunctionDeclaration(m){d.push(!1),!p&&m.parent.type!=="ExportDefaultDeclaration"&&(typeof a>"u"||m.parent.type!=="ExportNamedDeclaration")&&c.report({node:m,messageId:"expression"}),m.parent.type==="ExportNamedDeclaration"&&a==="expression"&&c.report({node:m,messageId:"expression"})},"FunctionDeclaration:exit"(){d.pop()},FunctionExpression(m){d.push(!1),p&&m.parent.type==="VariableDeclarator"&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.type==="VariableDeclarator"&&m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"})},"FunctionExpression:exit"(){d.pop()},"ThisExpression, Super"(){d.length>0&&(d[d.length-1]=!0)}};return u||(v.ArrowFunctionExpression=function(){d.push(!1)},v["ArrowFunctionExpression:exit"]=function(m){!d.pop()&&m.parent.type==="VariableDeclarator"&&(p&&(typeof a>"u"||m.parent.parent.parent.type!=="ExportNamedDeclaration")&&c.report({node:m.parent,messageId:"declaration"}),m.parent.parent.parent.type==="ExportNamedDeclaration"&&a==="declaration"&&c.report({node:m.parent,messageId:"declaration"}))}),v}}),Jh}var ed,WC;function M3(){return WC||(WC=1,ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(c){const s=c.sourceCode,u={unexpected:{messageId:"unexpectedLineBreak",check:(d,v)=>d.loc.end.line!==v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]]," ")},missing:{messageId:"missingLineBreak",check:(d,v)=>d.loc.end.line===v.loc.start.line,createFix:(d,v)=>m=>m.replaceTextRange([v.range[1],d.range[0]],` +`)}};function p(d,v){for(let m=1;mS!==g.length-1&&b.loc.end.line!==g[S+1].loc.start.line):v?f:g.length>=m}function y(g,f){const b=g.leftParen,S=g.rightParen,E=u.getTokenAfter(b),k=u.getTokenBefore(S),D=!c.isTokenOnSameLine(b,E),T=!c.isTokenOnSameLine(k,S),R=o(f,D);D&&!R?s.report({node:b,messageId:"unexpectedAfter",fix(F){return u.getText().slice(b.range[1],E.range[0]).trim()?null:F.removeRange([b.range[1],E.range[0]])}}):!D&&R&&s.report({node:b,messageId:"expectedAfter",fix:F=>F.insertTextAfter(b,` +`)}),T&&!R?s.report({node:S,messageId:"unexpectedBefore",fix(F){return u.getText().slice(k.range[1],S.range[0]).trim()?null:F.removeRange([k.range[1],S.range[0]])}}):!T&&R&&s.report({node:S,messageId:"expectedBefore",fix:F=>F.insertTextBefore(S,` +`)})}function O(g,f){const b=g.leftParen,S=u.getTokenAfter(b),E=!c.isTokenOnSameLine(b,S),k=o(f,E);for(let D=0;D<=f.length-2;D++){const T=f[D],R=f[D+1];!(T.loc.end.line!==R.loc.start.line)&&k&&s.report({node:T,messageId:"expectedBetween",fix:P=>P.insertTextBefore(R,` +`)})}}function x(g){switch(g.type){case"NewExpression":if(!g.arguments.length&&!(c.isOpeningParenToken(u.getLastToken(g,{skip:1}))&&c.isClosingParenToken(u.getLastToken(g))&&g.callee.range[1]v.identifier.range[0]===a.range[0]&&v.identifier.range[1]===a.range[1]);return d.length===1?d[0]:null}function u(p,a){const d=s(p,a);return d&&d.resolved&&d.resolved.defs.length>0}return sd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(p){const a=p.sourceCode;return{CallExpression(d){const v=a.getScope(d);d.callee.name==="require"&&!u(v,d.callee)&&(a.getAncestors(d).every(o=>c.has(o.type))||p.report({node:d,messageId:"unexpected"}))}}}},sd}var id,YC;function U3(){if(YC)return id;YC=1;const c=Ze();function s(a,d){if(a.length!==d.length)return!1;for(let v=0;v1?m("notGrouped",T,R):(d==="getBeforeSet"&&k>D||d==="setBeforeGet"&&kO.type==="Property")},ClassBody(y){o(y.body,O=>O.type==="MethodDefinition"&&!O.static),o(y.body,O=>O.type==="MethodDefinition"&&O.static)}}}},id}var ad,HC;function V3(){return HC||(HC=1,ad={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(c){return{ForInStatement(s){const u=s.body;if(u.type!=="EmptyStatement"&&u.type!=="IfStatement"&&!(u.type==="BlockStatement"&&u.body.length===0)&&!(u.type==="BlockStatement"&&u.body.length===1&&u.body[0].type==="IfStatement")){if(u.type==="BlockStatement"&&u.body.length>=1&&u.body[0].type==="IfStatement"){const p=u.body[0];if(p.consequent.type==="ContinueStatement"||p.consequent.type==="BlockStatement"&&p.consequent.body.length===1&&p.consequent.body[0].type==="ContinueStatement")return}c.report({node:s,messageId:"wrap"})}}}}}),ad}var od,KC;function W3(){return KC||(KC=1,od={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(c){const s=c.options[0]||"err",u=c.sourceCode;function p(m){return m[0]==="^"}function a(m){return p(s)?new RegExp(s,"u").test(m):m===s}function d(m){return m.variables.filter(o=>o.defs[0]&&o.defs[0].type==="Parameter")}function v(m){const o=u.getScope(m),y=d(o),O=y[0];O&&a(O.name)&&O.references.length===0&&c.report({node:m,messageId:"expected"})}return{FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v}}}),od}var ld,JC;function G3(){if(JC)return ld;JC=1;function c(a){const d=a.parent;return d.type==="AssignmentExpression"&&d.left===a||d.type==="ArrayPattern"||d.type==="RestElement"||d.type==="Property"&&d.value===a&&d.parent.type==="ObjectPattern"||d.type==="AssignmentPattern"&&d.left===a}function s(a){const d=a.parent;return d.type==="ImportSpecifier"&&d.imported!==d.local&&d.imported===a||d.type==="ExportSpecifier"&&d.parent.source&&d.local!==d.exported&&d.local===a}function u(a){const d=a.parent;return!d.computed&&d.type==="Property"&&d.parent.type==="ObjectPattern"&&d.value!==a&&d.key===a}function p(a){const d=a.parent;return d.type==="Property"&&d.parent.type==="ObjectExpression"&&d.shorthand}return ld={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(a){const d=new Set(a.options),v=new Set,m=a.sourceCode;let o;function y(f){return d.has(f)}function O(f){const b=o.set.get(f.name);return b&&b.defs.length===0&&b.references.some(S=>S.identifier===f)}function x(f){const b=f.parent;return b.type==="MemberExpression"&&b.property===f&&!b.computed?c(b):b.type!=="CallExpression"&&b.type!=="NewExpression"&&!s(f)&&!u(f)&&!(O(f)&&!p(f))}function g(f){v.has(f.range.toString())||(a.report({node:f,messageId:"restricted",data:{name:f.name}}),v.add(f.range.toString()))}return{Program(f){o=m.getScope(f)},Identifier(f){y(f.name)&&x(f)&&g(f)}}}},ld}var ud,ew;function z3(){if(ew)return ud;ew=1;function c(p){const a=p.parent;return a.type==="AssignmentExpression"&&a.left===p||a.type==="ArrayPattern"||a.type==="RestElement"||a.type==="Property"&&a.value===p&&a.parent.type==="ObjectPattern"||a.type==="AssignmentPattern"&&a.left===p}function s(p){const a=p.parent;return a.type==="ImportSpecifier"&&a.imported!==a.local&&a.imported===p||a.type==="ExportSpecifier"&&a.parent.source&&a.local!==a.exported&&a.local===p}function u(p){const a=p.parent;return!a.computed&&a.type==="Property"&&a.parent.type==="ObjectPattern"&&a.key===p}return ud={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(p){const a=new Set(p.options),d=new Set,v=p.sourceCode;let m;function o(g){return a.has(g)}function y(g){const f=m.set.get(g.name);return f&&f.defs.length===0&&f.references.some(b=>b.identifier===g)}function O(g){const f=g.parent;return f.type==="MemberExpression"&&f.property===g&&!f.computed?c(f):f.type!=="CallExpression"&&f.type!=="NewExpression"&&!s(g)&&!u(g)&&!y(g)}function x(g){if(!d.has(g.range.toString())){const f=g.type==="PrivateIdentifier";p.report({node:g,messageId:f?"restrictedPrivate":"restricted",data:{name:g.name}}),d.add(g.range.toString())}}return{Program(g){m=v.getScope(g)},[["Identifier","PrivateIdentifier"]](g){o(g.name)&&O(g)&&x(g)}}}},ud}var cd,tw;function Z3(){if(tw)return cd;tw=1;const{getGraphemeCount:c}=Vi(),{getModuleExportName:s}=Ze();return cd={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(u){const p=u.options[0]||{},a=typeof p.min<"u"?p.min:2,d=typeof p.max<"u"?p.max:1/0,v=p.properties!=="never",m=new Set(p.exceptions),o=(p.exceptionPatterns||[]).map(g=>new RegExp(g,"u")),y=new Set;function O(g){return o.some(f=>f.test(g))}const x={MemberExpression:v&&function(g){return!g.computed&&(g.parent.left===g&&g.parent.type==="AssignmentExpression"||g.parent.type==="Property"&&g.parent.value===g&&g.parent.parent.type==="ObjectPattern"&&g.parent.parent.parent.left===g.parent.parent)},AssignmentPattern(g,f){return g.left===f},VariableDeclarator(g,f){return g.id===f},Property(g,f){if(g.parent.type==="ObjectPattern"){const b=g.value.name===g.key.name;return!b&&g.value===f||b&&g.key===f&&v}return v&&!g.computed&&g.key.name===f.name},ImportSpecifier(g,f){return g.local===f&&s(g.imported)!==s(g.local)},ImportDefaultSpecifier:!0,ImportNamespaceSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](g){const f=g.name,b=g.parent,S=c(f),E=Sd;if(!(E||k)||m.has(f)||O(f))return;const D=x[b.type];if(D&&!y.has(g.range.toString())&&(D===!0||D(b,g))){y.add(g.range.toString());let T=E?"tooShort":"tooLong";g.type==="PrivateIdentifier"&&(T+="Private"),u.report({node:g,messageId:T,data:{name:f,min:a,max:d}})}}}}},cd}var fd,rw;function X3(){return rw||(rw=1,fd={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(c){const s=c.options[0]||"^.+$",u=new RegExp(s,"u"),p=c.options[1]||{},a=!!p.properties,d=!!p.classFields,v=!!p.onlyDeclarations,m=!!p.ignoreDestructuring,o=c.sourceCode;let y;const O=new Set,x=new Set(["CallExpression","NewExpression"]),g=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function b(T){const R=y.set.get(T.name);return R&&R.defs.length===0&&R.references.some(F=>F.identifier===T)}function S(T){return!u.test(T)}function E(T){let{parent:R}=T;for(;R;){if(R.type==="ObjectPattern")return!0;R=R.parent}return!1}function k(T,R){return(!v||g.has(T.type))&&!x.has(T.type)&&S(R)}function D(T){if(!O.has(T.range.toString())){const R=T.type==="PrivateIdentifier"?"notMatchPrivate":"notMatch";c.report({node:T,messageId:R,data:{name:T.name,pattern:s}}),O.add(T.range.toString())}}return{Program(T){y=o.getScope(T)},Identifier(T){const R=T.name,F=T.parent,P=F.type==="MemberExpression"?F.parent:F;if(!b(T))if(F.type==="MemberExpression"){if(!a)return;F.object.type==="Identifier"&&F.object.name===R||P.type==="AssignmentExpression"&&P.left.type==="MemberExpression"&&P.left.property.name===T.name?S(R)&&D(T):P.type==="AssignmentExpression"&&P.right.type!=="MemberExpression"&&S(R)&&D(T)}else if(F.type==="Property"&&F.parent.type==="ObjectExpression"&&F.key===T&&!F.computed)a&&S(R)&&D(T);else if(F.type==="Property"||F.type==="AssignmentPattern"){if(F.parent&&F.parent.type==="ObjectPattern"){!m&&F.shorthand&&F.value.left&&S(R)&&D(T);const N=F.key.name===F.value.name;if(!N&&F.key===T)return;F.value.name&&S(R)&&!(N&&m)&&D(T)}if(!a&&!F.computed||m&&E(T))return;F.right!==T&&k(P,R)&&D(T)}else f.has(F.type)?F.local&&F.local.name===T.name&&S(R)&&D(T):F.type==="PropertyDefinition"?d&&S(R)&&D(T):k(P,R)&&D(T)},PrivateIdentifier(T){T.parent.type==="PropertyDefinition"&&!d||S(T.name)&&D(T)}}}}),fd}var pd,nw;function Y3(){if(nw)return pd;nw=1;const{isCommentToken:c,isNotOpeningParenToken:s}=Ze();return pd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(u){const p=u.sourceCode,a=u.options[0]||"beside";function d(v){if(v.body.type==="BlockStatement")return;const m=p.getTokenBefore(v.body,s),o=p.getTokenAfter(m);m.loc.end.line===o.loc.start.line&&a==="below"?u.report({node:o,messageId:"expected",fix:y=>y.insertTextBefore(o,` +`)}):m.loc.end.line!==o.loc.start.line&&a==="beside"&&u.report({node:o,messageId:"unexpected",fix(y){return p.getFirstTokenBetween(m,o,{includeComments:!0,filter:c})?null:y.replaceTextRange([m.range[1],o.range[0]]," ")}})}return{ArrowFunctionExpression:v=>d(v)}}},pd}var hd,sw;function H3(){if(sw)return hd;sw=1;const c=Ze(),s=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class u{constructor(m){this._values=Array(m+1)}insert(m,o){this._values[m]=o}findLastNotAfter(m){const o=this._values;for(let y=m;y>=0;y--){const O=o[y];if(O)return O}}deleteRange(m,o){this._values.fill(void 0,m,o)}}class p{constructor(m){this.sourceCode=m,this.firstTokensByLineNumber=new Map;const o=m.tokensAndComments;for(let y=0;y=m[0]&&o.range[1]<=m[1],b=f&&this._getOffsetDescriptor(o);this._indexMap.deleteRange(m[0]+1,m[1]),this._indexMap.insert(m[0],x),f&&(this._indexMap.insert(o.range[0],b),this._indexMap.insert(o.range[1],x)),this._indexMap.insert(m[1],g)}getDesiredIndent(m){if(!this._desiredIndentCache.has(m))if(this._ignoredTokens.has(m))this._desiredIndentCache.set(m,this._tokenInfo.getTokenIndent(m));else if(this._lockedFirstTokens.has(m)){const o=this._lockedFirstTokens.get(m);this._desiredIndentCache.set(m,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(o))+this._indentType.repeat(o.loc.start.column-this._tokenInfo.getFirstTokenOfLine(o).loc.start.column))}else{const o=this._getOffsetDescriptor(m),y=o.from&&o.from.loc.start.line===m.loc.start.line&&!/^\s*?\n/u.test(m.value)&&!o.force?0:o.offset*this._indentSize;this._desiredIndentCache.set(m,(o.from?this.getDesiredIndent(o.from):"")+this._indentType.repeat(y))}return this._desiredIndentCache.get(m)}ignoreToken(m){this._tokenInfo.isFirstTokenOfLine(m)&&this._ignoredTokens.add(m)}getFirstDependency(m){return this._getOffsetDescriptor(m).from}}const d={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return hd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[d,{type:"object",properties:{var:d,let:d,const:d},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:d,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:d},additionalProperties:!1},ArrayExpression:d,ObjectExpression:d,ImportDeclaration:d,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(v){let O="space",x=4;const g={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};v.options.length&&(v.options[0]==="tab"?(x=1,O="tab"):(x=v.options[0],O="space"),v.options[1]&&(Object.assign(g,v.options[1]),(typeof g.VariableDeclarator=="number"||g.VariableDeclarator==="first")&&(g.VariableDeclarator={var:g.VariableDeclarator,let:g.VariableDeclarator,const:g.VariableDeclarator})));const f=v.sourceCode,b=new p(f),S=new a(b,x,O==="space"?" ":" ",f.text.length),E=new WeakSet;function k(z,ue,ne){const ce=`${z} ${O}${z===1?"":"s"}`,pe=`space${ue===1?"":"s"}`,Be=`tab${ne===1?"":"s"}`;let oe;return ue>0?oe=O==="space"?ue:`${ue} ${pe}`:ne>0?oe=O==="tab"?ne:`${ne} ${Be}`:oe="0",{expected:ce,actual:oe}}function D(z,ue){const ne=Array.from(b.getTokenIndent(z)),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;v.report({node:z,messageId:"wrongIndentation",data:k(ue.length,ce,pe),loc:{start:{line:z.loc.start.line,column:0},end:{line:z.loc.start.line,column:z.loc.start.column}},fix(Be){const oe=[z.range[0]-z.loc.start.column,z.range[0]],Z=ue;return Be.replaceTextRange(oe,Z)}})}function T(z,ue){const ne=b.getTokenIndent(z);return ne===ue||ne.includes(" ")&&ne.includes(" ")}function R(z){if(!z.parent||z.parent.type!=="CallExpression"||z.parent.callee!==z)return!1;let ue=z.parent&&z.parent.parent;for(;ue.type==="UnaryExpression"&&["!","~","+","-"].includes(ue.operator)||ue.type==="AssignmentExpression"||ue.type==="LogicalExpression"||ue.type==="SequenceExpression"||ue.type==="VariableDeclarator";)ue=ue.parent;return(ue.type==="ExpressionStatement"||ue.type==="VariableDeclaration")&&ue.parent.type==="Program"}function F(z){const ne=z.match(/\s*$/u)[0].match(c.createGlobalLinebreakMatcher());return ne===null?0:ne.length}function P(z,ue,ne,ce){function pe(Be){let oe=f.getTokenBefore(Be);for(;c.isOpeningParenToken(oe)&&oe!==ue;)oe=f.getTokenBefore(oe);return f.getTokenAfter(oe)}S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,typeof ce=="number"?ce:1),S.setDesiredOffset(ne,ue,0),!(ce==="first"&&z.length&&!z[0])&&z.forEach((Be,oe)=>{if(Be&&(ce==="off"&&S.ignoreToken(pe(Be)),oe!==0))if(ce==="first"&&b.isFirstTokenOfLine(pe(Be)))S.matchOffsetOf(pe(z[0]),pe(Be));else{const Z=z[oe-1],ge=Z&&pe(Z),Re=Z&&f.getLastToken(Z);Z&&Re.loc.end.line-F(Re.value)>ue.loc.end.line&&S.setDesiredOffsets([Z.range[1],Be.range[1]],ge,0)}})}function N(z){if(z.type!=="BlockStatement"){const ue=f.getTokenBefore(z,c.isNotOpeningParenToken);let ne=f.getFirstToken(z),ce=f.getLastToken(z);for(;c.isOpeningParenToken(f.getTokenBefore(ne))&&c.isClosingParenToken(f.getTokenAfter(ce));)ne=f.getTokenBefore(ne),ce=f.getTokenAfter(ce);S.setDesiredOffsets([ne.range[0],ce.range[1]],ue,1)}}function I(z){let ue;z.arguments.length?ue=f.getFirstTokenBetween(z.callee,z.arguments[0],c.isOpeningParenToken):ue=f.getLastToken(z,1);const ne=f.getLastToken(z);if(E.add(ue),E.add(ne),z.optional){const Be=f.getTokenAfter(z.callee,c.isQuestionDotToken),oe=f.getTokensBetween(z.callee,Be,{filter:c.isClosingParenToken}).length,Z=oe?f.getTokenBefore(z.callee,{skip:oe-1}):f.getFirstToken(z.callee),ge=f.getTokenBefore(Be),Re=ge.loc.end.line===ue.loc.start.line?ge:Z;S.setDesiredOffset(Be,Re,1)}const ce=z.callee.type==="TaggedTemplateExpression"?f.getFirstToken(z.callee.quasi):ue,pe=f.getTokenBefore(ce);S.setDesiredOffset(ue,pe,0),P(z.arguments,ue,ne,g.CallExpression.arguments)}function L(z){const ue=[],ne=[];for(let ce=0;ce=0;ce--){const pe=ne[ce].left,Be=ne[ce].right;if(!E.has(pe)&&!E.has(Be)){const oe=new Set(f.getTokensBetween(pe,Be));oe.forEach(Z=>{oe.has(S.getFirstDependency(Z))||S.setDesiredOffset(Z,pe,1)})}S.setDesiredOffset(Be,pe,0)}}function j(z){const ue=new Set(f.getTokens(z,{includeComments:!0}));ue.forEach(ne=>{if(!ue.has(S.getFirstDependency(ne))){const ce=b.getFirstTokenOfLine(ne);ne===ce?S.ignoreToken(ne):S.setDesiredOffset(ne,ce,0)}})}function G(z,ue){let ne=ue;for(;ne.parent&&!ne.parent.type.endsWith("Statement")&&!ne.parent.type.endsWith("Declaration");)ne=ne.parent;return ne=ne.parent,!ne||ne.loc.start.line===z.loc.start.line}function U(z,ue){const ne=z.loc.end.line,ce=ue.loc.start.line;if(ne===ce||ne===ce-1)return!1;for(let pe=ne+1;pece)||ue,c.isClosingBracketToken);P(z.elements,ue,ne,g.ArrayExpression)},"ObjectExpression, ObjectPattern"(z){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z.properties.length?z.properties.at(-1):ue,c.isClosingBraceToken);P(z.properties,ue,ne,g.ObjectExpression)},ArrowFunctionExpression(z){const ue=f.getFirstToken(z,{skip:z.async?1:0});if(c.isOpeningParenToken(ue)){const ne=ue,ce=f.getTokenBefore(z.body,c.isClosingParenToken);E.add(ne),E.add(ce),P(z.params,ne,ce,g.FunctionExpression.parameters)}N(z.body)},AssignmentExpression(z){const ue=f.getFirstTokenBetween(z.left,z.right,ne=>ne.value===z.operator);S.setDesiredOffsets([ue.range[0],z.range[1]],f.getLastToken(z.left),1),S.ignoreToken(ue),S.ignoreToken(f.getTokenAfter(ue))},"BinaryExpression, LogicalExpression"(z){const ue=f.getFirstTokenBetween(z.left,z.right,ce=>ce.value===z.operator),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffset(ne,ue,0)},"BlockStatement, ClassBody"(z){let ue;z.parent&&R(z.parent)?ue=g.outerIIFEBody:z.parent&&(z.parent.type==="FunctionExpression"||z.parent.type==="ArrowFunctionExpression")?ue=g.FunctionExpression.body:z.parent&&z.parent.type==="FunctionDeclaration"?ue=g.FunctionDeclaration.body:ue=1,c.STATEMENT_LIST_PARENTS.has(z.parent.type)||S.setDesiredOffset(f.getFirstToken(z),f.getFirstToken(z.parent),0),P(z.body,f.getFirstToken(z),f.getLastToken(z),ue)},CallExpression:I,"ClassDeclaration[superClass], ClassExpression[superClass]"(z){const ue=f.getFirstToken(z),ne=f.getTokenBefore(z.superClass,c.isNotOpeningParenToken);S.setDesiredOffsets([ne.range[0],z.body.range[0]],ue,1)},ConditionalExpression(z){const ue=f.getFirstToken(z);if(!g.flatTernaryExpressions||!c.isTokenOnSameLine(z.test,z.consequent)||G(ue,z)){const ne=f.getFirstTokenBetween(z.test,z.consequent,Z=>Z.type==="Punctuator"&&Z.value==="?"),ce=f.getFirstTokenBetween(z.consequent,z.alternate,Z=>Z.type==="Punctuator"&&Z.value===":"),pe=f.getTokenAfter(ne),Be=f.getTokenBefore(ce),oe=f.getTokenAfter(ce);S.setDesiredOffset(ne,ue,1),S.setDesiredOffset(ce,ue,1),S.setDesiredOffset(pe,ue,pe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1),Be.loc.end.line===oe.loc.start.line?S.setDesiredOffset(oe,pe,0):S.setDesiredOffset(oe,ue,oe.type==="Punctuator"&&g.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":z=>N(z.body),ExportNamedDeclaration(z){if(z.declaration===null){const ue=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers,f.getFirstToken(z,{skip:1}),ue,1),z.source&&S.setDesiredOffsets([ue.range[1],z.range[1]],f.getFirstToken(z),1)}},ForStatement(z){const ue=f.getFirstToken(z,1);z.init&&S.setDesiredOffsets(z.init.range,ue,1),z.test&&S.setDesiredOffsets(z.test.range,ue,1),z.update&&S.setDesiredOffsets(z.update.range,ue,1),N(z.body)},"FunctionDeclaration, FunctionExpression"(z){const ue=f.getTokenBefore(z.body),ne=f.getTokenBefore(z.params.length?z.params[0]:ue);E.add(ne),E.add(ue),P(z.params,ne,ue,g[z.type].parameters)},IfStatement(z){N(z.consequent),z.alternate&&N(z.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(z){let ue;z.type==="IfStatement"?(ue=[z.consequent],z.alternate&&ue.push(z.alternate)):ue=[z.body];for(const ne of ue){const ce=f.getLastToken(ne);if(c.isSemicolonToken(ce)){const pe=f.getTokenBefore(ce),Be=f.getTokenAfter(ce);!c.isTokenOnSameLine(pe,ce)&&Be&&c.isTokenOnSameLine(ce,Be)&&S.setDesiredOffset(ce,f.getFirstToken(z),0)}}},ImportDeclaration(z){if(z.specifiers.some(pe=>pe.type==="ImportSpecifier")){const pe=f.getFirstToken(z,c.isOpeningBraceToken),Be=f.getLastToken(z,c.isClosingBraceToken);P(z.specifiers.filter(oe=>oe.type==="ImportSpecifier"),pe,Be,g.ImportDeclaration)}const ue=f.getLastToken(z,pe=>pe.type==="Identifier"&&pe.value==="from"),ne=f.getLastToken(z,pe=>pe.type==="String"),ce=f.getLastToken(z,pe=>pe.type==="Punctuator"&&pe.value===";");if(ue){const pe=ce&&ce.range[1]===ne.range[1]?z.range[1]:ne.range[1];S.setDesiredOffsets([ue.range[0],pe],f.getFirstToken(z),1)}},ImportExpression(z){const ue=f.getFirstToken(z,1),ne=f.getLastToken(z);E.add(ue),E.add(ne),S.setDesiredOffset(ue,f.getTokenBefore(ue),0),P([z.source],ue,ne,g.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(z){const ue=z.type==="MetaProperty"?z.meta:z.object,ne=f.getFirstTokenBetween(ue,z.property,c.isNotClosingParenToken),ce=f.getTokenAfter(ne),pe=f.getTokensBetween(ue,z.property,{filter:c.isClosingParenToken}).length,Be=pe?f.getTokenBefore(ue,{skip:pe-1}):f.getFirstToken(ue),oe=f.getTokenBefore(ne),Z=z.computed?ne:ce;z.computed&&(S.setDesiredOffset(f.getLastToken(z),ne,0),S.setDesiredOffsets(z.property.range,ne,1));const ge=oe.loc.end.line===Z.loc.start.line?oe:Be;typeof g.MemberExpression=="number"?(S.setDesiredOffset(ne,ge,g.MemberExpression),S.setDesiredOffset(ce,z.computed?ne:ge,g.MemberExpression)):(S.ignoreToken(ne),S.ignoreToken(ce),S.setDesiredOffset(ne,ge,0),S.setDesiredOffset(ce,ne,0))},NewExpression(z){(z.arguments.length>0||c.isClosingParenToken(f.getLastToken(z))&&c.isOpeningParenToken(f.getLastToken(z,1)))&&I(z)},Property(z){if(!z.shorthand&&!z.method&&z.kind==="init"){const ue=f.getFirstTokenBetween(z.key,z.value,c.isColonToken);S.ignoreToken(f.getTokenAfter(ue))}},PropertyDefinition(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);let ce;if(z.computed){const pe=f.getTokenBefore(z.key,c.isOpeningBracketToken),Be=ce=f.getTokenAfter(z.key,c.isClosingBracketToken),oe=[pe.range[1],Be.range[0]];pe!==ue&&S.setDesiredOffset(pe,ue,0),S.setDesiredOffsets(oe,pe,1),S.setDesiredOffset(Be,pe,0)}else{const pe=ce=f.getFirstToken(z.key);pe!==ue&&S.setDesiredOffset(pe,ue,1)}if(z.value){const pe=f.getTokenBefore(z.value,c.isEqToken),Be=f.getTokenAfter(pe);S.setDesiredOffset(pe,ce,1),S.setDesiredOffset(Be,pe,1),c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,pe,1)}else c.isSemicolonToken(ne)&&S.setDesiredOffset(ne,ce,1)},StaticBlock(z){const ue=f.getFirstToken(z,{skip:1}),ne=f.getLastToken(z);P(z.body,ue,ne,g.StaticBlock.body)},SwitchStatement(z){const ue=f.getTokenAfter(z.discriminant,c.isOpeningBraceToken),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,g.SwitchCase),z.cases.length&&f.getTokensBetween(z.cases.at(-1),ne,{includeComments:!0,filter:c.isCommentToken}).forEach(ce=>S.ignoreToken(ce))},SwitchCase(z){if(!(z.consequent.length===1&&z.consequent[0].type==="BlockStatement")){const ue=f.getFirstToken(z),ne=f.getTokenAfter(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)}},TemplateLiteral(z){z.expressions.forEach((ue,ne)=>{const ce=z.quasis[ne],pe=z.quasis[ne+1],Be=ce.loc.start.line===ce.loc.end.line?f.getFirstToken(ce):null;S.setDesiredOffsets([ce.range[1],pe.range[0]],Be,1),S.setDesiredOffset(f.getFirstToken(pe),Be,0)})},VariableDeclaration(z){let ue=Object.hasOwn(g.VariableDeclarator,z.kind)?g.VariableDeclarator[z.kind]:1;const ne=f.getFirstToken(z),ce=f.getLastToken(z);if(g.VariableDeclarator[z.kind]==="first"){if(z.declarations.length>1){P(z.declarations,ne,ce,"first");return}ue=1}z.declarations.at(-1).loc.start.line>z.loc.start.line?S.setDesiredOffsets(z.range,ne,ue,!0):S.setDesiredOffsets(z.range,ne,ue),c.isSemicolonToken(ce)&&S.ignoreToken(ce)},VariableDeclarator(z){if(z.init){const ue=f.getTokenBefore(z.init,c.isNotOpeningParenToken),ne=f.getTokenAfter(ue);S.ignoreToken(ue),S.ignoreToken(ne),S.setDesiredOffsets([ne.range[0],z.range[1]],ue,1),S.setDesiredOffset(ue,f.getLastToken(z.id),0)}},"JSXAttribute[value]"(z){const ue=f.getFirstTokenBetween(z.name,z.value,ne=>ne.type==="Punctuator"&&ne.value==="=");S.setDesiredOffsets([ue.range[0],z.value.range[1]],f.getFirstToken(z.name),1)},JSXElement(z){z.closingElement&&P(z.children,f.getFirstToken(z.openingElement),f.getFirstToken(z.closingElement),1)},JSXOpeningElement(z){const ue=f.getFirstToken(z);let ne;z.selfClosing?(ne=f.getLastToken(z,{skip:1}),S.setDesiredOffset(f.getLastToken(z),ne,0)):ne=f.getLastToken(z),S.setDesiredOffsets(z.name.range,f.getFirstToken(z)),P(z.attributes,ue,ne,1)},JSXClosingElement(z){const ue=f.getFirstToken(z);S.setDesiredOffsets(z.name.range,ue,1)},JSXFragment(z){const ue=f.getFirstToken(z.openingFragment),ne=f.getFirstToken(z.closingFragment);P(z.children,ue,ne,1)},JSXOpeningFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,ne)},JSXClosingFragment(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z,{skip:1}),ce=f.getLastToken(z),pe=c.isTokenOnSameLine(ne,ce)?ne:ce;S.setDesiredOffsets(z.range,ue,1),S.matchOffsetOf(ue,pe)},JSXExpressionContainer(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},JSXSpreadAttribute(z){const ue=f.getFirstToken(z),ne=f.getLastToken(z);S.setDesiredOffsets([ue.range[1],ne.range[0]],ue,1)},"*"(z){const ue=f.getFirstToken(z);ue&&!Q.has(ue)&&S.setDesiredOffsets(z.range,ue,0)}},W=[],K={};for(const[z,ue]of Object.entries($))K[z]=ne=>W.push({listener:ue,node:ne});const te=new Set;function V(z){te.add(z),Q.add(f.getFirstToken(z))}const ae=g.ignoredNodes.reduce((z,ue)=>Object.assign(z,{[ue]:V}),{});return Object.assign(K,ae,{"*:exit"(z){s.has(z.type)||V(z)},"Program:exit"(){g.ignoreComments&&f.getAllComments().forEach(ue=>S.ignoreToken(ue));for(let ue=0;ue0&&z>0?pe=`${ae} ${ne} and ${z} ${ce}`:ae>0?pe=d==="space"?ae:`${ae} ${ne}`:z>0?pe=d==="tab"?z:`${z} ${ce}`:pe="0",{expected:ue,actual:pe}}function x(V,ae,z,ue,ne,ce){if(z&&ue)return;const pe=(d==="space"?" ":" ").repeat(ae),Be=ce?[V.range[1]-V.loc.end.column,V.range[1]-V.loc.end.column+z+ue]:[V.range[0]-V.loc.start.column,V.range[0]-V.loc.start.column+z+ue];s.report({node:V,loc:ne,messageId:"expected",data:O(ae,z,ue),fix:oe=>oe.replaceTextRange(Be,pe)})}function g(V,ae){const z=ae?o.getLastToken(V):o.getFirstToken(V),ue=o.getText(z,z.loc.start.column).split(""),ne=ue.slice(0,ue.findIndex(Be=>Be!==" "&&Be!==" ")),ce=ne.filter(Be=>Be===" ").length,pe=ne.filter(Be=>Be===" ").length;return{space:ce,tab:pe,goodChar:d==="space"?ce:pe,badChar:d==="space"?pe:ce}}function f(V,ae){const z=ae===!0?o.getLastToken(V,1):o.getTokenBefore(V),ue=ae===!0?V.loc.end.line:V.loc.start.line,ne=z?z.loc.end.line:-1;return ue!==ne}function b(V,ae){const z=g(V,!1);if(V.type!=="ArrayExpression"&&V.type!=="ObjectExpression"&&(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab),V.type==="IfStatement"&&V.alternate){const ue=o.getTokenBefore(V.alternate);b(ue,ae),f(V.alternate)||b(V.alternate,ae)}if(V.type==="TryStatement"&&V.handler){const ue=o.getFirstToken(V.handler);b(ue,ae)}if(V.type==="TryStatement"&&V.finalizer){const ue=o.getTokenBefore(V.finalizer);b(ue,ae)}if(V.type==="DoWhileStatement"){const ue=o.getTokenAfter(V.body);b(ue,ae)}}function S(V,ae){V.forEach(z=>b(z,ae))}function E(V,ae){const z=o.getLastToken(V),ue=g(z,!0);(ue.goodChar!==ae||ue.badChar!==0)&&f(V,!0)&&x(V,ae,ue.space,ue.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function k(V,ae){const z=o.getLastToken(V,c.isClosingParenToken);if(o.getText(z,z.loc.start.column).slice(0,-1).trim())return;const ne=g(z,!0);ne.goodChar!==ae&&x(V,ae,ne.space,ne.tab,{line:z.loc.start.line,column:z.loc.start.column},!0)}function D(V,ae){const z=g(V,!1);(z.goodChar!==ae||z.badChar!==0)&&f(V)&&x(V,ae,z.space,z.tab,{line:V.loc.start.line,column:V.loc.start.column})}function T(V,ae,z){let ue=V.parent;const ne=new Set(z||["Program"]);for(;ue.type!==ae&&!ne.has(ue.type)&&ue.type!=="Program";)ue=ue.parent;return ue.type===ae?ue:null}function R(V){return T(V,"VariableDeclarator")}function F(V,ae){return ae&&ae.parent.loc.start.line===V.loc.start.line&&ae.parent.declarations.length>1}function P(V){const ae=V.parent;return ae.arguments.length>=2&&ae.arguments[1]===V?ae.arguments[0].loc.end.line>ae.arguments[0].loc.start.line:!1}function N(V){const ae=V.parent;let z=ae.parent;if(ae.type!=="CallExpression"||ae.callee!==V)return!1;for(;z.type==="UnaryExpression"&&(z.operator==="!"||z.operator==="~"||z.operator==="+"||z.operator==="-")||z.type==="AssignmentExpression"||z.type==="LogicalExpression"||z.type==="SequenceExpression"||z.type==="VariableDeclarator";)z=z.parent;return(z.type==="ExpressionStatement"||z.type==="VariableDeclaration")&&z.parent&&z.parent.type==="Program"}function I(V){const ae=V.parent;let z;if(ae.parent&&(ae.parent.type==="Property"||ae.parent.type==="ArrayExpression")?z=g(ae,!1).goodChar:z=g(ae).goodChar,ae.parent.type==="CallExpression"){const ce=ae.parent;ae.type!=="FunctionExpression"&&ae.type!=="ArrowFunctionExpression"?ce&&ce.loc.start.line0&&S(V.body,z),E(V,z-ue)}function L(V){const ae=o.getLastToken(V),z=V.loc.start.line,ue=ae.loc.end.line;return z===ue}function j(V){if(L(V))return;let ae=V.type==="ArrayExpression"?V.elements:V.properties;ae=ae.filter(ce=>ce!==null);let z,ue;const ne=R(V);if(f(V)){const ce=V.parent;if(z=g(ce).goodChar,(!ne||ne.loc.start.line!==V.loc.start.line)&&(ce.type!=="VariableDeclarator"||ne===ne.parent.declarations[0]))if(ce.type==="VariableDeclarator"&&ne.loc.start.line===ce.loc.start.line)z+=v*m.VariableDeclarator[ne.parent.kind];else if(ce.type==="ObjectExpression"||ce.type==="ArrayExpression"){const pe=V.parent.type==="ObjectExpression"?V.parent.properties:V.parent.elements;pe[0]&&pe[0].loc.start.line===ce.loc.start.line&&pe[0].loc.end.line!==ce.loc.start.line||(typeof m[ce.type]=="number"?z+=m[ce.type]*v:z=pe[0].loc.start.column)}else ce.type==="CallExpression"||ce.type==="NewExpression"?typeof m.CallExpression.arguments=="number"?z+=m.CallExpression.arguments*v:m.CallExpression.arguments==="first"?ce.arguments.includes(V)&&(z=ce.arguments[0].loc.start.column):z+=v:(ce.type==="LogicalExpression"||ce.type==="ArrowFunctionExpression")&&(z+=v);D(V,z)}else z=g(V).goodChar;m[V.type]==="first"?ue=ae.length?ae[0].loc.start.column:0:ue=z+v*m[V.type],F(V,ne)&&(ue+=v*m.VariableDeclarator[ne.parent.kind]),S(ae,ue),!(ae.length>0&&ae.at(-1).loc.end.line===V.loc.end.line)&&E(V,z+(F(V,ne)?m.VariableDeclarator[ne.parent.kind]*v:0))}function G(V){return V.type==="BlockStatement"||V.type==="ClassBody"||V.body&&V.body.type==="BlockStatement"||V.consequent&&V.consequent.type==="BlockStatement"}function U(V){if(L(V))return;if(V.parent&&(V.parent.type==="FunctionExpression"||V.parent.type==="FunctionDeclaration"||V.parent.type==="ArrowFunctionExpression")){I(V);return}let ae,z;const ue=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];V.parent&&ue.includes(V.parent.type)&&G(V)?ae=g(V.parent).goodChar:V.parent&&V.parent.type==="CatchClause"?ae=g(V.parent.parent).goodChar:ae=g(V).goodChar,V.type==="IfStatement"&&V.consequent.type!=="BlockStatement"?z=[V.consequent]:Array.isArray(V.body)?z=V.body:z=[V.body],z.length>0&&S(z,ae+v),V.type==="BlockStatement"&&E(V,ae)}function Q(V){return V.declarations.reduce((ae,z)=>{const ue=ae.at(-1);return(z.loc.start.line!==V.loc.start.line&&!ue||ue&&ue.loc.start.line!==z.loc.start.line)&&ae.push(z),ae},[])}function $(V){const ae=Q(V),z=g(V).goodChar,ue=ae.at(-1),ne=z+v*m.VariableDeclarator[V.kind];if(S(ae,ne),o.getLastToken(V).loc.end.line<=ue.loc.end.line)return;const ce=o.getTokenBefore(ue);ce.value===","?E(V,g(ce).goodChar):E(V,ne-v)}function W(V){V.body.type!=="BlockStatement"&&U(V)}function K(V,ae){const z=V.type==="SwitchStatement"?V:V.parent,ue=typeof ae>"u"?g(z).goodChar:ae;let ne;return y[z.loc.start.line]?y[z.loc.start.line]:(z.cases.length>0&&m.SwitchCase===0?ne=ue:ne=ue+v*m.SwitchCase,y[z.loc.start.line]=ne,ne)}function te(V){const ae=/^return\s*?\(\s*?\);*?/u,z=o.getText(V).replace(o.getText(V.argument),"");return ae.test(z)}return{Program(V){V.body.length>0&&S(V.body,g(V).goodChar)},ClassBody:U,BlockStatement:U,WhileStatement:W,ForStatement:W,ForInStatement:W,ForOfStatement:W,DoWhileStatement:W,IfStatement(V){V.consequent.type!=="BlockStatement"&&V.consequent.loc.start.line>V.loc.start.line&&U(V)},VariableDeclaration(V){V.declarations.at(-1).loc.start.line>V.declarations[0].loc.start.line&&$(V)},ObjectExpression(V){j(V)},ArrayExpression(V){j(V)},MemberExpression(V){if(typeof m.MemberExpression>"u"||L(V)||T(V,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])||T(V,"AssignmentExpression",["FunctionExpression"]))return;const ae=g(V).goodChar+v*m.MemberExpression,z=[V.property],ue=o.getTokenBefore(V.property);ue.type==="Punctuator"&&ue.value==="."&&z.push(ue),S(z,ae)},SwitchStatement(V){const ae=g(V).goodChar,z=K(V,ae);S(V.cases,z),E(V,ae)},SwitchCase(V){if(L(V))return;const ae=K(V);S(V.consequent,ae+v)},FunctionDeclaration(V){L(V)||(m.FunctionDeclaration.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionDeclaration.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionDeclaration.parameters))},FunctionExpression(V){L(V)||(m.FunctionExpression.parameters==="first"&&V.params.length?S(V.params.slice(1),V.params[0].loc.start.column):m.FunctionExpression.parameters!==null&&S(V.params,g(V).goodChar+v*m.FunctionExpression.parameters))},ReturnStatement(V){if(L(V))return;const ae=g(V).goodChar;te(V)?k(V,ae):b(V,ae)},CallExpression(V){L(V)||(m.CallExpression.arguments==="first"&&V.arguments.length?S(V.arguments.slice(1),V.arguments[0].loc.start.column):m.CallExpression.arguments!==null&&S(V.arguments,g(V).goodChar+v*m.CallExpression.arguments))}}}},dd}var md,aw;function J3(){if(aw)return md;aw=1;function c(u){return u.type==="ForInStatement"||u.type==="ForOfStatement"||u.type==="ForStatement"}function s(u){const p=u.parent,a=p.parent;return c(a)?a.type==="ForStatement"?a.init===p:a.left===p:!!u.init}return md={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(u){const p="always",a="never",d=u.options[0]||p,v=u.options[1]||{};return{"VariableDeclaration:exit"(m){const o=m.kind,y=m.declarations;for(let O=0;O1)return!1;return!0}return!1}function R(Q){const $=Q.key;return Q.computed?b.getText().slice($.range[0],$.range[1]):c.getStaticPropertyName(Q)}function F(Q,$,W,K,te){const V=W.length-K;if((V&&te==="strict"||V<0&&te==="minimum"||V>0&&!K&&te==="minimum")&&!(K&&u(W))){const ae=E(Q.key),z=b.getTokenBefore(ae,{includeComments:!0}),ue=b.getTokenAfter(ae,{includeComments:!0}),ne=$==="key",ce=V>0,pe=Math.abs(V),Be=Array(pe+1).join(" "),oe=ne?z.loc.end:ae.loc.start,Z=ne?ae.loc.start:ue.loc.start,ge=ne?z.loc:ue.loc,Re=ce?{start:oe,end:Z}:ge;let Se;if(ce){let Me;ne?Me=[z.range[1],z.range[1]+pe]:Me=[ue.range[0]-pe,ue.range[0]],Se=function(it){return it.removeRange(Me)}}else ne?Se=function(Me){return Me.insertTextAfter(z,Be)}:Se=function(Me){return Me.insertTextBefore(ue,Be)};let we;ce?we=$==="key"?"extraKey":"extraValue":we=$==="key"?"missingKey":"missingValue",o.report({node:Q[$],loc:Re,messageId:we,data:{computed:Q.computed?"computed ":"",key:R(Q)},fix:Se})}}function P(Q){const $=b.getFirstToken(Q),W=k(Q.key);return s(b.getText().slice($.range[0],W.range[1]))}function N(Q){const $=/(\s*):(\s*)/u.exec(b.getText().slice(Q.key.range[1],Q.value.range[0]));return $?{beforeColon:$[1],afterColon:$[2]}:null}function I(Q){return Q.properties.length===1?[Q.properties]:Q.properties.reduce(($,W)=>{const K=p($),te=p(K);return!te||T(te,W)?K.push(W):$.push([W]),$},[[]])}function L(Q){const $=Q.length,W=Q.map(P),K=f.on;let te=Math.max(...W),V,ae,z;f&&$>1?(V=f.beforeColon,ae=f.afterColon,z=f.mode):(V=x.beforeColon,ae=x.afterColon,z=f.mode),te+=K==="colon"?V:ae;for(let ue=0;ue<$;ue++){const ne=Q[ue],ce=N(ne);if(ce){const pe=W[ue];K==="value"?(F(ne,"key",ce.beforeColon,V,z),F(ne,"value",ce.afterColon,te-pe,z)):(F(ne,"key",ce.beforeColon,te-pe,z),F(ne,"value",ce.afterColon,ae,z))}}}function j(Q,$){const W=N(Q);W&&(F(Q,"key",W.beforeColon,$.beforeColon,$.mode),F(Q,"value",W.afterColon,$.afterColon,$.mode))}function G(Q,$){const W=Q.length;for(let K=0;K{const W=$.filter(S);W.length>0&&d(W)?G(W,x):L(W)})}return f?{ObjectExpression(Q){a(Q)?G(Q.properties.filter(S),g):U(Q)}}:{Property(Q){j(Q,a(Q.parent)?g:x)}}}},yd}var bd,uw;function r5(){if(uw)return bd;uw=1;const c=Ze(),s=Wh(),u=/^[)\]}>]$/u,p=/^(?:[([{<~!]|\+\+?|--?)$/u,a=/^[)\]}>*]$/u,d=/^[{*]$/u,v=/\$\{$/u,m=/^\}/u,o=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,y=s.concat(["as","async","await","from","get","let","of","set","yield"]);(function(){y.sort();for(let g=1;g(g[f]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},g),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(g){const f=g.sourceCode,b=new WeakSet;function S(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&!f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:pe.loc,messageId:"expectedBefore",data:pe,fix(Z){return Z.insertTextBefore(pe," ")}})}function E(pe,Be){const oe=f.getTokenBefore(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!O(oe)&&!b.has(oe)&&c.isTokenOnSameLine(oe,pe)&&f.isSpaceBetweenTokens(oe,pe)&&g.report({loc:{start:oe.loc.end,end:pe.loc.start},messageId:"unexpectedBefore",data:pe,fix(Z){return Z.removeRange([oe.range[1],pe.range[0]])}})}function k(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&!f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:pe.loc,messageId:"expectedAfter",data:pe,fix(Z){return Z.insertTextAfter(pe," ")}})}function D(pe,Be){const oe=f.getTokenAfter(pe);oe&&(o.test(oe.type)||Be.test(oe.value))&&!x(oe)&&!b.has(oe)&&c.isTokenOnSameLine(pe,oe)&&f.isSpaceBetweenTokens(pe,oe)&&g.report({loc:{start:pe.loc.end,end:oe.loc.start},messageId:"unexpectedAfter",data:pe,fix(Z){return Z.removeRange([pe.range[1],oe.range[0]])}})}function T(pe={}){const Be=pe.before!==!1,oe=pe.after!==!1,Z={before:Be?S:E,after:oe?k:D},ge=pe&&pe.overrides||{},Re=Object.create(null);for(let Se=0;Se{switch(oe.value){case"get":case"set":case"async":return!0;default:return!1}});if(!Be)throw new Error("Failed to find token get, set, or async beside method name");N(Be)}}function ce(pe){F(f.getFirstToken(pe))}return{DebuggerStatement:I,WithStatement:I,BreakStatement:I,ContinueStatement:I,ReturnStatement:I,ThrowStatement:I,TryStatement:$,IfStatement:Q,SwitchStatement:I,SwitchCase:I,DoWhileStatement:W,ForInStatement:K,ForOfStatement:te,ForStatement:I,WhileStatement:I,ClassDeclaration:U,ExportNamedDeclaration:V,ExportDefaultDeclaration:V,ExportAllDeclaration:V,FunctionDeclaration:G,ImportDeclaration:V,VariableDeclaration:I,ArrowFunctionExpression:G,AwaitExpression:ce,ClassExpression:U,FunctionExpression:G,NewExpression:L,Super:L,ThisExpression:L,UnaryExpression:L,YieldExpression:L,ImportSpecifier:ae,ExportSpecifier:z,ImportNamespaceSpecifier:ue,MethodDefinition:ne,PropertyDefinition:ne,StaticBlock:I,Property:ne,"BinaryExpression[operator='>']"(pe){const Be=f.getTokenBefore(pe.right,c.isNotOpeningParenToken);b.add(Be)}}}},bd}var vd,cw;function n5(){if(cw)return vd;cw=1;const c=Ze();return vd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(s){const u=s.options[0];let p,a,d=!0;!u||typeof u=="string"?p=!u||u==="above":(p=!u.position||u.position==="above",a=u.ignorePattern,Object.hasOwn(u,"applyDefaultIgnorePatterns")?d=u.applyDefaultIgnorePatterns:d=u.applyDefaultPatterns!==!1);const v=c.COMMENTS_IGNORE_PATTERN,m=/^\s*falls?\s?through/u,o=new RegExp(a,"u"),y=s.sourceCode;return{Program(){y.getAllComments().filter(x=>x.type==="Line").forEach(x=>{if(d&&(v.test(x.value)||m.test(x.value))||a&&o.test(x.value))return;const g=y.getTokenBefore(x,{includeComments:!0}),f=g&&g.loc.end.line===x.loc.start.line;p?f&&s.report({node:x,messageId:"above"}):f||s.report({node:x,messageId:"beside"})})}}}},vd}var xd,fw;function s5(){if(fw)return xd;fw=1;const c=Ze();return xd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(s){const u=s.sourceCode;function p(a,d){return function(v){return v.replaceTextRange(a,d)}}return{Program:function(d){const v=s.options[0]||"unix",m=v==="unix",o=m?` +`:`\r +`,y=u.getText(),O=c.createGlobalLinebreakMatcher();let x,g=0;for(;(x=O.exec(y))!==null;){if(g++,x[0]===o)continue;const f=x.index,b=[f,f+x[0].length];s.report({node:d,loc:{start:{line:g,column:u.lines[g-1].length},end:{line:g+1,column:0}},messageId:m?"expectedLF":"expectedCRLF",fix:p(b,o)})}}}}},xd}var Od,pw;function i5(){if(pw)return Od;pw=1;const c=Ze();function s(p){return p.map((d,v)=>({code:d.trim(),num:v+1})).filter(d=>!d.code).map(d=>d.num)}function u(p){const a=[];return p.forEach(d=>{const v=d.loc.start.line,m=d.loc.end.line;a.push(v,m)}),a}return Od={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require empty lines around comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-comment"},fixable:"whitespace",schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{after:"Expected line after comment.",before:"Expected line before comment."}},create(p){const a=Object.assign({},p.options[0]),d=a.ignorePattern,v=c.COMMENTS_IGNORE_PATTERN,m=new RegExp(d,"u"),o=a.applyDefaultIgnorePatterns!==!1;a.beforeBlockComment=typeof a.beforeBlockComment<"u"?a.beforeBlockComment:!0;const y=p.sourceCode,O=y.lines,x=O.length+1,g=y.getAllComments(),f=u(g),b=s(O),S=new Set(f.concat(b));function E($){let W=$;do W=y.getTokenBefore(W,{includeComments:!0});while(W&&c.isCommentToken(W));if(W&&c.isTokenOnSameLine(W,$))return!0;W=$;do W=y.getTokenAfter(W,{includeComments:!0});while(W&&c.isCommentToken(W));return!!(W&&c.isTokenOnSameLine($,W))}function k($,W){return $.type===W||$.body&&$.body.type===W||$.consequent&&$.consequent.type===W}function D($){const W=y.getNodeByRangeIndex($.range[0]);if(W&&W.type==="StaticBlock"){const K=y.getFirstToken(W,{skip:1});return $.range[0]>=K.range[0]?W:null}return W}function T($,W){const K=D($);if(K&&k(K,W)){let te=K;return K.type==="StaticBlock"?te=y.getFirstToken(K,{skip:1}):K.type==="SwitchStatement"&&(te=y.getTokenAfter(K.discriminant,{filter:c.isOpeningBraceToken})),$.loc.start.line-te.loc.start.line===1}return!1}function R($,W){const K=D($);return!!K&&k(K,W)&&K.loc.end.line-$.loc.end.line===1}function F($){return T($,"ClassBody")||T($,"BlockStatement")||T($,"StaticBlock")||T($,"SwitchCase")||T($,"SwitchStatement")}function P($){return R($,"ClassBody")||R($,"BlockStatement")||R($,"StaticBlock")||R($,"SwitchCase")||R($,"SwitchStatement")}function N($){return T($,"ClassBody")}function I($){return R($,"ClassBody")}function L($){return T($,"ObjectExpression")||T($,"ObjectPattern")}function j($){return R($,"ObjectExpression")||R($,"ObjectPattern")}function G($){return T($,"ArrayExpression")||T($,"ArrayPattern")}function U($){return R($,"ArrayExpression")||R($,"ArrayPattern")}function Q($,W){if(o&&v.test($.value)||d&&m.test($.value))return;let K=W.after,te=W.before;const V=$.loc.start.line-1,ae=$.loc.end.line+1,z=E($),ue=a.allowBlockStart&&F($)&&!(a.allowClassStart===!1&&N($)),ne=a.allowBlockEnd&&P($)&&!(a.allowClassEnd===!1&&I($)),ce=a.allowClassStart&&N($),pe=a.allowClassEnd&&I($),Be=a.allowObjectStart&&L($),oe=a.allowObjectEnd&&j($),Z=a.allowArrayStart&&G($),ge=a.allowArrayEnd&&U($),Re=ue||ce||Be||Z,Se=ne||pe||oe||ge;if(V<1&&(te=!1),ae>=x&&(K=!1),z)return;const we=y.getTokenBefore($,{includeComments:!0}),Me=y.getTokenAfter($,{includeComments:!0});if(!Re&&te&&!S.has(V)&&!(c.isCommentToken(we)&&c.isTokenOnSameLine(we,$))){const it=$.range[0]-$.loc.start.column,pt=[it,it];p.report({node:$,messageId:"before",fix(kt){return kt.insertTextBeforeRange(pt,` +`)}})}!Se&&K&&!S.has(ae)&&!(c.isCommentToken(Me)&&c.isTokenOnSameLine($,Me))&&p.report({node:$,messageId:"after",fix(it){return it.insertTextAfter($,` +`)}})}return{Program(){g.forEach($=>{$.type==="Line"?(a.beforeLineComment||a.afterLineComment)&&Q($,{after:a.afterLineComment,before:a.beforeLineComment}):$.type==="Block"?(a.beforeBlockComment||a.afterBlockComment)&&Q($,{after:a.afterBlockComment,before:a.beforeBlockComment}):$.type==="Shebang"&&a.afterHashbangComment&&Q($,{after:a.afterHashbangComment,before:!1})})}}}},Od}var Sd,hw;function a5(){if(hw)return Sd;hw=1;const c=Ze();return Sd={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]||"always",a=typeof p=="string"?p:p.before,d=typeof p=="string"?p:p.after;function v(x){const g=u.getTokenBefore(x,{includeComments:!0}),f=g?g.loc.end.line:0;return x.loc.start.line-f>=2}function m(x){const g=u.getLastToken(x),f=u.getTokenBefore(g);return c.isSemicolonToken(g)&&g.loc.start.line>f.loc.end.line?f:g}function o(x){const g=m(x);return u.getTokenAfter(g,{includeComments:!0}).loc.start.line-g.loc.end.line>=2}function y(x,g,f){s.report({node:x,messageId:f?"expected":"unexpected",data:{value:x.expression.value,location:g},fix(b){const S=m(x);return f?g==="before"?b.insertTextBefore(x,` +`):b.insertTextAfter(S,` +`):b.removeRange(g==="before"?[x.range[0]-1,x.range[0]]:[S.range[1],S.range[1]+1])}})}function O(x){const g=c.getDirectivePrologue(x);if(!g.length)return;const f=g[0],b=u.getCommentsBefore(f);b.length?(a==="always"&&!v(f)&&y(f,"before",!0),a==="never"&&v(f)&&y(f,"before",!1)):x.type==="Program"&&a==="never"&&!b.length&&v(f)&&y(f,"before",!1);const S=g.at(-1),E=x.type==="Program"?x.body:x.body.body;S===E.at(-1)&&!S.trailingComments||(d==="always"&&!o(S)&&y(S,"after",!0),d==="never"&&o(S)&&y(S,"after",!1))}return{Program:O,FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression:O}}},Sd}var Ed,dw;function o5(){if(dw)return Ed;dw=1;const c=Ze(),s={"*":{test:()=>!0},field:{test:u=>u.type==="PropertyDefinition"},method:{test:u=>u.type==="MethodDefinition"}};return Ed={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(u){const p=[];p[0]=u.options[0]||"always",p[1]=u.options[1]||{exceptAfterSingleLine:!1};const a=typeof p[0]=="object"?p[0].enforce:[{blankLine:p[0],prev:"*",next:"*"}],d=u.sourceCode;function v(g,f){const b=d.getLastToken(g),S=d.getTokenBefore(b),E=d.getFirstToken(f);return c.isSemicolonToken(b)&&!c.isTokenOnSameLine(S,b)&&c.isTokenOnSameLine(b,E)?{curLast:S,nextFirst:b}:{curLast:b,nextFirst:E}}function m(g,f,b){const S=d.getTokenAfter(g,{includeComments:!0});return S!==f&&S.loc.start.line-g.loc.end.line<=b?m(S,f,b):g}function o(g,f,b){const S=d.getTokenBefore(g,{includeComments:!0});return S!==f&&g.loc.start.line-S.loc.end.line<=b?o(S,f,b):g}function y(g,f){return d.getTokensBetween(g,f,{includeComments:!0}).length!==0}function O(g,f){return s[f].test(g)}function x(g,f){for(let b=a.length-1;b>=0;--b){const S=a[b];if(O(g,S.prev)&&O(f,S.next))return S.blankLine}return null}return{ClassBody(g){const f=g.body;for(let b=0;b1,N=y(R,F),I=m(E,k,0),L=x(f[b],f[b+1]);L==="never"&&P?u.report({node:f[b+1],messageId:"never",fix(j){return N?null:j.replaceTextRange([R.range[1],F.range[0]],` +`)}}):L==="always"&&!T&&!P&&u.report({node:f[b+1],messageId:"always",fix(j){return N?null:j.insertTextAfter(I,` +`)}})}}}}},Ed}var Cd,mw;function l5(){if(mw)return Cd;mw=1;const c=Ze(),s=new Set(["Identifier","Super","ThisExpression"]);function u(x,g){return x.type==="Identifier"&&x.name==="undefined"?c.isReferenceToGlobalVariable(g,x):x.type==="UnaryExpression"&&x.operator==="void"&&x.argument.type==="Literal"&&x.argument.value===0}function p(x){return x.type==="Identifier"&&x.name!=="undefined"||x.type==="MemberExpression"}function a(x,g){if(x.type!=="BinaryExpression"||x.operator!=="==")return!1;const f=p(x.left)?"left":"right",b=f==="left"?"right":"left";return p(x[f])&&(c.isNullLiteral(x[b])||u(x[b],g))}function d(x){return x.type==="LogicalExpression"&&x.operator==="||"&&x.left.type==="BinaryExpression"&&x.left.operator==="==="&&x.right.type==="BinaryExpression"&&x.right.operator==="==="}function v(x,g){if(!d(x))return!1;const f=p(x.left.left)?"left":"right",b=f==="left"?"right":"left",S=p(x.right.left)?"left":"right",E=S==="left"?"right":"left";return c.isSameReference(x.left[f],x.right[S])&&(c.isNullLiteral(x.left[b])&&u(x.right[E],g)||u(x.left[b],g)&&c.isNullLiteral(x.right[E]))}function m(x,g){return x.type==="CallExpression"&&x.callee.name==="Boolean"&&x.arguments.length===1&&c.isReferenceToGlobalVariable(g,x.callee)}function o(x,g){const f=x.type==="UnaryExpression"&&x.operator==="!",b=f?x.argument:x;switch(!0){case p(b):return{reference:b,operator:f?"||":"&&"};case(b.type==="UnaryExpression"&&b.operator==="!"&&p(b.argument)):return{reference:b.argument,operator:"&&"};case(m(b,g)&&p(b.arguments[0])):return{reference:b.arguments[0],operator:f?"||":"&&"};case a(x,g):return{reference:p(x.left)?x.left:x.right,operator:"??"};case v(x,g):return{reference:p(x.left.left)?x.left.left:x.left.right,operator:"??"};default:return null}}function y(x){return x.type==="Program"?!1:x.parent.type==="WithStatement"&&x.parent.body===x?!0:y(x.parent)}function O(x,g){let f=g.left;for(;f.type==="LogicalExpression"&&f.operator===g.operator;){if(c.isParenthesised(x,f))return f;f=f.left}return f}return Cd={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(x){const g=x.options[0]==="never"?"never":"always",f=g==="always"&&x.options.length>1&&x.options[1].enforceForIfStatements,b=x.sourceCode,S=b.getScope(b.ast).isStrict;function E(R){return R.type==="Identifier"&&(S||!y(R))}function k(R){return!S&&y(R)?R.type==="Identifier":R.type==="MemberExpression"&&s.has(R.object.type)&&(!R.computed||R.property.type!=="MemberExpression"&&R.property.type!=="ChainExpression")}function D(R,F,P){return P?{...R,fix:F.fix}:{...R,suggest:[F]}}function T(R){return b.getFirstTokenBetween(R.left,R.right,F=>F.value===R.operator)}return g==="never"?{AssignmentExpression(R){if(!c.isLogicalAssignmentOperator(R.operator))return;const F={messageId:"unexpected",node:R,data:{operator:R.operator}},P={messageId:"separate",*fix(N){if(b.getCommentsInside(R).length>0)return;const I=T(R);yield N.replaceText(I,"=");const L=b.getText(R.left),j=R.operator.slice(0,-1);yield N.insertTextAfter(I,` ${L} ${j}`);const G=c.getPrecedence(R.right)<=c.getPrecedence({type:"LogicalExpression",operator:j}),U=R.operator==="??="&&c.isLogicalExpression(R.right);!c.isParenthesised(b,R.right)&&(G||U)&&(yield N.insertTextBefore(R.right,"("),yield N.insertTextAfter(R.right,")"))}};x.report(D(F,P,E(R.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(R){const F=O(b,R.right);if(!c.isSameReference(R.left,F))return;const P={messageId:"assignment",node:R,data:{operator:`${R.right.operator}=`}},N={messageId:"useLogicalOperator",data:{operator:`${R.right.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=T(R);yield I.insertTextBefore(L,R.right.operator);const j=T(F.parent),G=b.getTokenAfter(j);yield I.removeRange([F.parent.range[0],G.range[0]])}};x.report(D(P,N,E(R.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(R){if(p(R.left)&&c.isSameReference(R.left,R.right.left)){const F={messageId:"logical",node:R,data:{operator:`${R.operator}=`}},P={messageId:"convertLogical",data:{operator:`${R.operator}=`},*fix(I){if(b.getCommentsInside(R).length>0)return;const L=c.getPrecedence(R.parent),j=R.parent.type!=="ExpressionStatement"&&(L===-1||c.getPrecedence({type:"AssignmentExpression"})0)return;const Q=b.getFirstToken(P),$=b.getTokenBefore(R);if($!==null&&$.value!==";"&&$.value!=="{"&&Q.type!=="Identifier"&&Q.type!=="Keyword")return;const W=T(P.expression);yield U.insertTextBefore(W,I.operator),yield U.removeRange([R.range[0],P.range[0]]),yield U.removeRange([P.range[1],R.range[1]]);const K=b.getTokenAfter(P.expression);F&&K!==null&&K.value!==";"&&(yield U.insertTextAfter(R,";"))}},G=E(I.reference)||R.test.type!=="LogicalExpression"&&k(I.reference);x.report(D(L,j,G))}}}}},Cd}var wd,gw;function u5(){return gw||(gw=1,wd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(c){const[s={}]=c.options,[u,p]=typeof s=="number"?[!1,s||1]:[s.ignoreExpressions,s.max||1];let a=0;return{Program(){a=0},"Program:exit"(d){a>p&&c.report({node:d,messageId:"maximumExceeded",data:{classCount:a,max:p}})},ClassDeclaration(){a++},ClassExpression(){u||a++}}}}),wd}var kd,yw;function c5(){return yw||(yw=1,kd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(c){const s=[],u=c.options[0];let p=4;typeof u=="object"&&(Object.hasOwn(u,"maximum")||Object.hasOwn(u,"max"))&&(p=u.maximum||u.max),typeof u=="number"&&(p=u);function a(){s.push(0)}function d(){s.pop()}function v(o){const y=++s[s.length-1];y>p&&c.report({node:o,messageId:"tooDeeply",data:{depth:y,maxDepth:p}})}function m(){s[s.length-1]--}return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a,StaticBlock:a,IfStatement(o){o.parent.type!=="IfStatement"&&v(o)},SwitchStatement:v,TryStatement:v,DoWhileStatement:v,WhileStatement:v,WithStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,"IfStatement:exit":m,"SwitchStatement:exit":m,"TryStatement:exit":m,"DoWhileStatement:exit":m,"WhileStatement:exit":m,"WithStatement:exit":m,"ForStatement:exit":m,"ForInStatement:exit":m,"ForOfStatement:exit":m,"FunctionDeclaration:exit":d,"FunctionExpression:exit":d,"ArrowFunctionExpression:exit":d,"StaticBlock:exit":d,"Program:exit":d}}}),kd}var Ad,bw;function f5(){if(bw)return Ad;bw=1;const c={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},s={anyOf:[c,{type:"integer",minimum:0}]};return Ad={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[s,s,c],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(u){const p=/[^:/?#]:\/\/[^?#]/u,a=u.sourceCode;function d(U,Q){let $=0;return U.replace(/\t/gu,(W,K)=>{const te=K+$,V=Q?te%Q:0,ae=Q-V;$+=ae-1}),Array.from(U).length+$}const v=Object.assign({},u.options.at(-1));typeof u.options[0]=="number"&&(v.code=u.options[0]),typeof u.options[1]=="number"&&(v.tabWidth=u.options[1]);const m=typeof v.code=="number"?v.code:80,o=typeof v.tabWidth=="number"?v.tabWidth:4,y=!!v.ignoreComments,O=!!v.ignoreStrings,x=!!v.ignoreTemplateLiterals,g=!!v.ignoreRegExpLiterals,f=!!v.ignoreTrailingComments||!!v.ignoreComments,b=!!v.ignoreUrls,S=v.comments;let E=v.ignorePattern||null;E&&(E=new RegExp(E,"u"));function k(U,Q,$){return $&&$.loc.start.line===Q&&Q<=$.loc.end.line&&($.loc.end.line>Q||$.loc.end.column===U.length)}function D(U,Q,$){const W=$.loc.start,K=$.loc.end,te=!U.slice(0,$.loc.start.column).trim();return $&&(W.lineQ||K.line===Q&&K.column===U.length)}function T(U){if(!U||!U.parent||U.type!=="JSXEmptyExpression"||U.parent.type!=="JSXExpressionContainer")return!1;const Q=U.parent;return Q.loc.start.line===Q.loc.end.line}function R(U,Q){return U.slice(0,Q.loc.start.column).replace(/\s+$/u,"")}function F(U,Q,$){Array.isArray(U[Q])||(U[Q]=[]),U[Q].push($)}function P(){return a.ast.tokens.filter(U=>U.type==="String"||U.type==="JSXText"&&a.getNodeByRangeIndex(U.range[0]-1).type==="JSXAttribute")}function N(){return a.ast.tokens.filter(U=>U.type==="Template")}function I(){return a.ast.tokens.filter(U=>U.type==="RegularExpression")}function L(U){const Q={};for(let $=0;${const $=a.getNodeByRangeIndex(Q.range[0]);T($)?U.at(-1)!==$.parent&&U.push($.parent):U.push(Q)}),U}function G(U){const Q=a.lines,$=y||S||f?j():[];let W=0;const K=P(),te=L(K),V=N(),ae=L(V),z=I(),ue=L(z);Q.forEach((ne,ce)=>{const pe=ce+1;let Be=!1,oe;if(W<$.length){let Se;do Se=$[++W];while(Se&&Se.loc.start.line<=pe);if(Se=$[--W],D(ne,pe,Se))Be=!0,oe=ne;else if(f&&k(ne,pe,Se)){oe=R(ne,Se);let we=W;for(;k(oe,pe,$[--we]);)oe=R(oe,$[we])}else oe=ne}else oe=ne;if(E&&E.test(oe)||b&&p.test(oe)||O&&te[pe]||x&&ae[pe]||g&&ue[pe])return;const Z=d(oe,o),ge=Be&&S;if(Be&&y)return;const Re={start:{line:pe,column:0},end:{line:pe,column:oe.length}};ge?Z>S&&u.report({node:U,loc:Re,messageId:"maxComment",data:{lineLength:Z,maxCommentLength:S}}):Z>m&&u.report({node:U,loc:Re,messageId:"max",data:{lineLength:Z,maxLength:m}})})}return{Program:G}}},Ad}var Pd,vw;function p5(){if(vw)return Pd;vw=1;const c=Ze();function s(u,p){return[...Array(p-u).keys()].map(a=>a+u)}return Pd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(u){const p=u.options[0];let a=300;typeof p=="object"&&Object.hasOwn(p,"max")?a=p.max:typeof p=="number"&&(a=p);const d=p&&p.skipComments,v=p&&p.skipBlankLines,m=u.sourceCode;function o(O){return O&&(O.type==="Block"||O.type==="Line")}function y(O){let x=O.loc.start.line,g=O.loc.end.line,f;f=O;do f=m.getTokenBefore(f,{includeComments:!0});while(o(f));f&&c.isTokenOnSameLine(f,O)&&(x+=1),f=O;do f=m.getTokenAfter(f,{includeComments:!0});while(o(f));return f&&c.isTokenOnSameLine(O,f)&&(g-=1),x<=g?s(x,g+1):[]}return{"Program:exit"(){let O=m.lines.map((x,g)=>({lineNumber:g+1,text:x}));if(O.length>1&&O.at(-1).text===""&&O.pop(),v&&(O=O.filter(x=>x.text.trim()!=="")),d){const x=m.getAllComments(),g=new Set(x.flatMap(y));O=O.filter(f=>!g.has(f.lineNumber))}if(O.length>a){const x={start:{line:O[a].lineNumber,column:0},end:{line:m.lines.length,column:m.lines.at(-1).length}};u.report({loc:x,messageId:"exceed",data:{max:a,actual:O.length}})}}}}},Pd}var Td,xw;function h5(){if(xw)return Td;xw=1;const c=Ze(),{upperCaseFirst:s}=Vi(),p={oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]};function a(d){const v=new Map;return d.forEach(m=>{for(let o=m.loc.start.line;o<=m.loc.end.line;o++)v.set(o,m)}),v}return Td={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[p],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(d){const v=d.sourceCode,m=v.lines,o=d.options[0];let y=50,O=!1,x=!1,g=!1;typeof o=="object"?(y=typeof o.max=="number"?o.max:50,O=!!o.skipComments,x=!!o.skipBlankLines,g=!!o.IIFEs):typeof o=="number"&&(y=o);const f=a(v.getAllComments());function b(D,T,R){const F=R.loc.start,P=R.loc.end,N=F.line===T&&!D.slice(0,F.column).trim(),I=P.line===T&&!D.slice(P.column).trim();return R&&(F.lineT||I)}function S(D){return(D.type==="FunctionExpression"||D.type==="ArrowFunctionExpression")&&D.parent&&D.parent.type==="CallExpression"&&D.parent.callee===D}function E(D){return!D.parent||D!==D.parent.value?!1:D.parent.type==="MethodDefinition"?!0:D.parent.type==="Property"?D.parent.method===!0||D.parent.kind==="get"||D.parent.kind==="set":!1}function k(D){const T=E(D)?D.parent:D;if(!g&&S(T))return;let R=0;for(let F=T.loc.start.line-1;Fy){const F=s(c.getFunctionNameWithKind(D));d.report({node:T,messageId:"exceed",data:{name:F,lineCount:R,maxLines:y}})}}return{FunctionDeclaration:k,FunctionExpression:k,ArrowFunctionExpression:k}}},Td}var Dd,Ow;function d5(){return Ow||(Ow=1,Dd={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(c){const s=c.options[0];let u=10;typeof s=="object"&&(Object.hasOwn(s,"maximum")||Object.hasOwn(s,"max"))?u=s.maximum||s.max:typeof s=="number"&&(u=s);const p=[];function a(v){if(v.parent.type==="CallExpression"&&p.push(v),p.length>u){const o={num:p.length,max:u};c.report({node:v,messageId:"exceed",data:o})}}function d(){p.pop()}return{ArrowFunctionExpression:a,"ArrowFunctionExpression:exit":d,FunctionExpression:a,"FunctionExpression:exit":d}}}),Dd}var Id,Sw;function m5(){if(Sw)return Id;Sw=1;const c=Ze(),{upperCaseFirst:s}=Vi();return Id={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=u.sourceCode,a=u.options[0];let d=3;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))&&(d=a.maximum||a.max),typeof a=="number"&&(d=a);function v(m){m.params.length>d&&u.report({loc:c.getFunctionHeadLoc(m,p),node:m,messageId:"exceed",data:{name:s(c.getFunctionNameWithKind(m)),count:m.params.length,max:d}})}return{FunctionDeclaration:v,ArrowFunctionExpression:v,FunctionExpression:v}}},Id}var Rd,Ew;function g5(){if(Ew)return Rd;Ew=1;const c=Ze(),{upperCaseFirst:s}=Vi();return Rd={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(u){const p=[],a=u.options[0],d=u.options[1]&&u.options[1].ignoreTopLevelFunctions||!1,v=[];let m=10;typeof a=="object"&&(Object.hasOwn(a,"maximum")||Object.hasOwn(a,"max"))?m=a.maximum||a.max:typeof a=="number"&&(m=a);function o(g,f,b){if(f>b){const S=s(c.getFunctionNameWithKind(g));u.report({node:g,messageId:"exceed",data:{name:S,count:f,max:b}})}}function y(){p.push(0)}function O(g){const f=p.pop();g.type!=="StaticBlock"&&(d&&p.length===0?v.push({node:g,count:f}):o(g,f,m))}function x(g){p[p.length-1]+=g.body.length}return{FunctionDeclaration:y,FunctionExpression:y,ArrowFunctionExpression:y,StaticBlock:y,BlockStatement:x,"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O,"StaticBlock:exit":O,"Program:exit"(){v.length!==1&&v.forEach(g=>{const f=g.count,b=g.node;o(b,f,m)})}}}},Rd}var Fd,Cw;function y5(){if(Cw)return Fd;Cw=1;const c=Ze();return Fd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=typeof p.max<"u"?p.max:1;let d=0,v=0,m;const o=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function y(){m&&s.report({node:m,messageId:"exceed",data:{numberOfStatementsOnThisLine:v,maxStatementsPerLine:a,statements:v===1?"statement":"statements"}}),m=null}function O(f){return u.getLastToken(f,c.isNotSemicolonToken)}function x(f){const b=f.loc.start.line;o.test(f.parent.type)&&f.parent.alternate!==f||(b===d?v+=1:(y(),v=1,d=b),v===a+1&&(m=m||f))}function g(f){const b=O(f).loc.end.line;b!==d&&(y(),v=1,d=b)}return{BreakStatement:x,ClassDeclaration:x,ContinueStatement:x,DebuggerStatement:x,DoWhileStatement:x,ExpressionStatement:x,ForInStatement:x,ForOfStatement:x,ForStatement:x,FunctionDeclaration:x,IfStatement:x,ImportDeclaration:x,LabeledStatement:x,ReturnStatement:x,SwitchStatement:x,ThrowStatement:x,TryStatement:x,VariableDeclaration:x,WhileStatement:x,WithStatement:x,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,"BreakStatement:exit":g,"ClassDeclaration:exit":g,"ContinueStatement:exit":g,"DebuggerStatement:exit":g,"DoWhileStatement:exit":g,"ExpressionStatement:exit":g,"ForInStatement:exit":g,"ForOfStatement:exit":g,"ForStatement:exit":g,"FunctionDeclaration:exit":g,"IfStatement:exit":g,"ImportDeclaration:exit":g,"LabeledStatement:exit":g,"ReturnStatement:exit":g,"SwitchStatement:exit":g,"ThrowStatement:exit":g,"TryStatement:exit":g,"VariableDeclaration:exit":g,"WhileStatement:exit":g,"WithStatement:exit":g,"ExportNamedDeclaration:exit":g,"ExportDefaultDeclaration:exit":g,"ExportAllDeclaration:exit":g,"Program:exit":y}}},Fd}var _d,ww;function b5(){if(ww)return _d;ww=1;const c=Ze();return _d={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(s){const u=s.sourceCode,p=s.options[0]||"starred-block",d=!!(s.options[1]||{}).checkJSDoc;function v(D){return/^\s*\*/u.test(D)}function m([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return T.length>0&&T.every((R,F)=>(F===0||F===T.length-1?/^\s*$/u:/^\s*\*/u).test(R))}function o([D]){if(D.type!=="Block")return!1;const T=D.value.split(c.LINEBREAK_MATCHER);return/^\*\s*$/u.test(T[0])&&T.slice(1,-1).every(R=>/^\s* /u.test(R))&&/^\s*$/u.test(T.at(-1))}function y(D){const T=D.map(({value:R})=>R).filter(R=>R.trim().length).every(R=>R.startsWith(" "));return D.map(({value:R})=>T?R.replace(/^ /u,""):R)}function O(D){const T=D.value.split(c.LINEBREAK_MATCHER).filter((F,P,N)=>!(P===0||P===N.length-1)).map(F=>F.replace(/^\s*$/u,"")),R=T.map(F=>F.replace(/\s*\*/u,"")).filter(F=>F.trim().length).every(F=>F.startsWith(" "));return T.map(F=>F.replace(R?/\s*\* ?/u:/\s*\*/u,""))}function x(D){const T=D.value.split(c.LINEBREAK_MATCHER).map(P=>P.replace(/^\s*$/u,"")),R=`${u.text.slice(D.range[0]-D.loc.start.column,D.range[0])} `;let F="";for(const[P,N]of T.entries()){if(!N.trim().length||P===0)continue;const[,I]=N.match(/^(\s*\*?\s*)/u);if(I.lengthF.length&&(F=L)}}return T.map(P=>{const N=P.match(/^(\s*\*?\s*)(.*)/u),[,I,L]=N;return I.length>R.length?`${I.slice(R.length-(F.length+I.length))}${L}`:I.length`${R} * ${F}`).join(` +`)} +${R} */`}function S(D,T){return T.map(R=>`// ${R}`).join(` +${f(D)}`)}function E(D,T){return`/* ${T.join(` +${f(D)} `)} */`}const k={"starred-block"(D){const[T]=D,R=g(D);if(!R.some(F=>F.includes("*/")))if(D.length>1)s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){const P=[T.range[0],D.at(-1).range[1]];return R.some(N=>N.startsWith("/"))?null:F.replaceTextRange(P,b(T,R))}});else{const F=T.value.split(c.LINEBREAK_MATCHER),N=`${f(T)} *`;if(!/^\*?\s*$/u.test(F[0])){const I=T.value.startsWith("*")?T.range[0]+1:T.range[0];s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"startNewline",fix:L=>L.insertTextAfterRange([I,I+2],` +${N}`)})}/^\s*$/u.test(F.at(-1))||s.report({loc:{start:{line:T.loc.end.line,column:T.loc.end.column-2},end:T.loc.end},messageId:"endNewline",fix:I=>I.replaceTextRange([T.range[1]-2,T.range[1]],` +${N}/`)});for(let I=T.loc.start.line+1;I<=T.loc.end.line;I++){const L=u.lines[I-1],j=v(L)?"alignment":"missingStar";L.startsWith(N)||s.report({loc:{start:{line:I,column:0},end:{line:I,column:L.length}},messageId:j,fix(G){const U=u.getIndexFromLoc({line:I,column:0});if(j==="alignment"){const[,K=""]=L.match(/^(\s*\*)/u)||[],te=U+K.length;return G.replaceTextRange([U,te],N)}const[,Q=""]=L.match(/^(\s*)/u)||[],$=U+Q.length;let W;for(const[K,te]of F.entries()){if(!/\S+/u.test(te))continue;const V=u.lines[T.loc.start.line-1+K],[,ae="",z=""]=V.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];W=`${Q.slice(ae.length)}${z}`,/^\s*\//u.test(L)&&W.length===0&&(W+=" ");break}return G.replaceTextRange([U,$],`${N}${W}`)}})}}},"separate-lines"(D){const[T]=D,R=o(D);if(T.type!=="Block"||!d&&R)return;let F=g(D);R&&(F=F.slice(1,F.length-1));const P=u.getTokenAfter(T,{includeComments:!0});P&&T.loc.end.line===P.loc.start.line||s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedLines",fix(N){return N.replaceText(T,S(T,F))}})},"bare-block"(D){if(o(D))return;const[T]=D,R=g(D);T.type==="Line"&&R.length>1&&!R.some(F=>F.includes("*/"))&&s.report({loc:{start:T.loc.start,end:D.at(-1).loc.end},messageId:"expectedBlock",fix(F){return F.replaceTextRange([T.range[0],D.at(-1).range[1]],E(T,R))}}),m(D)&&s.report({loc:{start:T.loc.start,end:{line:T.loc.start.line,column:T.loc.start.column+2}},messageId:"expectedBareBlock",fix(F){return F.replaceText(T,E(T,R))}})}};return{Program(){return u.getAllComments().filter(D=>D.type!=="Shebang").filter(D=>!c.COMMENTS_IGNORE_PATTERN.test(D.value)).filter(D=>{const T=u.getTokenBefore(D,{includeComments:!0});return!T||T.loc.end.line{const P=u.getTokenBefore(T,{includeComments:!0});return T.type==="Line"&&R&&F[R-1].type==="Line"&&P&&P.loc.end.line===T.loc.start.line-1&&P===F[R-1]?D.at(-1).push(T):D.push([T]),D},[]).filter(D=>!(D.length===1&&D[0].loc.start.line===D[0].loc.end.line)).forEach(k[p])}}}},_d}var Bd,kw;function v5(){if(kw)return Bd;kw=1;const c=Ze();return Bd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(s){const u=s.sourceCode,p=s.options[0],a=p!=="never",d=p==="always-multiline";return{ConditionalExpression(v){const m=u.getTokenAfter(v.test,c.isNotClosingParenToken),o=u.getTokenAfter(v.consequent,c.isNotClosingParenToken),y=u.getFirstToken(v),O=u.getTokenBefore(m),x=u.getTokenAfter(m),g=u.getTokenBefore(o),f=u.getTokenAfter(o),b=c.isTokenOnSameLine(O,x),S=c.isTokenOnSameLine(g,f),E=!!u.getCommentsInside(v).length;if(!a)b||s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"unexpectedTestCons",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(O,m),R=c.isTokenOnSameLine(m,x);return T||D.push(k.removeRange([O.range[1],m.range[0]])),R||D.push(k.removeRange([m.range[1],x.range[0]])),D}}),S||s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"unexpectedConsAlt",fix(k){if(E)return null;const D=[],T=c.isTokenOnSameLine(g,o),R=c.isTokenOnSameLine(o,f);return T||D.push(k.removeRange([g.range[1],o.range[0]])),R||D.push(k.removeRange([o.range[1],f.range[0]])),D}});else{if(d&&v.loc.start.line===v.loc.end.line)return;b&&s.report({node:v.test,loc:{start:y.loc.start,end:O.loc.end},messageId:"expectedTestCons",fix:k=>E?null:k.replaceTextRange([O.range[1],m.range[0]],` +`)}),S&&s.report({node:v.consequent,loc:{start:x.loc.start,end:g.loc.end},messageId:"expectedConsAlt",fix:k=>E?null:k.replaceTextRange([g.range[1],o.range[0]],` +`)})}}}}},Bd}var Ld,Aw;function x5(){if(Aw)return Ld;Aw=1;const c=Ze(),s=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function u(d,v,m){if(Object.hasOwn(d,v)&&!Array.isArray(d[v]))throw new TypeError(`${v}, if provided, must be an Array`);return d[v]||m}function p(d,v){return d[v]=!0,d}function a(d){let v=u(d,"capIsNewExceptions",s);return v!==s&&(v=v.concat(s)),v.reduce(p,{})}return Ld={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(d){const v=Object.assign({},d.options[0]);v.newIsCap=v.newIsCap!==!1,v.capIsNew=v.capIsNew!==!1;const m=v.properties===!1,o=u(v,"newIsCapExceptions",[]).reduce(p,{}),y=v.newIsCapExceptionPattern?new RegExp(v.newIsCapExceptionPattern,"u"):null,O=a(v),x=v.capIsNewExceptionPattern?new RegExp(v.capIsNewExceptionPattern,"u"):null,g={},f=d.sourceCode;function b(D){return D.callee.type==="Identifier"?D.callee.name:c.getStaticPropertyName(D.callee)||""}function S(D){const T=D.charAt(0),R=T.toLowerCase(),F=T.toUpperCase();return R===F?"non-alpha":T===R?"lower":"upper"}function E(D,T,R,F){const P=f.getText(T.callee);if(D[R]||D[P]||F&&F.test(P))return!0;const N=c.skipChainExpression(T.callee);return R==="UTC"&&N.type==="MemberExpression"?N.object.type==="Identifier"&&N.object.name==="Date":m&&N.type==="MemberExpression"}function k(D,T){let R=c.skipChainExpression(D.callee);R.type==="MemberExpression"&&(R=R.property),d.report({node:D,loc:R.loc,messageId:T})}return v.newIsCap&&(g.NewExpression=function(D){const T=b(D);T&&(S(T)!=="lower"||E(o,D,T,y)||k(D,"lower"))}),v.capIsNew&&(g.CallExpression=function(D){const T=b(D);T&&(S(T)!=="upper"||E(O,D,T,x)||k(D,"upper"))}),g}},Ld}var Nd,Pw;function O5(){if(Pw)return Nd;Pw=1;const c=Ze();return Nd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(s){const p=s.options[0]!=="never",a=s.sourceCode;return{NewExpression(d){if(d.arguments.length!==0)return;const v=a.getLastToken(d),o=v&&c.isClosingParenToken(v)&&c.isOpeningParenToken(a.getTokenBefore(v))&&d.callee.range[1]y.insertTextAfter(d,"()")}):o&&s.report({node:d,messageId:"unnecessary",fix:y=>[y.remove(a.getTokenBefore(v)),y.remove(v),y.insertTextBefore(d,"("),y.insertTextAfter(d,")")]})}}}},Nd}var Md,Tw;function S5(){if(Tw)return Md;Tw=1;const c=Ze();return Md={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(s){const u=s.sourceCode,p=s.options[0]==="never"?"never":"always",a=u.getAllComments().reduce((f,b)=>(f[b.loc.start.line]=b.loc.end.line,f),{});function d(f){const b=u.getLastToken(f);if(b.type==="Punctuator"&&b.value===";"){const S=u.getTokenBefore(b);if(S.loc.end.line!==b.loc.start.line)return S}return b}function v(f){return f==="var"||f==="let"||f==="const"}function m(f){return f==="ForStatement"||f==="ForInStatement"||f==="ForOfStatement"}function o(f){return f==="ExportNamedDeclaration"||f==="ExportSpecifier"||f==="ExportDefaultDeclaration"||f==="ExportAllDeclaration"}function y(f){const b=u.getTokenAfter(f);return!b||b.type==="Punctuator"&&b.value==="}"}function O(f){const b=a[f];return a[b+1]?O(b+1):b}function x(f,b){return f.loc.start.line>O(b)+1}function g(f){const b=d(f),S=b===u.getLastToken(f)?u.getTokenAfter(f):u.getLastToken(f),E=b.loc.end.line+1;if(!S||m(f.parent.type)||o(f.parent.type)||S.type==="Keyword"&&v(S.value)||y(f))return;const k=S.loc.start.line>E,D=typeof a[E]<"u";p==="never"&&k&&!D&&s.report({node:f,messageId:"unexpected",fix(T){const R=u.getText().slice(b.range[1],S.range[0]).split(c.LINEBREAK_MATCHER);return T.replaceTextRange([b.range[1],S.range[0]],`${R.slice(0,-1).join("")} +${R.at(-1)}`)}}),p==="always"&&(!k||D&&!x(S,E))&&s.report({node:f,messageId:"expected",fix(T){return(k?O(E):b.loc.end.line)===S.loc.start.line?T.insertTextBefore(S,` + +`):T.insertTextBeforeRange([S.range[0]-S.loc.start.column,S.range[1]],` +`)}})}return{VariableDeclaration:g}}},Md}var $d,Dw;function E5(){return Dw||(Dw=1,$d={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(c){const s=c.sourceCode;function u(o,y){const O=s.getTokenBefore(o);return y.includes(O.value)}function p(o){const y=o.parent.type;return o.parent.body?Array.isArray(o.parent.body)?o.parent.body[0]===o:o.parent.body===o:y==="IfStatement"?u(o,["else",")"]):y==="DoWhileStatement"?u(o,["do"]):y==="SwitchCase"?u(o,[":"]):u(o,[")"])}function a(o,y){const O=s.getCommentsBefore(o);let x=0;return O.length&&O.forEach(g=>{x++,g.type==="Block"&&(x+=g.loc.end.line-g.loc.start.line),g.loc.start.line===y&&x--,g.loc.end.line===o.loc.start.line&&x--}),x}function d(o){const y=s.getTokenBefore(o);let O;return y?O=y.loc.end.line:O=0,O}function v(o){const y=o.loc.start.line,O=d(o),x=a(o,O);return y-O-x>1}function m(o){const y=s.getCommentsBefore(o),O=y.at(-1),x=s.getTokenBefore(o);return y.length===0||O.loc.end.line===x.loc.end.line&&O.loc.end.line!==o.loc.start.line}return{ReturnStatement(o){!p(o)&&!v(o)&&c.report({node:o,messageId:"expected",fix(y){if(m(o)){const O=s.getTokenBefore(o),x=o.loc.start.line===O.loc.end.line?` + +`:` +`;return y.insertTextBefore(o,x)}return null}})}}}}),$d}var jd,Iw;function C5(){if(Iw)return jd;Iw=1;const c=Ze();return jd={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(s){const u=s.options[0]||{},p=u.ignoreChainWithDepth||2,a=s.sourceCode;function d(m){return m.computed?m.optional?"?.[":"[":m.optional?"?.":"."}function v(m){const o=d(m),y=a.getText(m.property).split(c.LINEBREAK_MATCHER),O=m.computed&&y.length===1?"]":"";return o+y[0]+O}return{"CallExpression:exit"(m){const o=c.skipChainExpression(m.callee);if(o.type!=="MemberExpression")return;let y=c.skipChainExpression(o.object),O=1;for(;y&&y.callee;)O+=1,y=c.skipChainExpression(c.skipChainExpression(y.callee).object);if(O>p&&c.isTokenOnSameLine(o.object,o.property)){const x=a.getTokenAfter(o.object,c.isNotClosingParenToken);s.report({node:o.property,loc:{start:x.loc.start,end:o.loc.end},messageId:"expected",data:{callee:v(o)},fix(g){return g.insertTextBefore(x,` +`)}})}}}}},jd}var qd,Rw;function w5(){if(Rw)return qd;Rw=1;const{getStaticPropertyName:c,getVariableByName:s,skipChainExpression:u}=Ze();function p(m){return/^(alert|confirm|prompt)$/u.test(m)}function a(m,o){const y=m.references.filter(O=>O.identifier.range[0]===o.range[0]&&O.identifier.range[1]===o.range[1]);return y.length===1?y[0]:null}function d(m,o){const y=a(m,o);return y&&y.resolved&&y.resolved.defs.length>0}function v(m,o){return m.type==="global"&&o.type==="ThisExpression"?!0:o.type==="Identifier"&&(o.name==="window"||o.name==="globalThis"&&s(m,"globalThis"))?!d(m,o):!1}return qd={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(m){const o=m.sourceCode;return{CallExpression(y){const O=u(y.callee),x=o.getScope(y);if(O.type==="Identifier"){const g=O.name;!d(x,O)&&p(O.name)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}else if(O.type==="MemberExpression"&&v(x,O.object)){const g=c(O);p(g)&&m.report({node:y,messageId:"unexpected",data:{name:g}})}}}}},qd}var Qd,Fw;function k5(){if(Fw)return Qd;Fw=1;const{getVariableByName:c,isClosingParenToken:s,isOpeningParenToken:u,isStartOfExpressionStatement:p,needsPrecedingSemicolon:a}=Ze();return Qd={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(d){const v=d.sourceCode;function m(y){const O=v.getLastToken(y);if(!s(O))return"";let x=y.callee;do if(x=v.getTokenAfter(x),!x||x===O)return"";while(!u(x));return v.text.slice(x.range[1],O.range[0])}function o(y){if(y.callee.type!=="Identifier"||y.callee.name!=="Array"||y.arguments.length===1&&y.arguments[0].type!=="SpreadElement")return;const O=c(v.getScope(y),"Array");if(O&&O.identifiers.length===0){const x=m(y);let g,f;p(y)&&a(v,y)?(g=`;[${x}]`,f="useLiteralAfterSemicolon"):(g=`[${x}]`,f="useLiteral"),d.report({node:y,messageId:"preferLiteral",suggest:[{messageId:f,fix:b=>b.replaceText(y,g)}]})}}return{CallExpression:o,NewExpression:o}}},Qd}var Ud,_w;function A5(){return _w||(_w=1,Ud={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(c){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(s){c.report({node:c.sourceCode.getFirstToken(s.arguments[0],u=>u.value==="async"),messageId:"async"})}}}}),Ud}var Vd,Bw;function P5(){if(Bw)return Vd;Bw=1;function c(u){const p=u.type;return p==="FunctionDeclaration"||p==="FunctionExpression"||p==="ArrowFunctionExpression"||p==="ForOfStatement"&&u.await===!0}function s(u,p){switch(p.type){case"ForStatement":return u===p.test||u===p.update||u===p.body;case"ForOfStatement":case"ForInStatement":return u===p.body;case"WhileStatement":case"DoWhileStatement":return u===p.test||u===p.body;default:return!1}}return Vd={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(u){function p(a){if(a.type==="ForOfStatement"&&!a.await)return;let d=a,v=d.parent;for(;v&&!c(v);){if(s(d,v)){u.report({node:a,messageId:"unexpectedAwait"});return}d=v,v=v.parent}}return{AwaitExpression:p,ForOfStatement:p}}},Vd}var Wd,Lw;function T5(){if(Lw)return Wd;Lw=1;const c=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return Wd={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:c},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(s){const u=s.options[0]||{},p=u.allow||[],a=u.int32Hint===!0;function d(O){s.report({node:O,messageId:"unexpected",data:{operator:O.operator}})}function v(O){return c.includes(O.operator)}function m(O){return p.includes(O.operator)}function o(O){return a&&O.operator==="|"&&O.right&&O.right.type==="Literal"&&O.right.value===0}function y(O){v(O)&&!m(O)&&!o(O)&&d(O)}return{AssignmentExpression:y,BinaryExpression:y,UnaryExpression:y}}},Wd}var Gd,Nw;function D5(){return Nw||(Nw=1,Gd={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(c){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(s){c.report({node:s,messageId:"deprecated",data:{expr:s.type==="CallExpression"?"Buffer()":"new Buffer()"}})}}}}),Gd}var zd,Mw;function I5(){return Mw||(Mw=1,zd={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="arguments"&&!s.computed&&p&&p.match(/^calle[er]$/u)&&c.report({node:s,messageId:"unexpected",data:{prop:p}})}}}}),zd}var Zd,$w;function R5(){return $w||($w=1,Zd={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},hasSuggestions:!0,schema:[],messages:{addBrackets:"Add {} brackets around the case block.",unexpected:"Unexpected lexical declaration in case block."}},create(c){function s(u){switch(u.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return u.kind!=="var";default:return!1}}return{SwitchCase(u){for(let p=0;p[d.insertTextBefore(u.consequent[0],"{ "),d.insertTextAfter(u.consequent.at(-1)," }")]}]})}}}}}),Zd}var Xd,jw;function F5(){if(jw)return Xd;jw=1;const c=Ze();return Xd={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{"CatchClause[param!=null]"(a){let d=u.getScope(a);d.block===a&&(d=d.upper),p(d,a.param.name)&&s.report({node:a,messageId:"mutable",data:{name:a.param.name}})}}}},Xd}var Yd,qw;function _5(){if(qw)return Yd;qw=1;const c=Ze();return Yd={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(s){const u=s.sourceCode;function p(d){c.getModifyingReferences(d.references).forEach(v=>{s.report({node:v.identifier,messageId:"class",data:{name:v.identifier.name}})})}function a(d){u.getDeclaredVariables(d).forEach(p)}return{ClassDeclaration:a,ClassExpression:a}}},Yd}var Hd,Qw;function B5(){return Qw||(Qw=1,Hd={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(c){function s(p){return p.type==="UnaryExpression"&&p.operator==="-"&&p.argument.type==="Literal"&&p.argument.value===0}const u=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(p){u.has(p.operator)&&(s(p.left)||s(p.right))&&c.report({node:p,messageId:"unexpected",data:{operator:p.operator}})}}}}),Hd}var Kd,Uw;function L5(){if(Uw)return Kd;Uw=1;const c=Ze(),s=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),u={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return Kd={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(p){const a=p.options[0]||"except-parens",d=p.sourceCode;function v(x){return x.parent&&s.has(x.parent.type)&&x===x.parent.test}function m(x){let g=x;do if(v(g))return g.parent;while((g=g.parent)&&!c.isFunction(g));return null}function o(x){const g=d.getTokenBefore(x,1),f=d.getTokenAfter(x,1);return c.isParenthesised(d,x)&&g&&c.isOpeningParenToken(g)&&g.range[1]<=x.range[0]&&c.isClosingParenToken(f)&&f.range[0]>=x.range[1]}function y(x){x.test&&x.test.type==="AssignmentExpression"&&(x.type==="ForStatement"?!c.isParenthesised(d,x.test):!o(x.test))&&p.report({node:x.test,messageId:"missing"})}function O(x){const g=m(x);g&&p.report({node:x,messageId:"unexpected",data:{type:u[g.type]||g.type}})}return a==="always"?{AssignmentExpression:O}:{DoWhileStatement:y,ForStatement:y,IfStatement:y,WhileStatement:y,ConditionalExpression:y}}},Kd}var Jd,Vw;function N5(){if(Vw)return Jd;Vw=1;const c=Ze();function s(u){return u&&u.type==="ConditionalExpression"}return Jd={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(u){const p=u.options[0]||{},a=p.allowParens||p.allowParens===void 0,d=p.onlyOneSimpleParam,v=u.sourceCode;function m(o){const y=o.body;s(y)&&!(a&&c.isParenthesised(v,y))&&!(d&&!(o.params.length===1&&o.params[0].type==="Identifier"))&&u.report({node:o,messageId:"confusing",fix(O){return a&&O.replaceText(o.body,`(${v.getText(o.body)})`)}})}return{ArrowFunctionExpression:m}}},Jd}var em,Ww;function M5(){if(Ww)return em;Ww=1;const c=Ze();return em={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(s){const p=(s.options[0]||{}).allow||[],a=s.sourceCode;function d(x){const g=x.identifier;return g&&g.name==="console"}function v(x){const g=c.getStaticPropertyName(x);return g&&p.includes(g)}function m(x){const g=x.identifier,f=g.parent;return f.type==="MemberExpression"&&f.object===g&&!v(f)}function o(x){const g=/^[:;{]$/u,f=/^[-[(/+`]/u,b=a.getTokenBefore(x),S=a.getTokenAfter(x);return!!S&&f.test(S.value)&&S.value!=="++"&&S.value!=="--"&&!!b&&!g.test(b.value)}function y(x){return x.parent.type==="CallExpression"&&x.parent.callee===x&&x.parent.parent.type==="ExpressionStatement"&&c.STATEMENT_LIST_PARENTS.has(x.parent.parent.parent.type)&&!o(x.parent.parent)}function O(x){const g=x.identifier.parent,f=c.getStaticPropertyName(g);s.report({node:g,loc:g.loc,messageId:"unexpected",suggest:y(g)?[{messageId:"removeConsole",data:{propertyName:f},fix(b){return b.remove(g.parent.parent)}}]:[]})}return{"Program:exit"(x){const g=a.getScope(x),f=c.getVariableByName(g,"console"),b=f&&f.defs.length>0,S=f?f.references:g.through.filter(d);b||S.filter(m).forEach(O)}}}},em}var tm,Gw;function $5(){if(Gw)return tm;Gw=1;const c=Ze();return tm={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"const",data:{name:d.identifier.name}})})}return{VariableDeclaration(a){a.kind==="const"&&u.getDeclaredVariables(a).forEach(p)}}}},tm}var rm,zw;function j5(){if(zw)return rm;zw=1;const{isNullLiteral:c,isConstant:s,isReferenceToGlobalVariable:u,isLogicalAssignmentOperator:p,ECMASCRIPT_GLOBALS:a}=Ze(),d=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function v(f,b){return c(b)||b.type==="Identifier"&&b.name==="undefined"&&u(f,b)||b.type==="UnaryExpression"&&b.operator==="void"}function m(f,b,S){if(S&&v(f,b))return!1;switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":return!0;case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const E=b.callee.name;return(E==="Boolean"||E==="String"||E==="Number")&&u(f,b.callee)}case"LogicalExpression":return b.operator==="??"&&m(f,b.right,!0);case"AssignmentExpression":return b.operator==="="?m(f,b.right,S):!p(b.operator);case"UnaryExpression":return!0;case"SequenceExpression":{const E=b.expressions.at(-1);return m(f,E,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function o(f,b){switch(b.type){case"Literal":return typeof b.value=="boolean";case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)&&(b.arguments.length===0||s(f,b.arguments[0],!0));case"UnaryExpression":return b.operator==="!"&&s(f,b.argument,!0);default:return!1}}function y(f,b){switch(b.type){case"ObjectExpression":case"ClassExpression":return!0;case"ArrayExpression":{const S=b.elements.filter(E=>E!==null&&E.type!=="SpreadElement");return b.elements.length===0||S.length>1}case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"UnaryExpression":return b.operator==="void"||b.operator==="typeof"?!0:b.operator==="!"?s(f,b.argument,!0):!1;case"NewExpression":return!1;case"CallExpression":return b.callee.type==="Identifier"&&b.callee.name==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1;case"Literal":return!0;case"Identifier":return b.name==="undefined"&&u(f,b);case"TemplateLiteral":return b.expressions.length===0;case"AssignmentExpression":return b.operator==="="?y(f,b.right):!1;case"SequenceExpression":{const S=b.expressions.at(-1);return y(f,S)}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function O(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return d.has(b.operator);case"UnaryExpression":return b.operator==="delete"?!1:b.operator==="!"?s(f,b.argument,!0):!0;case"SequenceExpression":{const S=b.expressions.at(-1);return O(f,S)}case"Identifier":return b.name==="undefined"&&u(f,b);case"AssignmentExpression":return b.operator==="="?O(f,b.right):!p(b.operator);case"CallExpression":{if(b.callee.type!=="Identifier")return!1;const S=b.callee.name;return(S==="String"||S==="Number")&&u(f,b.callee)?!0:S==="Boolean"&&u(f,b.callee)?b.arguments.length===0||s(f,b.arguments[0],!0):!1}case"JSXElement":case"JSXFragment":return!1;default:return!1}}function x(f,b){switch(b.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return b.callee.type!=="Identifier"?!1:Object.hasOwn(a,b.callee.name)&&u(f,b.callee);case"Literal":return typeof b.regex=="object";case"SequenceExpression":{const S=b.expressions.at(-1);return x(f,S)}case"AssignmentExpression":return b.operator==="="?x(f,b.right):!1;case"ConditionalExpression":return x(f,b.consequent)&&x(f,b.alternate);case"JSXElement":case"JSXFragment":return!1;default:return!1}}function g(f,b,S,E){if(E==="=="||E==="!="){if(v(f,b)&&m(f,S,!1)||o(f,b)&&y(f,S))return S}else if((E==="==="||E==="!==")&&(v(f,b)&&m(f,S,!1)||o(f,b)&&O(f,S)))return S;return null}return rm={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(f){const b=f.sourceCode;return{LogicalExpression(S){const{operator:E,left:k}=S,D=b.getScope(S);(E==="&&"||E==="||")&&s(D,k,!0)?f.report({node:k,messageId:"constantShortCircuit",data:{property:"truthiness",operator:E}}):E==="??"&&m(D,k,!1)&&f.report({node:k,messageId:"constantShortCircuit",data:{property:"nullishness",operator:E}})},BinaryExpression(S){const E=b.getScope(S),{right:k,left:D,operator:T}=S,R=g(E,D,k,T),F=g(E,k,D,T);R?f.report({node:R,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"left"}}):F?f.report({node:F,messageId:"constantBinaryOperand",data:{operator:T,otherSide:"right"}}):T==="==="||T==="!=="?x(E,D)?f.report({node:D,messageId:"alwaysNew"}):x(E,k)&&f.report({node:k,messageId:"alwaysNew"}):(T==="=="||T==="!=")&&x(E,D)&&x(E,k)&&f.report({node:D,messageId:"bothAlwaysNew"})}}}},rm}var nm,Zw;function q5(){if(Zw)return nm;Zw=1;const{isConstant:c}=Ze();return nm={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{enum:["all","allExceptWhileTrue","none",!0,!1]}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(s){const u=s.options[0]||{};let p=u.checkLoops??"allExceptWhileTrue";const a=[],d=s.sourceCode;u.checkLoops===!0?p="all":u.checkLoops===!1&&(p="none");let v=new Set;function m(f){f.test&&c(d.getScope(f),f.test,!0)&&v.add(f)}function o(f){v.has(f)&&(v.delete(f),s.report({node:f.test,messageId:"unexpected"}))}function y(f){f.test&&c(d.getScope(f),f.test,!0)&&s.report({node:f.test,messageId:"unexpected"})}function O(){a.push(v),v=new Set}function x(){v=a.pop()}function g(f){(p==="all"||p==="allExceptWhileTrue")&&m(f)}return{ConditionalExpression:y,IfStatement:y,WhileStatement(f){f.test.type==="Literal"&&f.test.value===!0&&p==="allExceptWhileTrue"||g(f)},"WhileStatement:exit":o,DoWhileStatement:g,"DoWhileStatement:exit":o,ForStatement:g,"ForStatement > .test":f=>g(f.parent),"ForStatement:exit":o,FunctionDeclaration:O,"FunctionDeclaration:exit":x,FunctionExpression:O,"FunctionExpression:exit":x,YieldExpression:()=>v.clear()}}},nm}var sm,Xw;function Q5(){return Xw||(Xw=1,sm={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:[],fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(c){const s=[];return{onCodePathStart(u,p){s.push(p)},onCodePathEnd(){s.pop()},ReturnStatement(u){const p=s.at(-1);p.parent&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"&&u.argument&&c.report({node:u,messageId:"unexpected"})}}}}),sm}var im,Yw;function U5(){return Yw||(Yw=1,im={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(c){return{ContinueStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),im}var Es={},Hw;function Cs(){if(Hw)return Es;Hw=1,Object.defineProperty(Es,"__esModule",{value:!0});var c=Object.freeze({__proto__:null});const s=2025;let u,p;function a(nt){return nt<65?!1:nt<91?!0:nt<97?!1:nt<123?!0:v(nt)}function d(nt){return nt<48?!1:nt<58?!0:nt<65?!1:nt<91||nt===95?!0:nt<97?!1:nt<123?!0:v(nt)||m(nt)}function v(nt){return O(nt,u??(u=o()))}function m(nt){return O(nt,p??(p=y()))}function o(){return x("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f")}function y(){return x("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n")}function O(nt,H){let he=0,Ae=H.length/2|0,Xe=0,w=0,M=0;for(;heM)he=Xe+1;else return!0;return!1}function x(nt){let H=0;return nt.split(" ").map(he=>H+=parseInt(he,36)|0)}class g{constructor(H,he,Ae,Xe,w,M,J,le){this._raw2018=H,this._raw2019=he,this._raw2020=Ae,this._raw2021=Xe,this._raw2022=w,this._raw2023=M,this._raw2024=J,this._raw2025=le}get es2018(){var H;return(H=this._set2018)!==null&&H!==void 0?H:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var H;return(H=this._set2019)!==null&&H!==void 0?H:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var H;return(H=this._set2020)!==null&&H!==void 0?H:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var H;return(H=this._set2021)!==null&&H!==void 0?H:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var H;return(H=this._set2022)!==null&&H!==void 0?H:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var H;return(H=this._set2023)!==null&&H!==void 0?H:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var H;return(H=this._set2024)!==null&&H!==void 0?H:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var H;return(H=this._set2025)!==null&&H!==void 0?H:this._set2025=new Set(this._raw2025.split(" "))}}const f=new Set(["General_Category","gc"]),b=new Set(["Script","Script_Extensions","sc","scx"]),S=new g("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","",""),E=new g("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz","",""),k=new g("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","",""),D=new g("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","");function T(nt,H,he){return f.has(H)?nt>=2018&&S.es2018.has(he):b.has(H)?nt>=2018&&E.es2018.has(he)||nt>=2019&&E.es2019.has(he)||nt>=2020&&E.es2020.has(he)||nt>=2021&&E.es2021.has(he)||nt>=2022&&E.es2022.has(he)||nt>=2023&&E.es2023.has(he):!1}function R(nt,H){return nt>=2018&&k.es2018.has(H)||nt>=2019&&k.es2019.has(H)||nt>=2021&&k.es2021.has(H)}function F(nt,H){return nt>=2024&&D.es2024.has(H)}const P=8,N=9,I=10,L=11,j=12,G=13,U=33,Q=35,$=36,W=37,K=38,te=40,V=41,ae=42,z=43,ue=44,ne=45,ce=46,pe=47,Be=48,oe=49,Z=55,ge=57,Re=58,Se=59,we=60,Me=61,it=62,pt=63,kt=64,qt=65,Ut=66,tr=68,fe=70,Ve=80,mt=83,Pt=87,Bt=90,se=95,Kt=97,Vt=98,ir=99,Ot=100,Zt=102,hr=103,Dt=105,Dr=107,Et=109,Ie=110,ke=112,Te=113,Ue=114,lt=115,Oe=116,Pe=117,de=118,ye=119,Le=120,X=121,ee=122,be=91,Ee=92,ve=93,Ne=94,Ke=96,at=123,dt=124,ht=125,Ce=126,xe=8204,je=8205,ze=8232,Ge=8233,ut=0,qe=1114111;function et(nt){return nt>=qt&&nt<=Bt||nt>=Kt&&nt<=ee}function bt(nt){return nt>=Be&&nt<=ge}function rt(nt){return nt>=Be&&nt<=Z}function St(nt){return nt>=Be&&nt<=ge||nt>=qt&&nt<=fe||nt>=Kt&&nt<=Zt}function jt(nt){return nt===I||nt===G||nt===ze||nt===Ge}function Wt(nt){return nt>=ut&&nt<=qe}function Lt(nt){return nt>=Kt&&nt<=Zt?nt-Kt+10:nt>=qt&&nt<=fe?nt-qt+10:nt-Be}function rr(nt){return nt>=55296&&nt<=56319}function ar(nt){return nt>=56320&&nt<=57343}function nr(nt,H){return(nt-55296)*1024+(H-56320)+65536}class Lr{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(H){return this.groupName.has(H)}hasInScope(H){return this.hasInPattern(H)}addToScope(H){this.groupName.add(H)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class wr{constructor(H,he){this.parent=H,this.base=he??this}separatedFrom(H){var he,Ae;return this.base===H.base&&this!==H||H.parent&&this.separatedFrom(H.parent)?!0:(Ae=(he=this.parent)===null||he===void 0?void 0:he.separatedFrom(H))!==null&&Ae!==void 0?Ae:!1}child(){return new wr(this,null)}sibling(){return new wr(this.parent,this.base)}}class Nr{constructor(){this.branchID=new wr(null,null),this.groupNames=new Map}clear(){this.branchID=new wr(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(H){H!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(H){return this.groupNames.has(H)}hasInScope(H){const he=this.groupNames.get(H);if(!he)return!1;for(const Ae of he)if(!Ae.separatedFrom(this.branchID))return!0;return!1}addToScope(H){const he=this.groupNames.get(H);if(he){he.push(this.branchID);return}this.groupNames.set(H,[this.branchID])}}const wn={at(nt,H,he){return he65535?2:1}};class Rt{constructor(){this._impl=wn,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(H,he,Ae,Xe){this._impl=Xe?jn:wn,this._s=H,this._end=Ae,this.rewind(he)}rewind(H){const he=this._impl;this._i=H,this._cp1=he.at(this._s,this._end,H),this._w1=he.width(this._cp1),this._cp2=he.at(this._s,this._end,H+this._w1),this._w2=he.width(this._cp2),this._cp3=he.at(this._s,this._end,H+this._w1+this._w2),this._w3=he.width(this._cp3),this._cp4=he.at(this._s,this._end,H+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const H=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=H.width(this._cp2),this._cp3=this._cp4,this._w3=H.width(this._cp3),this._cp4=H.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(H){return this._cp1===H?(this.advance(),!0):!1}eat2(H,he){return this._cp1===H&&this._cp2===he?(this.advance(),this.advance(),!0):!1}eat3(H,he,Ae){return this._cp1===H&&this._cp2===he&&this._cp3===Ae?(this.advance(),this.advance(),this.advance(),!0):!1}}class Wr extends SyntaxError{constructor(H,he){super(H),this.index=he}}function Mr(nt,H,he,Ae){let Xe="";if(nt.kind==="literal"){const w=nt.source.slice(nt.start,nt.end);w&&(Xe=`: ${w}`)}else if(nt.kind==="pattern"){const w=nt.source.slice(nt.start,nt.end),M=`${H.unicode?"u":""}${H.unicodeSets?"v":""}`;Xe=`: /${w}/${M}`}return new Wr(`Invalid regular expression${Xe}: ${Ae}`,he)}const kn=new Set([Ne,$,Ee,ce,ae,z,pt,te,V,be,ve,at,ht,dt]),Xn=new Set([K,U,Q,$,W,ae,z,ue,ce,Re,Se,we,Me,it,pt,kt,Ne,Ke,Ce]),ai=new Set([te,V,be,ve,at,ht,pe,ne,Ee,dt]),oi=new Set([K,ne,U,Q,W,ue,Re,Se,we,Me,it,kt,Ke,Ce]);function Yn(nt){return kn.has(nt)}function us(nt){return Xn.has(nt)}function cs(nt){return ai.has(nt)}function mn(nt){return oi.has(nt)}function Jr(nt){return a(nt)||nt===$||nt===se}function fs(nt){return d(nt)||nt===$||nt===xe||nt===je}function ws(nt){return et(nt)||nt===se}function Wi(nt){return ws(nt)||bt(nt)}class Gi{constructor(H){this._reader=new Rt,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=H??{},this._groupSpecifiers=this.ecmaVersion>=2025?new Nr:new Lr}validateLiteral(H,he=0,Ae=H.length){if(this._srcCtx={source:H,start:he,end:Ae,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(H,he,Ae),this.onLiteralEnter(he),this.eat(pe)&&this.eatRegExpBody()&&this.eat(pe)){const Xe=this.index,w=H.includes("u",Xe),M=H.includes("v",Xe);this.validateFlagsInternal(H,Xe,Ae),this.validatePatternInternal(H,he+1,Xe-1,{unicode:w,unicodeSets:M})}else if(he>=Ae)this.raise("Empty");else{const Xe=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${Xe}'`)}this.onLiteralLeave(he,Ae)}validateFlags(H,he=0,Ae=H.length){this._srcCtx={source:H,start:he,end:Ae,kind:"flags"},this.validateFlagsInternal(H,he,Ae)}validatePattern(H,he=0,Ae=H.length,Xe=void 0){this._srcCtx={source:H,start:he,end:Ae,kind:"pattern"},this.validatePatternInternal(H,he,Ae,Xe)}validatePatternInternal(H,he=0,Ae=H.length,Xe=void 0){const w=this._parseFlagsOptionToMode(Xe,Ae);this._unicodeMode=w.unicodeMode,this._nFlag=w.nFlag,this._unicodeSetsMode=w.unicodeSetsMode,this.reset(H,he,Ae),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(he),this.consumePattern())}validateFlagsInternal(H,he,Ae){const Xe=new Set;let w=!1,M=!1,J=!1,le=!1,De=!1,He=!1,tt=!1,wt=!1;for(let Tt=he;Tt=2015?De=!0:Xt===X&&this.ecmaVersion>=2015?le=!0:Xt===lt&&this.ecmaVersion>=2018?He=!0:Xt===Ot&&this.ecmaVersion>=2022?tt=!0:Xt===de&&this.ecmaVersion>=2024?wt=!0:this.raise(`Invalid flag '${H[Tt]}'`,{index:he})}this.onRegExpFlags(he,Ae,{global:w,ignoreCase:M,multiline:J,unicode:De,sticky:le,dotAll:He,hasIndices:tt,unicodeSets:wt})}_parseFlagsOptionToMode(H,he){let Ae=!1,Xe=!1;H&&this.ecmaVersion>=2015&&(typeof H=="object"?(Ae=!!H.unicode,this.ecmaVersion>=2024&&(Xe=!!H.unicodeSets)):Ae=H),Ae&&Xe&&this.raise("Invalid regular expression flags",{index:he+1,unicode:Ae,unicodeSets:Xe});const w=Ae||Xe,M=Ae&&this.ecmaVersion>=2018||Xe||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:w,nFlag:M,unicodeSetsMode:Xe}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var H;return(H=this._options.ecmaVersion)!==null&&H!==void 0?H:s}onLiteralEnter(H){this._options.onLiteralEnter&&this._options.onLiteralEnter(H)}onLiteralLeave(H,he){this._options.onLiteralLeave&&this._options.onLiteralLeave(H,he)}onRegExpFlags(H,he,Ae){this._options.onRegExpFlags&&this._options.onRegExpFlags(H,he,Ae),this._options.onFlags&&this._options.onFlags(H,he,Ae.global,Ae.ignoreCase,Ae.multiline,Ae.unicode,Ae.sticky,Ae.dotAll,Ae.hasIndices)}onPatternEnter(H){this._options.onPatternEnter&&this._options.onPatternEnter(H)}onPatternLeave(H,he){this._options.onPatternLeave&&this._options.onPatternLeave(H,he)}onDisjunctionEnter(H){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(H)}onDisjunctionLeave(H,he){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(H,he)}onAlternativeEnter(H,he){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(H,he)}onAlternativeLeave(H,he,Ae){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(H,he,Ae)}onGroupEnter(H){this._options.onGroupEnter&&this._options.onGroupEnter(H)}onGroupLeave(H,he){this._options.onGroupLeave&&this._options.onGroupLeave(H,he)}onCapturingGroupEnter(H,he){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(H,he)}onCapturingGroupLeave(H,he,Ae){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(H,he,Ae)}onQuantifier(H,he,Ae,Xe,w){this._options.onQuantifier&&this._options.onQuantifier(H,he,Ae,Xe,w)}onLookaroundAssertionEnter(H,he,Ae){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(H,he,Ae)}onLookaroundAssertionLeave(H,he,Ae,Xe){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(H,he,Ae,Xe)}onEdgeAssertion(H,he,Ae){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(H,he,Ae)}onWordBoundaryAssertion(H,he,Ae,Xe){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(H,he,Ae,Xe)}onAnyCharacterSet(H,he,Ae){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(H,he,Ae)}onEscapeCharacterSet(H,he,Ae,Xe){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(H,he,Ae,Xe)}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J)}onCharacter(H,he,Ae){this._options.onCharacter&&this._options.onCharacter(H,he,Ae)}onBackreference(H,he,Ae){this._options.onBackreference&&this._options.onBackreference(H,he,Ae)}onCharacterClassEnter(H,he,Ae){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(H,he,Ae)}onCharacterClassLeave(H,he,Ae){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(H,he,Ae)}onCharacterClassRange(H,he,Ae,Xe){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(H,he,Ae,Xe)}onClassIntersection(H,he){this._options.onClassIntersection&&this._options.onClassIntersection(H,he)}onClassSubtraction(H,he){this._options.onClassSubtraction&&this._options.onClassSubtraction(H,he)}onClassStringDisjunctionEnter(H){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(H)}onClassStringDisjunctionLeave(H,he){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(H,he)}onStringAlternativeEnter(H,he){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(H,he)}onStringAlternativeLeave(H,he,Ae){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(H,he,Ae)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(H,he,Ae){this._reader.reset(H,he,Ae,this._unicodeMode)}rewind(H){this._reader.rewind(H)}advance(){this._reader.advance()}eat(H){return this._reader.eat(H)}eat2(H,he){return this._reader.eat2(H,he)}eat3(H,he,Ae){return this._reader.eat3(H,he,Ae)}raise(H,he){var Ae,Xe,w;throw Mr(this._srcCtx,{unicode:(Ae=he==null?void 0:he.unicode)!==null&&Ae!==void 0?Ae:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(Xe=he==null?void 0:he.unicodeSets)!==null&&Xe!==void 0?Xe:this._unicodeSetsMode},(w=he==null?void 0:he.index)!==null&&w!==void 0?w:this.index,H)}eatRegExpBody(){const H=this.index;let he=!1,Ae=!1;for(;;){const Xe=this.currentCodePoint;if(Xe===-1||jt(Xe)){const w=he?"character class":"regular expression";this.raise(`Unterminated ${w}`)}if(Ae)Ae=!1;else if(Xe===Ee)Ae=!0;else if(Xe===be)he=!0;else if(Xe===ve)he=!1;else if(Xe===pe&&!he||Xe===ae&&this.index===H)break;this.advance()}return this.index!==H}consumePattern(){const H=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(H),this.consumeDisjunction();const he=this.currentCodePoint;if(this.currentCodePoint!==-1){he===V&&this.raise("Unmatched ')'"),he===Ee&&this.raise("\\ at end of pattern"),(he===ve||he===ht)&&this.raise("Lone quantifier brackets");const Ae=String.fromCodePoint(he);this.raise(`Unexpected character '${Ae}'`)}for(const Ae of this._backreferenceNames)this._groupSpecifiers.hasInPattern(Ae)||this.raise("Invalid named capture referenced");this.onPatternLeave(H,this.index)}countCapturingParens(){const H=this.index;let he=!1,Ae=!1,Xe=0,w=0;for(;(w=this.currentCodePoint)!==-1;)Ae?Ae=!1:w===Ee?Ae=!0:w===be?he=!0:w===ve?he=!1:w===te&&!he&&(this.nextCodePoint!==pt||this.nextCodePoint2===we&&this.nextCodePoint3!==Me&&this.nextCodePoint3!==U)&&(Xe+=1),this.advance();return this.rewind(H),Xe}consumeDisjunction(){const H=this.index;let he=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(H);do this.consumeAlternative(he++);while(this.eat(dt));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(at)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(H,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(H){const he=this.index;for(this._groupSpecifiers.enterAlternative(H),this.onAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(he,this.index,H)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const H=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(Ne))return this.onEdgeAssertion(H,this.index,"start"),!0;if(this.eat($))return this.onEdgeAssertion(H,this.index,"end"),!0;if(this.eat2(Ee,Ut))return this.onWordBoundaryAssertion(H,this.index,"word",!0),!0;if(this.eat2(Ee,Vt))return this.onWordBoundaryAssertion(H,this.index,"word",!1),!0;if(this.eat2(te,pt)){const he=this.ecmaVersion>=2018&&this.eat(we);let Ae=!1;if(this.eat(Me)||(Ae=this.eat(U))){const Xe=he?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(H,Xe,Ae),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!he&&!this.strict,this.onLookaroundAssertionLeave(H,this.index,Xe,Ae),!0}this.rewind(H)}return!1}consumeQuantifier(H=!1){const he=this.index;let Ae=0,Xe=0,w=!1;if(this.eat(ae))Ae=0,Xe=Number.POSITIVE_INFINITY;else if(this.eat(z))Ae=1,Xe=Number.POSITIVE_INFINITY;else if(this.eat(pt))Ae=0,Xe=1;else if(this.eatBracedQuantifier(H))({min:Ae,max:Xe}=this._lastRange);else return!1;return w=!this.eat(pt),H||this.onQuantifier(he,this.index,Ae,Xe,w),!0}eatBracedQuantifier(H){const he=this.index;if(this.eat(at)){if(this.eatDecimalDigits()){const Ae=this._lastIntValue;let Xe=Ae;if(this.eat(ue)&&(Xe=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(ht))return!H&&Xe=2018?this.consumeGroupSpecifier()&&(he=this._lastStrValue):this.currentCodePoint===pt&&this.raise("Invalid group"),this.onCapturingGroupEnter(H,he),this.consumeDisjunction(),this.eat(V)||this.raise("Unterminated group"),this.onCapturingGroupLeave(H,this.index,he),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const H=this.index;return this.currentCodePoint===Ee&&this.nextCodePoint===ir?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,Ee),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&!Yn(he)?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeExtendedPatternCharacter(){const H=this.index,he=this.currentCodePoint;return he!==-1&&he!==Ne&&he!==$&&he!==Ee&&he!==ce&&he!==ae&&he!==z&&he!==pt&&he!==te&&he!==V&&he!==be&&he!==dt?(this.advance(),this.onCharacter(H,this.index,he),!0):!1}consumeGroupSpecifier(){if(this.eat(pt)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const H=this.index;if(this.eatDecimalEscape()){const he=this._lastIntValue;if(he<=this._numCapturingParens)return this.onBackreference(H-1,this.index,he),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeCharacterClassEscape(){var H;const he=this.index;if(this.eat(Ot))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!1),{};if(this.eat(tr))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"digit",!0),{};if(this.eat(lt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!1),{};if(this.eat(mt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"space",!0),{};if(this.eat(ye))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!1),{};if(this.eat(Pt))return this._lastIntValue=-1,this.onEscapeCharacterSet(he-1,this.index,"word",!0),{};let Ae=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(ke)||(Ae=this.eat(Ve)))){this._lastIntValue=-1;let Xe=null;if(this.eat(at)&&(Xe=this.eatUnicodePropertyValueExpression())&&this.eat(ht))return Ae&&Xe.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(he-1,this.index,"property",Xe.key,Xe.value,Ae,(H=Xe.strings)!==null&&H!==void 0?H:!1),{mayContainStrings:Xe.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const H=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(H-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const H=this.index;if(this.eat(Dr)){if(this.eatGroupName()){const he=this._lastStrValue;return this._backreferenceNames.add(he),this.onBackreference(H-1,this.index,he),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,this._unicodeSetsMode);const Ae=this.consumeClassContents();return this.eat(ve)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===ve?{}:this.consumeClassSetExpression();const H=this.strict||this._unicodeMode;for(;;){const he=this.index;if(!this.consumeClassAtom())break;const Ae=this._lastIntValue;if(!this.eat(ne))continue;if(this.onCharacter(this.index-1,this.index,ne),!this.consumeClassAtom())break;const Xe=this._lastIntValue;if(Ae===-1||Xe===-1){H&&this.raise("Invalid character class");continue}Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(he,this.index,Ae,Xe)}return{}}consumeClassAtom(){const H=this.index,he=this.currentCodePoint;if(he!==-1&&he!==Ee&&he!==ve)return this.advance(),this._lastIntValue=he,this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===ir)return this._lastIntValue=Ee,this.onCharacter(H,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(H)}return!1}consumeClassEscape(){const H=this.index;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(ne))return this._lastIntValue=ne,this.onCharacter(H-1,this.index,this._lastIntValue),!0;let he=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===ir&&(bt(he=this.nextCodePoint)||he===se)?(this.advance(),this.advance(),this._lastIntValue=he%32,this.onCharacter(H-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const H=this.index;let he=!1,Ae=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(H))return this.consumeClassUnionRight({}),{};he=!1}else if(Ae=this.consumeClassSetOperand())he=Ae.mayContainStrings;else{const Xe=this.currentCodePoint;Xe===Ee&&(this.advance(),this.raise("Invalid escape")),Xe===this.nextCodePoint&&us(Xe)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(K,K)){for(;this.currentCodePoint!==K&&(Ae=this.consumeClassSetOperand());)if(this.onClassIntersection(H,this.index),Ae.mayContainStrings||(he=!1),!this.eat2(K,K))return{mayContainStrings:he};this.raise("Invalid character in character class")}if(this.eat2(ne,ne)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(H,this.index),!this.eat2(ne,ne))return{mayContainStrings:he};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:he})}consumeClassUnionRight(H){let he=H.mayContainStrings;for(;;){const Ae=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(Ae);continue}const Xe=this.consumeClassSetOperand();if(Xe){Xe.mayContainStrings&&(he=!0);continue}break}return{mayContainStrings:he}}consumeClassSetRangeFromOperator(H){const he=this.index,Ae=this._lastIntValue;if(this.eat(ne)){if(this.consumeClassSetCharacter()){const Xe=this._lastIntValue;return(Ae===-1||Xe===-1)&&this.raise("Invalid character class"),Ae>Xe&&this.raise("Range out of order in character class"),this.onCharacterClassRange(H,this.index,Ae,Xe),!0}this.rewind(he)}return!1}consumeClassSetOperand(){let H=null;return(H=this.consumeNestedClass())||(H=this.consumeClassStringDisjunction())?H:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const H=this.index;if(this.eat(be)){const he=this.eat(Ne);this.onCharacterClassEnter(H,he,!0);const Ae=this.consumeClassContents();return this.eat(ve)||this.raise("Unterminated character class"),he&&Ae.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(H,this.index,he),Ae}if(this.eat(Ee)){const he=this.consumeCharacterClassEscape();if(he)return he;this.rewind(H)}return null}consumeClassStringDisjunction(){const H=this.index;if(this.eat3(Ee,Te,at)){this.onClassStringDisjunctionEnter(H);let he=0,Ae=!1;do this.consumeClassString(he++).mayContainStrings&&(Ae=!0);while(this.eat(dt));if(this.eat(ht))return this.onClassStringDisjunctionLeave(H,this.index),{mayContainStrings:Ae};this.raise("Unterminated class string disjunction")}return null}consumeClassString(H){const he=this.index;let Ae=0;for(this.onStringAlternativeEnter(he,H);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)Ae++;return this.onStringAlternativeLeave(he,this.index,H),{mayContainStrings:Ae!==1}}consumeClassSetCharacter(){const H=this.index,he=this.currentCodePoint;if((he!==this.nextCodePoint||!us(he))&&he!==-1&&!cs(he))return this._lastIntValue=he,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Ee)){if(this.consumeCharacterEscape())return!0;if(mn(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(H,this.index,this._lastIntValue),!0;if(this.eat(Vt))return this._lastIntValue=P,this.onCharacter(H,this.index,this._lastIntValue),!0;this.rewind(H)}return!1}eatGroupName(){if(this.eat(we)){if(this.eatRegExpIdentifierName()&&this.eat(it))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),Jr(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatRegExpIdentifierPart(){const H=this.index,he=!this._unicodeMode&&this.ecmaVersion>=2020;let Ae=this.currentCodePoint;return this.advance(),Ae===Ee&&this.eatRegExpUnicodeEscapeSequence(he)?Ae=this._lastIntValue:he&&rr(Ae)&&ar(this.currentCodePoint)&&(Ae=nr(Ae,this.currentCodePoint),this.advance()),fs(Ae)?(this._lastIntValue=Ae,!0):(this.index!==H&&this.rewind(H),!1)}eatCControlLetter(){const H=this.index;if(this.eat(ir)){if(this.eatControlLetter())return!0;this.rewind(H)}return!1}eatZero(){return this.currentCodePoint===Be&&!bt(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Zt)?(this._lastIntValue=j,!0):this.eat(Ie)?(this._lastIntValue=I,!0):this.eat(Ue)?(this._lastIntValue=G,!0):this.eat(Oe)?(this._lastIntValue=N,!0):this.eat(de)?(this._lastIntValue=L,!0):!1}eatControlLetter(){const H=this.currentCodePoint;return et(H)?(this.advance(),this._lastIntValue=H%32,!0):!1}eatRegExpUnicodeEscapeSequence(H=!1){const he=this.index,Ae=H||this._unicodeMode;if(this.eat(Pe)){if(Ae&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||Ae&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||Ae)&&this.raise("Invalid unicode escape"),this.rewind(he)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const H=this.index;if(this.eatFixedHexDigits(4)){const he=this._lastIntValue;if(rr(he)&&this.eat(Ee)&&this.eat(Pe)&&this.eatFixedHexDigits(4)){const Ae=this._lastIntValue;if(ar(Ae))return this._lastIntValue=nr(he,Ae),!0}this.rewind(H)}return!1}eatRegExpUnicodeCodePointEscape(){const H=this.index;return this.eat(at)&&this.eatHexDigits()&&this.eat(ht)&&Wt(this._lastIntValue)?!0:(this.rewind(H),!1)}eatIdentityEscape(){const H=this.currentCodePoint;return this.isValidIdentityEscape(H)?(this._lastIntValue=H,this.advance(),!0):!1}isValidIdentityEscape(H){return H===-1?!1:this._unicodeMode?Yn(H)||H===pe:this.strict?!d(H):this._nFlag?!(H===ir||H===Dr):H!==ir}eatDecimalEscape(){this._lastIntValue=0;let H=this.currentCodePoint;if(H>=oe&&H<=ge){do this._lastIntValue=10*this._lastIntValue+(H-Be),this.advance();while((H=this.currentCodePoint)>=Be&&H<=ge);return!0}return!1}eatUnicodePropertyValueExpression(){const H=this.index;if(this.eatUnicodePropertyName()&&this.eat(Me)){const he=this._lastStrValue;if(this.eatUnicodePropertyValue()){const Ae=this._lastStrValue;if(T(this.ecmaVersion,he,Ae))return{key:he,value:Ae||null};this.raise("Invalid property name")}}if(this.rewind(H),this.eatLoneUnicodePropertyNameOrValue()){const he=this._lastStrValue;if(T(this.ecmaVersion,"General_Category",he))return{key:"General_Category",value:he||null};if(R(this.ecmaVersion,he))return{key:he,value:null};if(this._unicodeSetsMode&&F(this.ecmaVersion,he))return{key:he,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";ws(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";Wi(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const H=this.index;if(this.eat(Le)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(H)}return!1}eatDecimalDigits(){const H=this.index;for(this._lastIntValue=0;bt(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatHexDigits(){const H=this.index;for(this._lastIntValue=0;St(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+Lt(this.currentCodePoint),this.advance();return this.index!==H}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const H=this._lastIntValue;if(this.eatOctalDigit()){const he=this._lastIntValue;H<=3&&this.eatOctalDigit()?this._lastIntValue=H*64+he*8+this._lastIntValue:this._lastIntValue=H*8+he}else this._lastIntValue=H;return!0}return!1}eatOctalDigit(){const H=this.currentCodePoint;return rt(H)?(this.advance(),this._lastIntValue=H-Be,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(H){const he=this.index;this._lastIntValue=0;for(let Ae=0;AeM.name===Xe);if(w.length===1){const M=w[0];Ae.ambiguous=!1,Ae.resolved=M}else Ae.ambiguous=!0,Ae.resolved=w;for(const M of w)M.references.push(Ae)}}onAlternativeEnter(H){const he=this._node;if(he.type!=="Assertion"&&he.type!=="CapturingGroup"&&he.type!=="Group"&&he.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onGroupEnter(H){const he=this._node;if(he.type!=="Alternative")throw new Error("UnknownError");this._node={type:"Group",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="Group"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onCapturingGroupEnter(H,he){const Ae=this._node;if(Ae.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:Ae,start:H,end:H,raw:"",name:he,alternatives:[],references:[]},Ae.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(H,he){const Ae=this._node;if(Ae.type!=="CapturingGroup"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onQuantifier(H,he,Ae,Xe,w){const M=this._node;if(M.type!=="Alternative")throw new Error("UnknownError");const J=M.elements.pop();if(J==null||J.type==="Quantifier"||J.type==="Assertion"&&J.kind!=="lookahead")throw new Error("UnknownError");const le={type:"Quantifier",parent:M,start:J.start,end:he,raw:this.source.slice(J.start,he),min:Ae,max:Xe,greedy:w,element:J};M.elements.push(le),J.parent=le}onLookaroundAssertionEnter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w=this._node={type:"Assertion",parent:Xe,start:H,end:H,raw:"",kind:he,negate:Ae,alternatives:[]};Xe.elements.push(w)}onLookaroundAssertionLeave(H,he){const Ae=this._node;if(Ae.type!=="Assertion"||Ae.parent.type!=="Alternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onEdgeAssertion(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"Assertion",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onWordBoundaryAssertion(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative")throw new Error("UnknownError");w.elements.push({type:"Assertion",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onAnyCharacterSet(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");Xe.elements.push({type:"CharacterSet",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),kind:Ae})}onEscapeCharacterSet(H,he,Ae,Xe){const w=this._node;if(w.type!=="Alternative"&&w.type!=="CharacterClass")throw new Error("UnknownError");w.elements.push({type:"CharacterSet",parent:w,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,negate:Xe})}onUnicodePropertyCharacterSet(H,he,Ae,Xe,w,M,J){const le=this._node;if(le.type!=="Alternative"&&le.type!=="CharacterClass")throw new Error("UnknownError");const De={type:"CharacterSet",parent:null,start:H,end:he,raw:this.source.slice(H,he),kind:Ae,strings:null,key:Xe};if(J){if(le.type==="CharacterClass"&&!le.unicodeSets||M||w!==null)throw new Error("UnknownError");le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}else le.elements.push(Object.assign(Object.assign({},De),{parent:le,strings:J,value:w,negate:M}))}onCharacter(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative"&&Xe.type!=="CharacterClass"&&Xe.type!=="StringAlternative")throw new Error("UnknownError");Xe.elements.push({type:"Character",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),value:Ae})}onBackreference(H,he,Ae){const Xe=this._node;if(Xe.type!=="Alternative")throw new Error("UnknownError");const w={type:"Backreference",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),ref:Ae,ambiguous:!1,resolved:li};Xe.elements.push(w),this._backreferences.push(w)}onCharacterClassEnter(H,he,Ae){const Xe=this._node,w={type:"CharacterClass",parent:Xe,start:H,end:H,raw:"",unicodeSets:Ae,negate:he,elements:[]};if(Xe.type==="Alternative"){const M=Object.assign(Object.assign({},w),{parent:Xe});this._node=M,Xe.elements.push(M)}else if(Xe.type==="CharacterClass"&&Xe.unicodeSets&&Ae){const M=Object.assign(Object.assign({},w),{parent:Xe,unicodeSets:Ae});this._node=M,Xe.elements.push(M)}else throw new Error("UnknownError")}onCharacterClassLeave(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass"||Ae.parent.type!=="Alternative"&&Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.parent;Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Xe;const w=this._expressionBufferMap.get(Ae);if(!w)return;if(Ae.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(Ae);const M={type:"ExpressionCharacterClass",parent:Xe,start:Ae.start,end:Ae.end,raw:Ae.raw,negate:Ae.negate,expression:w};if(w.parent=M,Ae!==Xe.elements.pop())throw new Error("UnknownError");Xe.elements.push(M)}onCharacterClassRange(H,he){const Ae=this._node;if(Ae.type!=="CharacterClass")throw new Error("UnknownError");const Xe=Ae.elements,w=Xe.pop();if(!w||w.type!=="Character")throw new Error("UnknownError");if(!Ae.unicodeSets){const le=Xe.pop();if(!le||le.type!=="Character"||le.value!==ne)throw new Error("UnknownError")}const M=Xe.pop();if(!M||M.type!=="Character")throw new Error("UnknownError");const J={type:"CharacterClassRange",parent:Ae,start:H,end:he,raw:this.source.slice(H,he),min:M,max:w};M.parent=J,w.parent=J,Xe.push(J)}onClassIntersection(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassSubtraction"||M.type!=="ClassIntersection"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassIntersection",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassSubtraction(H,he){var Ae;const Xe=this._node;if(Xe.type!=="CharacterClass"||!Xe.unicodeSets)throw new Error("UnknownError");const w=Xe.elements.pop(),M=(Ae=this._expressionBufferMap.get(Xe))!==null&&Ae!==void 0?Ae:Xe.elements.pop();if(!M||!w||M.type==="ClassIntersection"||M.type!=="ClassSubtraction"&&!Ws(M)||!Ws(w))throw new Error("UnknownError");const J={type:"ClassSubtraction",parent:Xe,start:H,end:he,raw:this.source.slice(H,he),left:M,right:w};M.parent=J,w.parent=J,this._expressionBufferMap.set(Xe,J)}onClassStringDisjunctionEnter(H){const he=this._node;if(he.type!=="CharacterClass"||!he.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:he,start:H,end:H,raw:"",alternatives:[]},he.elements.push(this._node)}onClassStringDisjunctionLeave(H,he){const Ae=this._node;if(Ae.type!=="ClassStringDisjunction"||Ae.parent.type!=="CharacterClass")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}onStringAlternativeEnter(H){const he=this._node;if(he.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:he,start:H,end:H,raw:"",elements:[]},he.alternatives.push(this._node)}onStringAlternativeLeave(H,he){const Ae=this._node;if(Ae.type!=="StringAlternative")throw new Error("UnknownError");Ae.end=he,Ae.raw=this.source.slice(H,he),this._node=Ae.parent}}class ui{constructor(H){this._state=new ba(H),this._validator=new Gi(this._state)}parseLiteral(H,he=0,Ae=H.length){this._state.source=H,this._validator.validateLiteral(H,he,Ae);const Xe=this._state.pattern,w=this._state.flags,M={type:"RegExpLiteral",parent:null,start:he,end:Ae,raw:H,pattern:Xe,flags:w};return Xe.parent=M,w.parent=M,M}parseFlags(H,he=0,Ae=H.length){return this._state.source=H,this._validator.validateFlags(H,he,Ae),this._state.flags}parsePattern(H,he=0,Ae=H.length,Xe=void 0){return this._state.source=H,this._validator.validatePattern(H,he,Ae,Xe),this._state.pattern}}class ci{constructor(H){this._handlers=H}visit(H){switch(H.type){case"Alternative":this.visitAlternative(H);break;case"Assertion":this.visitAssertion(H);break;case"Backreference":this.visitBackreference(H);break;case"CapturingGroup":this.visitCapturingGroup(H);break;case"Character":this.visitCharacter(H);break;case"CharacterClass":this.visitCharacterClass(H);break;case"CharacterClassRange":this.visitCharacterClassRange(H);break;case"CharacterSet":this.visitCharacterSet(H);break;case"ClassIntersection":this.visitClassIntersection(H);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(H);break;case"ClassSubtraction":this.visitClassSubtraction(H);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(H);break;case"Flags":this.visitFlags(H);break;case"Group":this.visitGroup(H);break;case"Pattern":this.visitPattern(H);break;case"Quantifier":this.visitQuantifier(H);break;case"RegExpLiteral":this.visitRegExpLiteral(H);break;case"StringAlternative":this.visitStringAlternative(H);break;default:throw new Error(`Unknown type: ${H.type}`)}}visitAlternative(H){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(H)}visitAssertion(H){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(H),(H.kind==="lookahead"||H.kind==="lookbehind")&&H.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(H)}visitBackreference(H){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(H),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(H)}visitCapturingGroup(H){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(H)}visitCharacter(H){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(H),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(H)}visitCharacterClass(H){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(H),H.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(H)}visitCharacterClassRange(H){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(H),this.visitCharacter(H.min),this.visitCharacter(H.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(H)}visitCharacterSet(H){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(H),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(H)}visitClassIntersection(H){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(H)}visitClassStringDisjunction(H){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(H)}visitClassSubtraction(H){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(H),this.visit(H.left),this.visit(H.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(H)}visitExpressionCharacterClass(H){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(H),this.visit(H.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(H)}visitFlags(H){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(H),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(H)}visitGroup(H){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(H)}visitPattern(H){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(H),H.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(H)}visitQuantifier(H){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(H),this.visit(H.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(H)}visitRegExpLiteral(H){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(H),this.visitPattern(H.pattern),this.visitFlags(H.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(H)}visitStringAlternative(H){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(H),H.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(H)}}function fr(nt,H){return new ui(H).parseLiteral(String(nt))}function Co(nt,H){new Gi(H).validateLiteral(nt)}function fi(nt,H){new ci(H).visit(nt)}return Es.AST=c,Es.RegExpParser=ui,Es.RegExpSyntaxError=Wr,Es.RegExpValidator=Gi,Es.parseRegExpLiteral=fr,Es.validateRegExpLiteral=Co,Es.visitRegExpAST=fi,Es}var am,Kw;function V5(){if(Kw)return am;Kw=1;const c=Cs().RegExpValidator,s=new class{constructor(){this._source="",this._controlChars=[],this._validator=new c(this)}onPatternEnter(){this._controlChars=[]}onCharacter(u,p,a){a>=0&&a<=31&&(this._source.codePointAt(u)===a||this._source.slice(u,p).startsWith("\\x")||this._source.slice(u,p).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${a.toString(16)}`.slice(-2)}`)}collectControlChars(u,p){const a=typeof p=="string"&&p.includes("u"),d=typeof p=="string"&&p.includes("v");this._controlChars=[],this._source=u;try{this._validator.validatePattern(u,void 0,void 0,{unicode:a,unicodeSets:d})}catch{}return this._controlChars}};return am={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(u){function p(a){if(a.regex)return a.regex;if(typeof a.value=="string"&&(a.parent.type==="NewExpression"||a.parent.type==="CallExpression")&&a.parent.callee.type==="Identifier"&&a.parent.callee.name==="RegExp"&&a.parent.arguments[0]===a){const d=a.value,v=a.parent.arguments.length>1&&a.parent.arguments[1].type==="Literal"&&typeof a.parent.arguments[1].value=="string"?a.parent.arguments[1].value:null;return{pattern:d,flags:v}}return null}return{Literal(a){const d=p(a);if(d){const{pattern:v,flags:m}=d,o=s.collectControlChars(v,m);o.length>0&&u.report({node:a,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},am}var om,Jw;function W5(){return Jw||(Jw=1,om={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(c){return{DebuggerStatement(s){c.report({node:s,messageId:"unexpected"})}}}}),om}var lm,ek;function G5(){return ek||(ek=1,lm={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(c){return{UnaryExpression(s){s.operator==="delete"&&s.argument.type==="Identifier"&&c.report({node:s,messageId:"unexpected"})}}}}),lm}var um,tk;function z5(){return tk||(tk=1,um={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(c){const s=c.sourceCode;return{Literal(u){const p=s.getFirstToken(u);p.type==="RegularExpression"&&p.value[1]==="="&&c.report({node:u,messageId:"unexpected",fix(a){return a.replaceTextRange([p.range[0]+1,p.range[0]+2],"[=]")}})}}}}),um}var cm,rk;function Z5(){return rk||(rk=1,cm={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(c){const s=c.sourceCode;function u(a){return a.type==="Parameter"}function p(a){const d=s.getDeclaredVariables(a);for(let v=0;v=2&&c.report({node:a,messageId:"unexpected",data:{name:m.name}})}}return{FunctionDeclaration:p,FunctionExpression:p}}}),cm}var fm,nk;function X5(){if(nk)return fm;nk=1;const c=Ze();return fm={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(s){let u=[];function p(a,d){const v=u.at(-1),m=`$${a}`;return v[m]||(v[m]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),v[m][d?"static":"nonStatic"]}return{Program(){u=[]},ClassBody(){u.push(Object.create(null))},"ClassBody:exit"(){u.pop()},"MethodDefinition, PropertyDefinition"(a){const d=c.getStaticPropertyName(a),v=a.type==="MethodDefinition"?a.kind:"field";if(d===null||v==="constructor")return;const m=p(d,a.static);let o;v==="get"?(o=m.init||m.get,m.get=!0):v==="set"?(o=m.init||m.set,m.set=!0):(o=m.init||m.get||m.set,m.init=!0),o&&s.report({node:a,messageId:"unexpected",data:{name:d}})}}}},fm}var pm,sk;function Y5(){if(sk)return pm;sk=1;const c=Ze();function s(d,v,m){return v.every(o=>m.some(y=>d(o,y)))}function u(d,v){return v.type==="LogicalExpression"&&v.operator===d?[...u(d,v.left),...u(d,v.right)]:[v]}const p=u.bind(null,"||"),a=u.bind(null,"&&");return pm={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(d){const v=d.sourceCode;function m(y,O){return y.type!==O.type?!1:y.type==="LogicalExpression"&&(y.operator==="||"||y.operator==="&&")&&y.operator===O.operator?m(y.left,O.left)&&m(y.right,O.right)||m(y.left,O.right)&&m(y.right,O.left):c.equalTokens(y,O,v)}const o=s.bind(null,m);return{IfStatement(y){const O=y.test,x=O.type==="LogicalExpression"&&O.operator==="&&"?[O,...a(O)]:[O];let g=y,f=x.map(b=>p(b).map(a));for(;g.parent&&g.parent.type==="IfStatement"&&g.parent.alternate===g;){g=g.parent;const b=p(g.test).map(a);if(f=f.map(S=>S.filter(E=>!b.some(k=>o(k,E)))),f.some(S=>S.length===0)){d.report({node:O,messageId:"unexpected"});break}}}}}},pm}var hm,ik;function H5(){if(ik)return hm;ik=1;const c=Ze(),s=/^(?:init|get)$/u,u=/^(?:init|set)$/u;class p{constructor(d,v){this.upper=d,this.node=v,this.properties=new Map}getPropertyInfo(d){const v=c.getStaticPropertyName(d);return this.properties.has(v)||this.properties.set(v,{get:!1,set:!1}),this.properties.get(v)}isPropertyDefined(d){const v=this.getPropertyInfo(d);return s.test(d.kind)&&v.get||u.test(d.kind)&&v.set}defineProperty(d){const v=this.getPropertyInfo(d);s.test(d.kind)&&(v.get=!0),u.test(d.kind)&&(v.set=!0)}}return hm={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(a){let d=null;return{ObjectExpression(v){d=new p(d,v)},"ObjectExpression:exit"(){d=d.upper},Property(v){const m=c.getStaticPropertyName(v);v.parent.type==="ObjectExpression"&&m!==null&&(d.isPropertyDefined(v)&&a.report({node:d.node,loc:v.key.loc,messageId:"unexpected",data:{name:m}}),d.defineProperty(v))}}}},hm}var dm,ak;function K5(){if(ak)return dm;ak=1;const c=Ze();return dm={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(s){const u=s.sourceCode;function p(a,d){return a.type!==d.type?!1:c.equalTokens(a,d,u)}return{SwitchStatement(a){const d=[];for(const v of a.cases)if(v.test){const m=v.test;d.some(o=>p(o,m))?s.report({node:v,messageId:"unexpected"}):d.push(m)}}}}},dm}var mm,ok;function J5(){if(ok)return mm;ok=1;const c=["ImportSpecifier","ExportSpecifier"],s=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function u(O,x){return(x==="named"?c:s).includes(O)}function p(O){if(O.specifiers&&O.specifiers.length>0){const x=O.specifiers,g=x.findIndex(({type:b})=>u(b,"named")||u(b,"namespace")),f=g>-1?g:0;return x[f].type}return O.type==="ExportAllDeclaration"?O.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function a(O,x){const g=p(O),f=p(x);return!(g==="ExportAll"&&f!=="ExportAll"&&f!=="SideEffectImport"||g!=="ExportAll"&&g!=="SideEffectImport"&&f==="ExportAll"||u(g,"namespace")&&u(f,"named")||u(f,"namespace")&&u(g,"named"))}function d(O,x){let g=0;for(;gg===x).map(({node:g})=>g)}function m(O){return O&&O.source&&O.source.value?O.source.value.trim():""}function o(O,x,g,f,b){const S=m(x);if(g.has(S)){const E=g.get(S),k=[],D=v(E,"import");let T;b&&(T=v(E,"export")),f==="import"?(d(x,D)&&k.push("import"),b&&d(x,T)&&k.push("importAs")):f==="export"&&(d(x,T)&&k.push("export"),d(x,D)&&k.push("exportAs")),k.forEach(R=>O.report({node:x,messageId:R,data:{module:S}}))}}function y(O,x,g,f){return function(b){const S=m(b);if(S){o(O,b,x,g,f);const E={node:b,declarationType:g};let k=[E];x.has(S)&&(k=[...x.get(S),E]),x.set(S,k)}}}return mm={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(O){const x=(O.options[0]||{}).includeExports,g=new Map,f={ImportDeclaration:y(O,g,"import",x)};return x&&(f.ExportNamedDeclaration=y(O,g,"export",x),f.ExportAllDeclaration=y(O,g,"export",x)),f}},mm}var gm,lk;function Oo(){if(lk)return gm;lk=1;const c=Ze();class s{constructor(p,a){this.fixer=p,this.sourceCode=a,this.retainedRange=null}retainRange(p){return this.retainedRange=p,this}retainEnclosingFunction(p){const a=c.getUpperFunction(p);return this.retainRange(a?a.range:this.sourceCode.ast.range)}retainSurroundingTokens(p){const a=this.sourceCode.getTokenBefore(p)||p,d=this.sourceCode.getTokenAfter(p)||p;return this.retainRange([a.range[0],d.range[1]])}replaceTextRange(p,a){let d;return this.retainedRange?d=[Math.min(this.retainedRange[0],p[0]),Math.max(this.retainedRange[1],p[1])]:d=p,this.fixer.replaceTextRange(d,this.sourceCode.text.slice(d[0],p[0])+a+this.sourceCode.text.slice(p[1],d[1]))}remove(p){return this.replaceTextRange(p.range,"")}}return gm=s,gm}var ym,uk;function ej(){if(uk)return ym;uk=1;const c=Ze(),s=Oo();return ym={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(u){const p=u.sourceCode;function a(E,k){if(E.length===0)return!0;const D=k.variableScope;if(k.variables.filter(({defs:F})=>F.length>0).some(({name:F})=>E.includes(F))||k!==D&&k.upper.type==="catch"&&k.upper.variables.some(({name:F})=>E.includes(F))||k.variables.filter(({defs:F,references:P})=>F.length===0&&P.length>0).some(({name:F})=>E.includes(F))||k.through.some(F=>E.includes(F.identifier.name)))return!1;if(k!==D){const F=k.block.range;if(D.variables.filter(({name:N})=>E.includes(N)).some(N=>N.defs.some(({node:{range:I}})=>F[0]<=I[0]&&I[1]<=F[1])))return!1}return!0}function d(E,k){if(E.type==="FunctionDeclaration")return!1;if(E.type!=="BlockStatement")return!0;const D=k.childScopes.find(({block:R})=>R===E);if(!D)return!0;const T=D.variables.map(({name:R})=>R);return a(T,k)}function v(E){const k=p.getScope(E.parent);u.report({node:E,messageId:"unexpected",fix(D){if(!d(E,k))return null;const T=p.getFirstToken(E),R=p.getTokenBefore(T),F=p.getText(E),P=p.getTokenBefore(R);let N,I;T.type==="Punctuator"&&T.value==="{"?I=p.getTokenAfter(T):I=T;const L=E.parent.consequent.type!=="BlockStatement"&&P.value!==";",j=/^[([/+`-]/u.test(I.value);if(L&&j)return null;const G=p.getLastToken(E),U=p.getTokenBefore(G);if(U.value!==";"){const Q=p.getTokenAfter(G),$=Q&&/^[([/+`-]/u.test(Q.value),W=Q&&Q.loc.start.line===U.loc.start.line;if($||W&&Q.value!=="}")return null}return T.type==="Punctuator"&&T.value==="{"?N=F.slice(1,-1):N=F,new s(D,p).retainEnclosingFunction(E).replaceTextRange([R.range[0],E.range[1]],N)}})}function m(E){return E.type==="ReturnStatement"}function o(E){if(E.type==="BlockStatement"){const k=E.body,D=k.at(-1);return D&&m(D)}return m(E)}function y(E){return E.alternate&&E.consequent}function O(E){return E.type==="IfStatement"&&y(E)&&o(E.alternate)&&o(E.consequent)}function x(E){return m(E)||O(E)}function g(E){return E.type==="BlockStatement"?E.body.some(x):x(E)}function f(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=[];let T;for(let R=E;R.type==="IfStatement";R=R.alternate){if(!R.alternate)return;D.push(R.consequent),T=R.alternate}D.every(g)&&v(T)}function b(E){const k=E.parent;if(!c.STATEMENT_LIST_PARENTS.has(k.type))return;const D=E.alternate;D&&g(E.consequent)&&v(D)}return{"IfStatement:exit":!(u.options[0]&&u.options[0].allowElseIf===!1)?f:b}}},ym}var bm,ck;function tj(){if(ck)return bm;ck=1;const c=Ze();return bm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(s){const u=s.options[0]||{},p=u.allowEmptyCatch||!1,a=s.sourceCode;return{BlockStatement(d){d.body.length===0&&(c.isFunction(d.parent)||p&&d.parent.type==="CatchClause"||a.getCommentsInside(d).length>0||s.report({node:d,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(v){const m=[d.range[0]+1,d.range[1]-1];return v.replaceTextRange(m," /* empty */ ")}}]}))},SwitchStatement(d){(typeof d.cases>"u"||d.cases.length===0)&&s.report({node:d,messageId:"unexpected",data:{type:"switch"}})}}}},bm}var vm,fk;function rj(){if(fk)return vm;fk=1;const{RegExpParser:c,visitRegExpAST:s}=Cs(),u=new c,p=/\[\]/u;return vm={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(a){return{"Literal[regex]"(d){const{pattern:v,flags:m}=d.regex;if(!p.test(v))return;let o;try{o=u.parsePattern(v,0,v.length,{unicode:m.includes("u"),unicodeSets:m.includes("v")})}catch{return}s(o,{onCharacterClassEnter(y){!y.negate&&y.elements.length===0&&a.report({node:d,messageId:"unexpected"})}})}}}},vm}var xm,pk;function nj(){if(pk)return xm;pk=1;const c=Ze(),s=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);function u(p){const a=p.parent;let d;if(p.type==="ArrowFunctionExpression")return"arrowFunctions";if(a.type==="Property"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";d=a.method?"methods":"functions"}else if(a.type==="MethodDefinition"){if(a.kind==="get")return"getters";if(a.kind==="set")return"setters";if(a.kind==="constructor")return"constructors";d="methods"}else d="functions";let v;if(p.generator)v="generator";else if(p.async)v="async";else return d;return v+d[0].toUpperCase()+d.slice(1)}return xm={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:s},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(p){const d=(p.options[0]||{}).allow||[],v=p.sourceCode;function m(o){const y=u(o),O=c.getFunctionNameWithKind(o),x=v.getTokens(o.body,{includeComments:!0,filter:c.isCommentToken});!d.includes(y)&&o.body.type==="BlockStatement"&&o.body.body.length===0&&x.length===0&&p.report({node:o,loc:o.body.loc,messageId:"unexpected",data:{name:O}})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},xm}var Om,hk;function sj(){if(hk)return Om;hk=1;const c=Ze();return Om={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(s){const u=s.options[0]||{},p=u.allowObjectPatternsAsParameters||!1;return{ObjectPattern(a){a.properties.length>0||p&&(c.isFunction(a.parent)||a.parent.type==="AssignmentPattern"&&c.isFunction(a.parent.parent)&&a.parent.right.type==="ObjectExpression"&&a.parent.right.properties.length===0)||s.report({node:a,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(a){a.elements.length===0&&s.report({node:a,messageId:"unexpected",data:{type:"array"}})}}}},Om}var Sm,dk;function ij(){return dk||(dk=1,Sm={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(c){const s=c.sourceCode;return{StaticBlock(u){if(u.body.length===0){const p=s.getLastToken(u);s.getCommentsBefore(p).length===0&&c.report({node:u,messageId:"unexpected"})}}}}}),Sm}var Em,mk;function aj(){return mk||(mk=1,Em={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(c){return{BinaryExpression(s){const u=s.operator==="=="||s.operator==="!=";(s.right.type==="Literal"&&s.right.raw==="null"&&u||s.left.type==="Literal"&&s.left.raw==="null"&&u)&&c.report({node:s,messageId:"unexpected"})}}}}),Em}var Cm,gk;function oj(){if(gk)return Cm;gk=1;const c=Ze(),s=Object.freeze(["global","window","globalThis"]);function u(p,a){return c.isSpecificMemberAccess(p,null,a)}return Cm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(p){const a=!!(p.options[0]&&p.options[0].allowIndirect),d=p.sourceCode;let v=null;function m(g){const f=d.getScope(g).isStrict;v={upper:v,node:g,strict:f,isTopLevelOfScript:!1,defaultThis:!1,initialized:f}}function o(){v=v.upper}function y(g){const f=g.parent,b=g.type==="MemberExpression"?g.property:g,S=f.type==="CallExpression"&&f.callee===g?f:g;p.report({node:S,loc:b.loc,messageId:"unexpected"})}function O(g){for(let f=0;f *.value":m,"PropertyDefinition > *.value:exit":o,StaticBlock:m,"StaticBlock:exit":o,ThisExpression(g){u(g.parent,"eval")&&(v.initialized||(v.initialized=!0,v.defaultThis=c.isDefaultThisBinding(v.node,d)),(v.isTopLevelOfScript||!v.strict&&v.defaultThis)&&y(g.parent))}}}},Cm}var wm,yk;function lj(){if(yk)return wm;yk=1;const c=Ze();return wm={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(s){const u=s.sourceCode;function p(a){c.getModifyingReferences(a.references).forEach(d=>{s.report({node:d.identifier,messageId:"unexpected"})})}return{CatchClause(a){u.getDeclaredVariables(a).forEach(p)}}}},wm}var km,bk;function uj(){if(bk)return km;bk=1;const c=Ze();return km={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(s){const u=s.options[0]||{},p=s.sourceCode,a=new Set(u.exceptions||[]),d=new Set(Object.keys(c.ECMASCRIPT_GLOBALS).filter(x=>x[0].toUpperCase()===x[0]).filter(x=>!a.has(x)));function v(x,g){s.report({node:x,messageId:"unexpected",data:{builtin:g}})}function m(x){return!!(x&&x.parent&&x.parent.type==="MemberExpression"&&x.parent.object===x&&c.getStaticPropertyName(x.parent)==="prototype")}function o(x){return x.parent.type==="MemberExpression"&&x.parent.object===x&&x.parent.parent.type==="AssignmentExpression"&&x.parent.parent.left===x.parent}function y(x){return x.parent.type==="CallExpression"&&x.parent.arguments[0]===x&&c.isSpecificMemberAccess(x.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}function O(x){if(!m(x))return;const g=x.parent.parent.type==="ChainExpression"?x.parent.parent:x.parent;o(g)?v(g.parent.parent,x.name):y(g)&&v(g.parent,x.name)}return{"Program:exit"(x){const g=p.getScope(x);d.forEach(f=>{const b=g.set.get(f);b&&b.references&&b.references.map(S=>S.identifier).forEach(O)})}}}},km}var Am,vk;function cj(){if(vk)return Am;vk=1;const c=Ze(),s=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return Am={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(u){const p=u.sourceCode;let a=null;function d(g){return s.has(g.type)}function v(g){const f=g.parent,b=f.parent.type==="ChainExpression"?f.parent.parent:f.parent;u.report({node:b,messageId:"unexpected",loc:f.property.loc,fix(S){if(!d(b.arguments[0]))return null;const E=[[p.getTokenAfter(f.object,c.isNotClosingParenToken),p.getLastToken(f)],[p.getTokenAfter(f,c.isNotClosingParenToken),p.getLastToken(b)]],k=E[0][0],D=E[1][1];return p.commentsExistBetween(k,D)?null:E.map(([T,R])=>S.removeRange([T.range[0],R.range[1]]))}})}function m(g){if(!c.isSpecificMemberAccess(g.parent,null,"bind"))return!1;const f=g.parent.parent.type==="ChainExpression"?g.parent.parent:g.parent;return f.parent.type==="CallExpression"&&f.parent.callee===f&&f.parent.arguments.length===1&&f.parent.arguments[0].type!=="SpreadElement"}function o(g){a={isBound:m(g),thisFound:!1,upper:a}}function y(g){a.isBound&&!a.thisFound&&v(g),a=a.upper}function O(g){m(g)&&v(g)}function x(){a&&(a.thisFound=!0)}return{"ArrowFunctionExpression:exit":O,FunctionDeclaration:o,"FunctionDeclaration:exit":y,FunctionExpression:o,"FunctionExpression:exit":y,ThisExpression:x}}},Am}var Pm,xk;function fj(){if(xk)return Pm;xk=1;const c=Ze(),s=Kr(),u=c.getPrecedence;return Pm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{anyOf:[{type:"object",properties:{enforceForInnerExpressions:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{enforceForLogicalOperands:{type:"boolean"}},additionalProperties:!1}]}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(p){var b,S;const a=p.sourceCode,d=((b=p.options[0])==null?void 0:b.enforceForLogicalOperands)===!0,v=((S=p.options[0])==null?void 0:S.enforceForInnerExpressions)===!0,m=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(E){return(E.type==="CallExpression"||E.type==="NewExpression")&&E.callee.type==="Identifier"&&E.callee.name==="Boolean"}function y(E){return o(E.parent)&&E===E.parent.arguments[0]||m.has(E.parent.type)&&E===E.parent.test||E.parent.type==="UnaryExpression"&&E.parent.operator==="!"}function O(E){return E.parent.type==="ChainExpression"||(d||v)&&E.parent.type==="LogicalExpression"&&(E.parent.operator==="||"||E.parent.operator==="&&"||v&&E.parent.operator==="??"&&E.parent.right===E)||v&&(E.parent.type==="ConditionalExpression"&&(E.parent.consequent===E||E.parent.alternate===E)||E.parent.type==="SequenceExpression"&&E.parent.expressions.at(-1)===E)?O(E.parent):y(E)}function x(E){return!!a.getCommentsInside(E).length}function g(E){return s.isParenthesized(1,E,a)}function f(E,k){if(E.parent.type==="ChainExpression")return f(E.parent,k);if(g(E))return!1;const D=E.parent;switch(D.type){case"CallExpression":case"NewExpression":return k.type==="SequenceExpression";case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"SequenceExpression":return!1;case"ConditionalExpression":if(E===D.test)return u(k)<=u(D);if(E===D.consequent||E===D.alternate)return u(k)=Ve||N(fe)))}function G(fe){return m&&fe.test.type==="AssignmentExpression"}function U(fe){for(let Ve=fe;Ve;Ve=Ve.parent)if(Ve.type==="ReturnStatement"||Ve.type==="ArrowFunctionExpression"&&Ve.body.type!=="BlockStatement")return!0;return!1}function Q(fe){const Ve=p.getLastToken(fe),mt=p.getTokenBefore(Ve);return fe.arguments.length>0||s.isOpeningParenToken(mt)&&s.isClosingParenToken(Ve)&&fe.callee.range[1]0&&Kt.test(Bt[se-1].value))return}}function Pt(){u.report({node:fe,loc:Ve.loc,messageId:"unexpected",fix:ue(fe)?Bt=>{const se=p.text.slice(Ve.range[1],mt.range[0]);return Bt.replaceTextRange([Ve.range[0],mt.range[1]],(te(fe)?" ":"")+se+(V(fe)?" ":""))}:null})}if(T){T.reports.push({node:fe,finishReport:Pt});return}Pt()}function ce(fe){j(fe.argument,d(fe))&&ne(fe.argument)}function pe(fe){let Ve=fe.object,mt=fe.object.type;for(;mt==="MemberExpression";)Ve=Ve.object,mt=Ve.type;return mt==="CallExpression"}function Be(fe){const Ve=fe.callee;j(Ve,d(fe))&&(L(Ve)||!(ae(fe)||Ve.type==="NewExpression"&&!Q(Ve)&&!(fe.type==="NewExpression"&&!Q(fe))||fe.type==="NewExpression"&&Ve.type==="MemberExpression"&&pe(Ve)||!fe.optional&&Ve.type==="ChainExpression"))&&ne(fe.callee),fe.arguments.filter(mt=>j(mt,k)).forEach(ne)}function oe(fe){const Ve=d(fe),mt=d(fe.left),Pt=d(fe.right),Bt=fe.operator==="**",se=y&&(fe.left.type==="BinaryExpression"||fe.left.type==="LogicalExpression"),Kt=y&&(fe.right.type==="BinaryExpression"||fe.right.type==="LogicalExpression");!se&&I(fe.left)&&(!(["AwaitExpression","UnaryExpression"].includes(fe.left.type)&&Bt)&&!s.isMixedLogicalAndCoalesceExpressions(fe.left,fe)&&(mt>Ve||mt===Ve&&!Bt)||N(fe.left))&&ne(fe.left),!Kt&&I(fe.right)&&(!s.isMixedLogicalAndCoalesceExpressions(fe.right,fe)&&(Pt>Ve||Pt===Ve&&Bt)||N(fe.right))&&ne(fe.right)}function Z(fe){if(!fe.superClass)return;(d(fe.superClass)>D?I(fe.superClass):L(fe.superClass))&&ne(fe.superClass)}function ge(fe){j(fe.argument,k)&&ne(fe.argument)}function Re(fe){const Ve=P(fe)?p.getTokenBefore(fe):p.getFirstToken(fe),mt=p.getTokenAfter(Ve,s.isNotOpeningParenToken),Pt=mt?p.getTokenAfter(mt):null,Bt=mt?p.getTokenAfter(mt,s.isNotClosingParenToken):null;s.isOpeningParenToken(Ve)&&(s.isOpeningBraceToken(mt)||mt.type==="Keyword"&&(mt.value==="function"||mt.value==="class"||mt.value==="let"&&Bt&&(s.isOpeningBracketToken(Bt)||Bt.type==="Identifier"))||mt&&mt.type==="Identifier"&&mt.value==="async"&&Pt&&Pt.type==="Keyword"&&Pt.value==="function")&&a.add(mt),(fe.parent.type==="ExportDefaultDeclaration"?j(fe,k):I(fe))&&ne(fe)}function Se(fe,Ve){const mt=[fe];let Pt=fe;for(;Pt!==Ve;){if(Pt=Pt.parent,Pt===null)throw new Error("Nodes are not in the ancestor-descendant relationship.");mt.push(Pt)}return mt}function we(fe,Ve){return Se(Ve,fe).reverse()}function Me(fe,Ve){switch(fe.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return fe.params.includes(Ve);case"CallExpression":case"NewExpression":return fe.arguments.includes(Ve);case"MemberExpression":return fe.computed&&fe.property===Ve;case"ConditionalExpression":return fe.consequent===Ve;default:return!1}}function it(){T={upper:T,inExpressionNodes:[],reports:[]}}function pt(){const{upper:fe,inExpressionNodes:Ve,reports:mt}=T;fe?(fe.inExpressionNodes.push(...Ve),fe.reports.push(...mt)):mt.forEach(({finishReport:Pt})=>Pt()),T=fe}function kt(fe){return T.reports.some(Ve=>Ve.node===fe)}function qt(fe){T.reports=T.reports.filter(Ve=>Ve.node!==fe)}function Ut(fe){return fe.type==="MemberExpression"?fe.parent.type==="NewExpression"&&fe.parent.callee===fe?!0:fe.parent.object===fe&&Ut(fe.parent):!1}function tr({left:fe,operator:Ve,right:mt}){if(fe.type==="Identifier"&&["=","&&=","||=","??="].includes(Ve)){const Pt=mt.type;if(Pt==="ArrowFunctionExpression"||(Pt==="FunctionExpression"||Pt==="ClassExpression")&&!mt.id)return!0}return!1}return{ArrayExpression(fe){fe.elements.filter(Ve=>Ve&&j(Ve,k)).forEach(ne)},ArrayPattern(fe){fe.elements.filter(Ve=>z(Ve)&&I(Ve)).forEach(ne)},ArrowFunctionExpression(fe){if(!W(fe)&&!(fe.body.type==="ConditionalExpression"&&g)&&fe.body.type!=="BlockStatement"){const Ve=p.getFirstToken(fe.body,s.isNotOpeningParenToken),mt=p.getTokenBefore(Ve);s.isOpeningParenToken(mt)&&s.isOpeningBraceToken(Ve)&&a.add(Ve),j(fe.body,k)&&ne(fe.body)}},AssignmentExpression(fe){z(fe.left)&&I(fe.left)&&(!tr(fe)||N(fe.left))&&ne(fe.left),!W(fe)&&j(fe.right,d(fe))&&ne(fe.right)},BinaryExpression(fe){T&&fe.operator==="in"&&T.inExpressionNodes.push(fe),oe(fe)},CallExpression:Be,ConditionalExpression(fe){if(W(fe))return;const Ve=new Set(["BinaryExpression","LogicalExpression"]);!(o&&Ve.has(fe.test.type))&&!G(fe)&&j(fe.test,d({type:"LogicalExpression",operator:"||"}))&&ne(fe.test),!(o&&Ve.has(fe.consequent.type))&&j(fe.consequent,k)&&ne(fe.consequent),!(o&&Ve.has(fe.alternate.type))&&j(fe.alternate,k)&&ne(fe.alternate)},DoWhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},ExportDefaultDeclaration:fe=>Re(fe.declaration),ExpressionStatement:fe=>Re(fe.expression),ForInStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}I(fe.left)&&ne(fe.left),I(fe.right)&&ne(fe.right)},ForOfStatement(fe){if(fe.left.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.left,s.isNotOpeningParenToken);Ve.value==="let"&&a.add(Ve)}I(fe.left)&&ne(fe.left),j(fe.right,k)&&ne(fe.right)},ForStatement(fe){if(fe.test&&I(fe.test)&&!G(fe)&&ne(fe.test),fe.update&&I(fe.update)&&ne(fe.update),fe.init){if(fe.init.type!=="VariableDeclaration"){const Ve=p.getFirstToken(fe.init,s.isNotOpeningParenToken);Ve.value==="let"&&s.isOpeningBracketToken(p.getTokenAfter(Ve,s.isNotClosingParenToken))&&a.add(Ve)}it(),I(fe.init)&&ne(fe.init)}},"ForStatement > *.init:exit"(fe){T.reports.length&&T.inExpressionNodes.forEach(Ve=>{const mt=we(fe,Ve);let Pt;for(let Bt=0;Bt=d(fe)&&(fe.computed||!(s.isDecimalInteger(fe.object)||fe.object.type==="Literal"&&fe.object.regex))&&ne(fe.object),mt&&fe.object.type==="CallExpression"&&ne(fe.object),mt&&!b&&fe.object.type==="NewExpression"&&Q(fe.object)&&ne(fe.object),mt&&fe.optional&&fe.object.type==="ChainExpression"&&ne(fe.object),fe.computed&&I(fe.property)&&ne(fe.property)},"MethodDefinition[computed=true]"(fe){j(fe.key,k)&&ne(fe.key)},NewExpression:Be,ObjectExpression(fe){fe.properties.filter(Ve=>Ve.value&&j(Ve.value,k)).forEach(Ve=>ne(Ve.value))},ObjectPattern(fe){fe.properties.filter(Ve=>{const mt=Ve.value;return z(mt)&&I(mt)}).forEach(Ve=>ne(Ve.value))},Property(fe){if(fe.computed){const{key:Ve}=fe;Ve&&j(Ve,k)&&ne(Ve)}},PropertyDefinition(fe){fe.computed&&j(fe.key,k)&&ne(fe.key),fe.value&&j(fe.value,k)&&ne(fe.value)},RestElement(fe){const Ve=fe.argument;z(Ve)&&I(Ve)&&ne(Ve)},ReturnStatement(fe){const Ve=p.getFirstToken(fe);W(fe)||fe.argument&&K(Ve,fe.argument)&&!(fe.argument.type==="Literal"&&fe.argument.regex)&&ne(fe.argument)},SequenceExpression(fe){const Ve=d(fe);fe.expressions.filter(mt=>j(mt,Ve)).forEach(ne)},SwitchCase(fe){fe.test&&I(fe.test)&&ne(fe.test)},SwitchStatement(fe){I(fe.discriminant)&&ne(fe.discriminant)},ThrowStatement(fe){const Ve=p.getFirstToken(fe);K(Ve,fe.argument)&&ne(fe.argument)},UnaryExpression:ce,UpdateExpression(fe){if(fe.prefix)ce(fe);else{const{argument:Ve}=fe,mt=p.getLastToken(fe);Ve.loc.end.line===mt.loc.start.line?ce(fe):L(Ve)&&ne(Ve)}},AwaitExpression:ce,VariableDeclarator(fe){fe.init&&j(fe.init,k)&&!(fe.init.type==="Literal"&&fe.init.regex)&&ne(fe.init)},WhileStatement(fe){I(fe.test)&&!G(fe)&&ne(fe.test)},WithStatement(fe){I(fe.object)&&ne(fe.object)},YieldExpression(fe){if(fe.argument){const Ve=p.getFirstToken(fe);(d(fe.argument)>=d(fe)&&K(Ve,fe.argument)||L(fe.argument))&&ne(fe.argument)}},ClassDeclaration:Z,ClassExpression:Z,SpreadElement:ge,SpreadProperty:ge,ExperimentalSpreadProperty:ge,TemplateLiteral(fe){fe.expressions.filter(Ve=>Ve&&I(Ve)).forEach(ne)},AssignmentPattern(fe){const{left:Ve,right:mt}=fe;z(Ve)&&I(Ve)&&ne(Ve),mt&&j(mt,k)&&ne(mt)}}}},Dm}var Im,Ek;function dj(){if(Ek)return Im;Ek=1;const c=Oo(),s=Ze();return Im={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(u){const p=u.sourceCode;function a(m){const o=p.getTokenAfter(m);if(!o||o.type!=="String")return!0;const y=p.getNodeByRangeIndex(o.range[0]);return!s.isTopLevelExpressionStatement(y.parent)}function d(m){u.report({node:m,messageId:"unexpected",fix:a(m)?o=>new c(o,u.sourceCode).retainSurroundingTokens(m).remove(m):null})}function v(m){for(let o=m;o.type==="Punctuator"&&!s.isClosingBraceToken(o);o=p.getTokenAfter(o))s.isSemicolonToken(o)&&d(o)}return{EmptyStatement(m){const o=m.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(o.type)||d(m)},ClassBody(m){v(p.getFirstToken(m,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(m){v(p.getTokenAfter(m))}}}},Im}var Rm,Ck;function mj(){if(Ck)return Rm;Ck=1;const{directivesPattern:c}=iE(),s=/falls?\s?through/iu;function u(v){for(const m of v)if(m.reachable)return!0;return!1}function p(v,m){return m.test(v)&&!c.test(v.trim())}function a(v,m,o,y){const O=o.sourceCode;if(v.consequent.length===1&&v.consequent[0].type==="BlockStatement"){const g=O.getLastToken(v.consequent[0]),f=O.getCommentsBefore(g).pop();if(f&&p(f.value,y))return f}const x=O.getCommentsBefore(m).pop();return x&&p(x.value,y)?x:null}function d(v,m){return m.loc.start.line>v.loc.end.line+1}return Rm={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1},reportUnusedFallthroughComment:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedFallthroughComment:"Found a comment that would permit fallthrough, but case cannot fall through.",case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(v){const m=v.options[0]||{},o=[];let y=new Set;const O=v.sourceCode,x=m.allowEmptyCase||!1,g=m.reportUnusedFallthroughComment||!1;let f=null,b=null;return m.commentPattern?b=new RegExp(m.commentPattern,"u"):b=s,{onCodePathStart(){o.push(y),y=new Set},onCodePathEnd(){y=o.pop()},onUnreachableCodePathSegmentStart(S){y.add(S)},onUnreachableCodePathSegmentEnd(S){y.delete(S)},onCodePathSegmentStart(S){y.add(S)},onCodePathSegmentEnd(S){y.delete(S)},SwitchCase(S){if(f&&f.node.parent===S.parent){const E=a(f.node,S,v,b);f.isFallthrough&&!E?v.report({messageId:S.test?"case":"default",node:S}):g&&!f.isSwitchExitReachable&&E&&v.report({messageId:"unusedFallthroughComment",node:E})}f=null},"SwitchCase:exit"(S){const E=O.getTokenAfter(S),k=u(y),D=k&&(S.consequent.length>0||!x&&d(S,E))&&S.parent.cases.at(-1)!==S;f={node:S,isSwitchExitReachable:k,isFallthrough:D}}}}},Rm}var Fm,wk;function gj(){if(wk)return Fm;wk=1;const c=Ze();return Fm={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(s){const u=s.sourceCode;return{Literal(p){typeof p.value=="number"&&(p.raw.startsWith(".")&&s.report({node:p,messageId:"leading",fix(a){const d=u.getTokenBefore(p),v=d&&d.range[1]===p.range[0]&&!c.canTokensBeAdjacent(d,`0${p.raw}`);return a.insertTextBefore(p,v?" 0":"0")}}),p.raw.indexOf(".")===p.raw.length-1&&s.report({node:p,messageId:"trailing",fix:a=>a.insertTextAfter(p,"0")}))}}}},Fm}var _m,kk;function yj(){if(kk)return _m;kk=1;const c=Ze();return _m={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(s){const u=s.sourceCode;function p(v){c.getModifyingReferences(v).forEach(m=>{s.report({node:m.identifier,messageId:"isAFunction",data:{name:m.identifier.name}})})}function a(v){v.defs[0].type==="FunctionName"&&p(v.references)}function d(v){u.getDeclaredVariables(v).forEach(a)}return{FunctionDeclaration:d,FunctionExpression:d}}},_m}var Bm,Ak;function bj(){return Ak||(Ak=1,Bm={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=c.sourceCode,p=s&&s.exceptions||[];function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"globalShouldNotBeModified",data:{name:y.name}})}function d(v){v.writeable===!1&&!p.includes(v.name)&&v.references.forEach(a)}return{Program(v){u.getScope(v).variables.forEach(d)}}}}),Bm}var Lm,Pk;function vj(){if(Pk)return Lm;Pk=1;const c=Ze(),s=/^(?:i|lastI)ndexOf$/u,u=["~","!!","+","- -","-","*"];function p(S){return{boolean:"boolean"in S?S.boolean:!0,number:"number"in S?S.number:!0,string:"string"in S?S.string:!0,disallowTemplateShorthand:"disallowTemplateShorthand"in S?S.disallowTemplateShorthand:!1,allow:S.allow||[]}}function a(S){return S.operator==="!"&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){if(S.operator!=="~")return!1;const E=c.skipChainExpression(S.argument);return E.type==="CallExpression"&&c.isSpecificMemberAccess(E.callee,null,s)}function v(S){return S.operator==="*"&&(S.left.type==="Literal"&&S.left.value===1||S.right.type==="Literal"&&S.right.value===1)}function m(S,E){return S.type==="BinaryExpression"&&S.operator==="*"&&S.right.type==="Literal"&&S.right.value===1&&S.parent.type==="BinaryExpression"&&S.parent.operator==="/"&&S.parent.left===S&&!c.isParenthesised(E,S)}function o(S){return S.type==="Literal"&&typeof S.value=="number"||S.type==="CallExpression"&&(S.callee.name==="Number"||S.callee.name==="parseInt"||S.callee.name==="parseFloat")}function y(S){const E=S.left,k=S.right;return k.type!=="BinaryExpression"&&!o(k)?k:E.type!=="BinaryExpression"&&!o(E)?E:null}function O(S){return c.isStringLiteral(S)||S.type==="CallExpression"&&S.callee.type==="Identifier"&&S.callee.name==="String"}function x(S){return c.isStringLiteral(S)&&(S.value===""||S.type==="TemplateLiteral"&&S.quasis.length===1&&S.quasis[0].value.cooked==="")}function g(S){return S.operator==="+"&&(x(S.left)&&!O(S.right)||x(S.right)&&!O(S.left))}function f(S){return S.operator==="+="&&x(S.right)}function b(S){return x(S.left)?S.right:S.left}return Lm={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:u},uniqueItems:!0}},additionalProperties:!1}],messages:{implicitCoercion:"Unexpected implicit coercion encountered. Use `{{recommendation}}` instead.",useRecommendation:"Use `{{recommendation}}` instead."}},create(S){const E=p(S.options[0]||{}),k=S.sourceCode;function D(T,R,F,P){function N(I){const L=k.getTokenBefore(T);return(L==null?void 0:L.range[1])===T.range[0]&&!c.canTokensBeAdjacent(L,R)?I.replaceText(T,` ${R}`):I.replaceText(T,R)}S.report({node:T,messageId:"implicitCoercion",data:{recommendation:R},fix(I){return P?N(I):null},suggest:[{messageId:"useRecommendation",data:{recommendation:R},fix(I){return P||!F?null:N(I)}}]})}return{UnaryExpression(T){let R;if(R=E.allow.includes("!!"),!R&&E.boolean&&a(T)){const F=`Boolean(${k.getText(T.argument.argument)})`,P=c.getVariableByName(k.getScope(T),"Boolean"),N=(P==null?void 0:P.identifiers.length)===0;D(T,F,!0,N)}if(R=E.allow.includes("~"),!R&&E.boolean&&d(T)){const F=T.argument.type==="ChainExpression"?">= 0":"!== -1",P=`${k.getText(T.argument)} ${F}`;D(T,P,!1,!1)}if(R=E.allow.includes("+"),!R&&E.number&&T.operator==="+"&&!o(T.argument)){const F=`Number(${k.getText(T.argument)})`;D(T,F,!0,!1)}if(R=E.allow.includes("- -"),!R&&E.number&&T.operator==="-"&&T.argument.type==="UnaryExpression"&&T.argument.operator==="-"&&!o(T.argument.argument)){const F=`Number(${k.getText(T.argument.argument)})`;D(T,F,!0,!1)}},"BinaryExpression:exit"(T){let R;R=E.allow.includes("*");const F=!R&&E.number&&v(T)&&!m(T,k)&&y(T);if(F){const P=`Number(${k.getText(F)})`;D(T,P,!0,!1)}if(R=E.allow.includes("-"),!R&&E.number&&T.operator==="-"&&T.right.type==="Literal"&&T.right.value===0&&!o(T.left)){const P=`Number(${k.getText(T.left)})`;D(T,P,!0,!1)}if(R=E.allow.includes("+"),!R&&E.string&&g(T)){const P=`String(${k.getText(b(T))})`;D(T,P,!0,!1)}},AssignmentExpression(T){if(!E.allow.includes("+")&&E.string&&f(T)){const F=k.getText(b(T)),P=`${F} = String(${F})`;D(T,P,!0,!1)}},TemplateLiteral(T){if(!E.disallowTemplateShorthand||T.parent.type==="TaggedTemplateExpression"||T.expressions.length!==1||T.quasis[0].value.cooked!==""||T.quasis[1].value.cooked!==""||O(T.expressions[0]))return;const F=`String(${k.getText(T.expressions[0])})`;D(T,F,!0,!1)}}}},Lm}var Nm,Tk;function xj(){return Tk||(Tk=1,Nm={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(c){const s=c.options[0]&&c.options[0].lexicalBindings===!0,u=c.sourceCode;function p(a,d,v){c.report({node:a,messageId:d,data:{kind:v}})}return{Program(a){const d=u.getScope(a);d.variables.forEach(v=>{const m=v.writeable===!1;v.writeable!==!0&&(v.eslintExported||v.defs.forEach(y=>{const O=y.node;(y.type==="FunctionName"||y.type==="Variable"&&y.parent.kind==="var")&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalNonLexicalBinding",y.type==="FunctionName"?"function":`'${y.parent.kind}'`)),s&&(y.type==="ClassName"||y.type==="Variable"&&(y.parent.kind==="let"||y.parent.kind==="const"))&&(m?p(O,"redeclarationOfReadonlyGlobal"):p(O,"globalLexicalBinding",y.type==="ClassName"?"class":`'${y.parent.kind}'`))}))}),d.implicit.variables.forEach(v=>{const m=d.set.get(v.name);let o;if(m){if(m.writeable)return;o="assignmentToReadonlyGlobal"}else o="globalVariableLeak";v.defs.forEach(y=>{p(y.node,o)})})}}}}),Nm}var Mm,Dk;function Oj(){if(Dk)return Mm;Dk=1;const c=Ze(),{getStaticValue:s}=Kr();return Mm={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(u){const p=Object.freeze(["global","window","globalThis"]),a=/^(?:set(?:Interval|Timeout)|execScript)$/u,d=u.sourceCode;function v(y){return y.type==="Literal"&&typeof y.value=="string"||y.type==="TemplateLiteral"?!0:y.type==="BinaryExpression"&&y.operator==="+"?v(y.left)||v(y.right):!1}function m(y){const[O]=y.arguments;if(O){const x=s(O,d.getScope(y));(x&&typeof x.value=="string"||v(O))&&u.report({node:y,messageId:"impliedEval"})}}function o(y){const{references:O,name:x}=y;O.forEach(g=>{let b=g.identifier.parent;for(;c.isSpecificMemberAccess(b,null,x);)b=b.parent;if(c.isSpecificMemberAccess(b,null,a)){const S=b.parent.type==="ChainExpression"?b.parent:b,E=S.parent;E.type==="CallExpression"&&E.callee===S&&m(E)}})}return{CallExpression(y){c.isSpecificId(y.callee,a)&&m(y)},"Program:exit"(y){const O=d.getScope(y);p.map(x=>c.getVariableByName(O,x)).filter(x=>!!x&&x.defs.length===0).forEach(o)}}}},Mm}var $m,Ik;function Sj(){if(Ik)return $m;Ik=1;const{findVariable:c}=Kr(),s=Ze(),u={Object:/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,Reflect:/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u};function p(y){const{parent:O}=y;return O.type==="AssignmentExpression"&&O.left===y||O.type==="ArrayPattern"||O.type==="Property"&&O.value===y&&O.parent.type==="ObjectPattern"||O.type==="RestElement"||O.type==="AssignmentPattern"&&O.left===y}function a(y){const O=y.parent.type==="ChainExpression"?y.parent:y,{parent:x}=O;return x.type==="UpdateExpression"&&x.argument===O||x.type==="UnaryExpression"&&x.operator==="delete"&&x.argument===O}function d(y){const{parent:O}=y;return O.type==="ForInStatement"&&O.left===y||O.type==="ForOfStatement"&&O.left===y}function v(y,O){const{parent:x}=y;if(x.type!=="CallExpression"||x.arguments[0]!==y)return!1;const g=s.skipChainExpression(x.callee);if(!s.isSpecificMemberAccess(g,"Object",u.Object)&&!s.isSpecificMemberAccess(g,"Reflect",u.Reflect))return!1;const f=c(O,g.object);return f!==null&&f.scope.type==="global"}function m(y,O){const{parent:x}=y;return x.type==="MemberExpression"&&x.object===y&&(p(x)||a(x)||d(x))||v(y,O)}function o(y){let O=y.parent;for(;O&&O.type!=="AssignmentExpression"&&O.type!=="UpdateExpression"&&O.type!=="UnaryExpression"&&O.type!=="CallExpression"&&O.type!=="ForInStatement"&&O.type!=="ForOfStatement";)O=O.parent;return O||y}return $m={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(y){const O=y.sourceCode;return{ImportDeclaration(x){const g=O.getScope(x);for(const f of O.getDeclaredVariables(x)){const b=f.defs.some(E=>E.node.type==="ImportNamespaceSpecifier");let S=null;for(const E of f.references){const k=E.identifier;k!==S&&(S=k,E.isWrite()?y.report({node:o(k),messageId:"readonly",data:{name:k.name}}):b&&m(k,g)&&y.report({node:o(k),messageId:"readonlyMember",data:{name:k.name}}))}}}}}},$m}var jm,Rk;function Ej(){if(Rk)return jm;Rk=1;const c=Ze();return jm={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(s){const u=s.sourceCode,p=s.options[0];let a;p&&p.ignorePattern&&(a=new RegExp(p.ignorePattern,"u"));function d(v){const m=String(u.lines[v.loc.start.line-1]),o=String(u.lines[v.loc.end.line-1]),y=m.slice(0,v.loc.start.column).trim(),O=o.slice(v.loc.end.column).trim(),x=!y,g=!O;if(!(x&&g)&&!(a&&a.test(v.value))){if((x||y==="{")&&(g||O==="}")){const f=u.getNodeByRangeIndex(v.range[0]);if(f&&f.type==="JSXEmptyExpression")return}c.isDirectiveComment(v)||s.report({node:v,messageId:"unexpectedInlineComment"})}}return{Program(){u.getAllComments().filter(v=>v.type!=="Shebang").forEach(d)}}}},jm}var qm,Fk;function Cj(){if(Fk)return qm;Fk=1;const c=Ze(),s=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),u=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function p(a){let{parent:d}=a;for(;d;){if(d.type==="StaticBlock")return"class static block body";if(c.isFunction(d))return"function body";({parent:d}=d)}return"program"}return qm={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]},{type:"object",properties:{blockScopedFunctions:{enum:["allow","disallow"]}},additionalProperties:!1}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(a){var y;const d=a.sourceCode,v=a.languageOptions.ecmaVersion,m=((y=a.options[1])==null?void 0:y.blockScopedFunctions)??"allow";function o(O){const x=O.parent;x.type==="BlockStatement"&&u.has(x.parent.type)||s.has(x.type)||a.report({node:O,messageId:"moveDeclToRoot",data:{type:O.type==="FunctionDeclaration"?"function":"variable",body:p(O)}})}return{FunctionDeclaration(O){const x=d.getScope(O).upper.isStrict;m==="allow"&&v>=2015&&x||o(O)},VariableDeclaration(O){a.options[0]==="both"&&O.kind==="var"&&o(O)}}}},qm}var Qm,_k;function wj(){if(_k)return Qm;_k=1;const c=Cs().RegExpValidator,s=new c,u="dgimsuvy",p=void 0;return Qm={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(a){const d=a.options[0];let v=[];if(d&&d.allowConstructorFlags){const g=d.allowConstructorFlags.join("").replace(new RegExp(`[${u}]`,"gu"),"");g&&(v=[...new Set(g)])}function m(g,f){a.report({node:g,messageId:"regexMessage",data:{message:f}})}function o(g){return g&&g.type==="Literal"&&typeof g.value=="string"}function y(g){return g.arguments.length<2?"":o(g.arguments[1])?g.arguments[1].value:null}function O(g,f){try{return s.validatePattern(g,p,p,f),null}catch(b){return b.message}}function x(g,f,b){const S=[];if(typeof f=="string")for(const E of f)b.includes(E)&&S.push(E);return g&&g.includes("u")&&g.includes("v")?"Regex 'u' and 'v' flags cannot be used together":S.length>0?`Duplicate flags ('${S.join("")}') supplied to RegExp constructor`:f?`Invalid flags supplied to RegExp constructor '${f}'`:null}return{"CallExpression, NewExpression"(g){if(g.callee.type!=="Identifier"||g.callee.name!=="RegExp")return;const f=y(g);let b=f;const S=v.length>0?u.split("").concat(v):u.split("");f&&S.forEach(D=>{b=b.replace(D,"")});let E=x(f,b,S);if(E){m(g,E);return}if(!o(g.arguments[0]))return;const k=g.arguments[0].value;E=f===null?O(k,{unicode:!0,unicodeSets:!1})&&O(k,{unicode:!1,unicodeSets:!0})&&O(k,{unicode:!1,unicodeSets:!1}):O(k,{unicode:f.includes("u"),unicodeSets:f.includes("v")}),E&&m(g,E)}}}},Qm}var Um,Bk;function kj(){if(Bk)return Um;Bk=1;const c=Ze();function s(u,p){return u.origin==="function"&&p.type==="ArrowFunctionExpression"}return Um={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(u){const a=(u.options[0]||{}).capIsConstructor!==!1,d=[],v=u.sourceCode;return d.getCurrent=function(){const m=this.at(-1);return m.init||(m.init=!0,m.valid=!c.isDefaultThisBinding(m.node,v,{capIsConstructor:a})),m},{onCodePathStart(m,o){if(!s(m,o)){if(m.origin==="program"){const y=v.getScope(o),O=u.languageOptions.parserOptions.ecmaFeatures||{};d.push({init:!0,node:o,valid:!(o.sourceType==="module"||O.globalReturn&&y.childScopes[0].isStrict)});return}d.push({init:!v.getScope(o).isStrict,node:o,valid:!0})}},onCodePathEnd(m,o){s(m,o)||d.pop()},ThisExpression(m){const o=d.getCurrent();o&&!o.valid&&u.report({node:m,messageId:"unexpectedThis"})}}}},Um}var Vm,Lk;function Aj(){if(Lk)return Vm;Lk=1;const c=Ze(),s=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,u=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mgu,p=/[\u2028\u2029]/mgu,a=c.createGlobalLinebreakMatcher();return Vm={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(d){let v=[];const m=d.options[0]||{},o=!!m.skipComments,y=m.skipStrings!==!1,O=!!m.skipRegExps,x=!!m.skipTemplates,g=!!m.skipJSXText,f=d.sourceCode,b=f.getAllComments();function S(I){const L=I.loc.start,j=I.loc.end;v=v.filter(({loc:{start:G}})=>G.line=j.column||G.line>j.line)}function E(I){const L=y&&typeof I.value=="string",j=O&&!!I.regex;(L||j)&&s.test(I.raw)&&S(I)}function k(I){typeof I.value.raw=="string"&&s.test(I.value.raw)&&S(I)}function D(I){s.test(I.value)&&S(I)}function T(I){s.test(I.raw)&&S(I)}function R(I){f.lines.forEach((j,G)=>{const U=G+1;let Q;for(;(Q=u.exec(j))!==null;)v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:U,column:Q.index},end:{line:U,column:Q.index+Q[0].length}}})})}function F(I){const L=f.getText(),j=f.lines,G=L.match(a);let U=-1,Q;for(;(Q=p.exec(L))!==null;){const $=G.indexOf(Q[0],U+1)||0;v.push({node:I,messageId:"noIrregularWhitespace",loc:{start:{line:$+1,column:j[$].length},end:{line:$+2,column:0}}}),U=$}}function P(){}const N={};return s.test(f.getText())?(N.Program=function(I){R(I),F(I)},N.Literal=E,N.TemplateElement=x?k:P,N.JSXText=g?T:P,N["Program:exit"]=function(){o&&b.forEach(D),v.forEach(I=>d.report(I))}):N.Program=P,N}},Vm}var Wm,Nk;function Pj(){if(Nk)return Wm;Nk=1;const{getStaticPropertyName:c}=Ze();return Wm={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(s){return{MemberExpression(u){c(u)==="__iterator__"&&s.report({node:u,messageId:"noIterator"})}}}},Wm}var Gm,Mk;function Tj(){if(Mk)return Gm;Mk=1;const c=Ze();return Gm={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(s){const u=s.sourceCode;function p(a,d){return c.getVariableByName(a,d)!==null}return{LabeledStatement(a){const d=u.getScope(a);p(d,a.label.name)&&s.report({node:a,messageId:"identifierClashWithLabel"})}}}},Gm}var zm,$k;function Dj(){if($k)return zm;$k=1;const c=Ze();return zm={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(s){const u=s.options[0],p=u&&u.allowLoop,a=u&&u.allowSwitch;let d=null;function v(y){return c.isLoop(y)?"loop":y.type==="SwitchStatement"?"switch":"other"}function m(y){switch(y){case"loop":return p;case"switch":return a;default:return!1}}function o(y){let O=d;for(;O;){if(O.label===y)return O.kind;O=O.upper}return"other"}return{LabeledStatement(y){d={label:y.label.name,kind:v(y.body),upper:d}},"LabeledStatement:exit"(y){m(d.kind)||s.report({node:y,messageId:"unexpectedLabel"}),d=d.upper},BreakStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInBreak"})},ContinueStatement(y){y.label&&!m(o(y.label.name))&&s.report({node:y,messageId:"unexpectedLabelInContinue"})}}}},zm}var Zm,jk;function Ij(){return jk||(jk=1,Zm={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(c){const s=[];let u;const p=c.sourceCode;function a(m){const o=m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"?"redundantNestedBlock":"redundantBlock";c.report({node:m,messageId:o})}function d(m){return m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock"||m.parent.type==="Program"||m.parent.type==="SwitchCase"&&!(m.parent.consequent[0]===m&&m.parent.consequent.length===1)}function v(m){if(s.length===0)return;const o=m.parent;s.at(-1)===o&&s.pop()}return u={BlockStatement(m){d(m)&&a(m)}},c.languageOptions.ecmaVersion>=2015&&(u={BlockStatement(m){d(m)&&s.push(m)},"BlockStatement:exit"(m){s.length>0&&s.at(-1)===m?(s.pop(),a(m)):(m.parent.type==="BlockStatement"||m.parent.type==="StaticBlock")&&m.parent.body.length===1&&a(m)}},u.VariableDeclaration=function(m){m.kind!=="var"&&v(m)},u.FunctionDeclaration=function(m){p.getScope(m).isStrict&&v(m)},u.ClassDeclaration=v),u}}),Zm}var Xm,qk;function Rj(){return qk||(qk=1,Xm={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(c){const s=c.sourceCode;return{IfStatement(u){const p=u.parent,a=p.parent;p&&p.type==="BlockStatement"&&p.body.length===1&&a&&a.type==="IfStatement"&&p===a.alternate&&c.report({node:u,messageId:"unexpectedLonelyIf",fix(d){const v=s.getFirstToken(p),m=s.getLastToken(p),o=s.getTokenBefore(v),y=s.getTokenAfter(m),O=s.getLastToken(u.consequent),x=s.getText();return x.slice(v.range[1],u.range[0]).trim()||x.slice(u.range[1],m.range[0]).trim()||u.consequent.type!=="BlockStatement"&&O.value!==";"&&y&&(u.consequent.loc.end.line===y.loc.start.line||/^[([/+`-]/u.test(y.value)||O.value==="++"||O.value==="--")?null:d.replaceTextRange([v.range[0],m.range[1]],(o.range[1]===v.range[0]?" ":"")+s.getText(u))}})}}}}),Xm}var Ym,Qk;function Fj(){if(Qk)return Ym;Qk=1;function c(s){return(s.type==="FunctionExpression"||s.type==="ArrowFunctionExpression")&&s.parent&&s.parent.type==="CallExpression"&&s.parent.callee===s}return Ym={meta:{type:"suggestion",docs:{description:"Disallow function declarations that contain unsafe references inside loop statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-loop-func"},schema:[],messages:{unsafeRefs:"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}."}},create(s){const u=new Set,p=s.sourceCode;function a(o){for(let y=o;y.parent;y=y.parent){const O=y.parent;switch(O.type){case"WhileStatement":case"DoWhileStatement":return O;case"ForStatement":if(O.init!==y)return O;break;case"ForInStatement":case"ForOfStatement":if(O.right!==y)return O;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":if(u.has(O))break;return null}}return null}function d(o,y){const O=y?y.range[1]:0;let x=o,g=o;for(;g&&g.range[0]>=O;)x=g,g=a(g);return x}function v(o,y){const O=y.resolved,x=O&&O.defs[0],g=x&&x.parent,f=g&&g.type==="VariableDeclaration"?g.kind:"";if(f==="const"||f==="let"&&g.range[0]>o.range[0]&&g.range[1]b.identifier.name===o.id.name):!1)){u.add(o);return}const x=O.filter(g=>g.resolved&&!v(y,g)).map(g=>g.identifier.name);x.length>0&&s.report({node:o,messageId:"unsafeRefs",data:{varNames:`'${x.join("', '")}'`}})}return{ArrowFunctionExpression:m,FunctionExpression:m,FunctionDeclaration:m}}},Ym}var Hm,Uk;function _j(){return Uk||(Uk=1,Hm={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(c){function s(f){return typeof f.value=="number"}function u(f){return f.raw.replace(/_/gu,"")}function p(f){return["0x","0X","0b","0B","0o","0O"].every(S=>!f.raw.startsWith(S))&&!/^0[0-7]+$/u.test(f.raw)}function a(f){const b=u(f).toUpperCase();let S;return b.startsWith("0B")?S=2:b.startsWith("0X")?S=16:S=8,!b.endsWith(f.value.toString(S).toUpperCase())}function d(f){return`${f[0]}.${f.slice(1)}`}function v(f){for(let b=0;b=0;b--)if(f[b]!=="0")return f.slice(0,b+1);return f}function o(f){const b=m(v(f));return{magnitude:f.startsWith("0")?f.length-2:f.length-1,coefficient:d(b)}}function y(f){const b=v(f);if(b.startsWith(".")){const S=b.slice(1),E=v(S);return{magnitude:E.length-S.length-1,coefficient:d(E)}}return{magnitude:b.indexOf(".")-1,coefficient:d(b.replace(".",""))}}function O(f){const b=f.replace("E","e").split("e"),S=b[0],E=f.includes(".")?y(S):o(S),k=E.coefficient,D=b.length>1?parseInt(b[1],10)+E.magnitude:E.magnitude;return`${k}e${D}`}function x(f){const b=O(u(f)),S=b.split("e")[0].replace(".","").length;if(S>100)return!0;const E=f.value.toPrecision(S),k=O(E);return b!==k}function g(f){return p(f)?x(f):a(f)}return{Literal(f){f.value&&s(f)&&g(f)&&c.report({messageId:"noLossOfPrecision",node:f})}}}}),Hm}var Km,Vk;function Bj(){if(Vk)return Km;Vk=1;const c=Ze(),s=2**32-1;function u(p){return typeof p=="string"?BigInt(p.slice(0,-1)):p}return Km={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(p){const a=p.options[0]||{},d=!!a.detectObjects,v=!!a.enforceConst,m=new Set((a.ignore||[]).map(u)),o=!!a.ignoreArrayIndexes,y=!!a.ignoreDefaultValues,O=!!a.ignoreClassFieldInitialValues,x=d?[]:["ObjectExpression","Property","AssignmentExpression"];function g(D){return m.has(D)}function f(D){const T=D.parent;return T.type==="AssignmentPattern"&&T.right===D}function b(D){const T=D.parent;return T.type==="PropertyDefinition"&&T.value===D}function S(D){const T=D.parent;return T.type==="CallExpression"&&D===T.arguments[1]&&(c.isSpecificId(T.callee,"parseInt")||c.isSpecificMemberAccess(T.callee,"Number","parseInt"))}function E(D){return D.parent.type.indexOf("JSX")===0}function k(D,T){const R=D.parent;return R.type==="MemberExpression"&&R.property===D&&(Number.isInteger(T)||typeof T=="bigint")&&T>=0&&T=127995&&s<=127999}),eg}var tg,zk;function Mj(){return zk||(zk=1,tg=function(s){return s>=127462&&s<=127487}),tg}var rg,Zk;function $j(){return Zk||(Zk=1,rg=function(s,u){return s>=55296&&s<56320&&u>=56320&&u<57344}),rg}var ng,Xk;function jj(){if(Xk)return ng;Xk=1;const c=Lj(),s=Nj(),u=Mj(),p=$j();return ng={isCombiningCharacter:c,isEmojiModifier:s,isRegionalIndicatorSymbol:u,isSurrogatePair:p},ng}var sg,Yk;function ig(){if(Yk)return sg;Yk=1;const{RegExpValidator:c}=Cs(),s=2025;function u(p,a,d="u"){if(d==="u"&&p<=5||d==="v"&&p<=2023)return!1;const v=new c({ecmaVersion:Math.min(p,s)});try{v.validatePattern(a,void 0,void 0,d==="u"?{unicode:!0}:{unicodeSets:!0})}catch{return!1}return!0}return sg={isValidWithUnicodeFlag:u,REGEXPP_LATEST_ECMA_VERSION:s},sg}var ag,Hk;function qj(){if(Hk)return ag;Hk=1;class c{constructor(x,g){this.start=x,this.source=g}get end(){return this.start+this.length}get length(){return this.source.length}}class s{constructor(x){this.source=x,this.pos=0}advance(x){this.pos+=x}read(x=0,g=1){const f=x+this.pos;return this.source.slice(f,f+g)}}const u={__proto__:null,b:"\b",f:"\f",n:` +`,r:"\r",t:" ",v:"\v"};function p(O,x){const g=O.read(0,x),f=parseInt(g,16);return O.advance(x),String.fromCharCode(f)}function a(O){const x=/\{(?[\dA-Fa-f]+)\}/uy;x.lastIndex=O.pos;const g=x.exec(O.source);if(g){const f=parseInt(g.groups.hexDigits,16);return O.pos=x.lastIndex,String.fromCodePoint(f)}return p(O,4)}function d(O,x){const[g]=O.read(-1,x).match(/^[0-7]+/u);O.advance(g.length-1);const f=parseInt(g,8);return String.fromCharCode(f)}function v(O){const x=O.read(1);O.advance(2);const g=u[x];if(g)return g;switch(x){case"x":return p(O,2);case"u":return a(O);case"\r":O.read()===` +`&&O.advance(1);case` +`:case"\u2028":case"\u2029":return"";case"0":case"1":case"2":case"3":return d(O,3);case"4":case"5":case"6":case"7":return d(O,2);default:return x}}function*m(O){const x=O.pos,g=v(O),f=O.pos,b=O.source.slice(x,f);switch(g.length){case 0:break;case 1:yield new c(x,b);break;default:yield new c(x,b),yield new c(x,b);break}}function o(O){const x=new s(O),g=x.read();x.advance(1);const f=[];for(;;){const b=x.read();if(b===g)break;b==="\\"?f.push(...m(x)):(f.push(new c(x.pos,b)),x.advance(1))}return f}function y(O){const x=new s(O);x.advance(1);const g=[];for(;;){const f=x.read();if(f==="`"||f==="$"&&x.read(1)==="{")break;if(f==="\\")g.push(...m(x));else{let b;f==="\r"&&x.read(1)===` +`?b=`\r +`:b=f,g.push(new c(x.pos,b)),x.advance(b.length)}}return g}return ag={parseStringLiteral:o,parseTemplateToken:y},ag}var og,Kk;function Qj(){if(Kk)return og;Kk=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStaticValue:p,getStringIfConstant:a}=Kr(),{RegExpParser:d,visitRegExpAST:v}=Cs(),{isCombiningCharacter:m,isEmojiModifier:o,isRegionalIndicatorSymbol:y,isSurrogatePair:O}=jj(),x=Ze(),{isValidWithUnicodeFlag:g}=ig(),{parseStringLiteral:f,parseTemplateToken:b}=qj();function*S(P){let N=[];for(const I of P)switch(I.type){case"Character":N.push(I);break;case"CharacterClassRange":N.push(I.min),yield N,N=[I.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":N.length>0&&(yield N,N=[]);break}N.length>0&&(yield N)}function E(P){return/^\\u\{[\da-f]+\}$/iu.test(P.raw)}const k={*surrogatePairWithoutUFlag(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&!E(L)&&!E(I)&&(yield[L,I])}},*surrogatePair(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&O(L.value,I.value)&&(E(L)||E(I))&&(yield[L,I])}},*combiningClass(P,N){for(const[I,L]of P.entries()){const j=N[I-1];j&&L&&m(L.value)&&!m(j.value)&&(yield[j,L])}},*emojiModifier(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&o(I.value)&&!o(L.value)&&(yield[L,I])}},*regionalIndicatorSymbol(P){for(const[N,I]of P.entries()){const L=P[N-1];L&&I&&y(I.value)&&y(L.value)&&(yield[L,I])}},*zwj(P){let N=null;for(const[I,L]of P.entries()){const j=P[I-1],G=P[I+1];j&&L&&G&&L.value===8205&&j.value!==8205&&G.value!==8205&&(N?N.at(-1)===j?N.push(L,G):(yield N,N=P.slice(I-1,I+2)):N=P.slice(I-1,I+2))}N&&(yield N)}},D=Object.keys(k);function T(P,N){if(!P)return null;if(P.type==="Literal"&&P.regex)return{regex:P.regex};const I=p(P,N);return(I==null?void 0:I.value)instanceof RegExp?null:I}function R(P,N){if(!N.startsWith("\\"))return!1;const I=new RegExp("(?<=^\\\\+).$","su").exec(N);return(I==null?void 0:I[0])!==String.fromCodePoint(P.value)}function F(P,N,I){const L=P.start,j=P.end-1,G=I[L].start,U=I[j].end,Q=N.slice(G,U);return R(P,Q)}return og={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[{type:"object",properties:{allowEscape:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(P){var U;const N=(U=P.options[0])==null?void 0:U.allowEscape,I=P.sourceCode,L=new d,j=new Set;function G(Q,$,W,K){let te;try{te=L.parsePattern($,0,$.length,{unicode:W.includes("u"),unicodeSets:W.includes("v")})}catch{return}let V=null;function ae(ne){if(Q.type==="Literal"&&Q.regex)return R(ne,ne.raw);if(Q.type==="Literal"&&typeof Q.value=="string"){const ce=Q.raw;return V??(V=f(ce)),F(ne,ce,V)}if(x.isStaticTemplateLiteral(Q)){const ce=I.getText(Q);return V??(V=b(ce)),F(ne,ce,V)}return!1}const z=new Map;v(te,{onCharacterClassEnter(ne){for(const ce of S(ne.elements)){let pe;N?pe=ce.map(Be=>ae(Be)?null:Be):pe=ce;for(const Be of D){const oe=k[Be](pe,ce);z.has(Be)?z.get(Be).push(...oe):z.set(Be,[...oe])}}}});function ue(ne){return!x.isStaticTemplateLiteral(Q)&&Q.type!=="Literal"?ne.length?[Q.loc]:[]:ne.map(ce=>{const pe=ce[0].start,Be=ce.at(-1).end-1;let oe,Z;if(Q.type==="TemplateLiteral"){const ge=I.getText(Q),Re=Q.range[0];V??(V=b(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else if(typeof Q.value=="string"){const ge=Q.raw,Re=Q.range[0];V??(V=f(ge)),oe=Re+V[pe].start,Z=Re+V[Be].end}else{const ge=Q.range[0]+1;oe=ge+pe,Z=ge+Be+1}return{start:I.getLocFromIndex(oe),end:I.getLocFromIndex(Z)}})}for(const[ne,ce]of z){let pe;ne==="surrogatePairWithoutUFlag"&&(pe=[{messageId:"suggestUnicodeFlag",fix:K}]);const Be=ue(ce);for(const oe of Be)P.report({node:Q,loc:oe,messageId:ne,suggest:pe})}}return{"Literal[regex]"(Q){j.has(Q)||G(Q,Q.regex.pattern,Q.regex.flags,$=>g(P.languageOptions.ecmaVersion,Q.regex.pattern)?$.insertTextAfter(Q,"u"):null)},Program(Q){const $=I.getScope(Q),W=new u($);for(const{node:K}of W.iterateGlobalReferences({RegExp:{[c]:!0,[s]:!0}})){let te,V;const[ae,z]=K.arguments,ue=T(ae,$);if(ue){if(z)ue.regex?(te=ue.regex.pattern,j.add(ae)):te=String(ue.value),V=a(z,$);else{if(ue.regex)continue;te=String(ue.value),V=""}typeof V=="string"&&G(ae,te,V,ne=>{if(!g(P.languageOptions.ecmaVersion,te))return null;if(K.arguments.length===1){const ce=I.getLastToken(K,{skip:1});return ne.insertTextAfter(ce,x.isCommaToken(ce)?' "u",':', "u"')}if(z.type==="Literal"&&typeof z.value=="string"||z.type==="TemplateLiteral"){const ce=[z.range[0],z.range[1]-1];return ne.insertTextAfterRange(ce,"u")}return null})}}}}}},og}var lg,Jk;function Uj(){if(Jk)return lg;Jk=1;const c=Ze(),s=["+","-","*","/","%","**"],u=["&","|","^","~","<<",">>",">>>"],p=["==","!=","===","!==",">",">=","<","<="],a=["&&","||"],d=["in","instanceof"],v=["?:"],m=["??"],o=[].concat(s,u,p,a,d,v,m),y=[s,u,p,a,d],O=/^(?:Binary|Logical|Conditional)Expression$/u;function x(b={}){const E=b.groups&&b.groups.length>0?b.groups:y,k=b.allowSamePrecedence!==!1;return{groups:E,allowSamePrecedence:k}}function g(b,S,E){return b.some(k=>k.includes(S)&&k.includes(E))}function f(b){return b.type==="ConditionalExpression"?b.test:b.left}return lg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(b){const S=b.sourceCode,E=x(b.options[0]);function k(P){const N=P,I=P.parent;return!g(E.groups,N.operator,I.type==="ConditionalExpression"?"?:":I.operator)||E.allowSamePrecedence&&c.getPrecedence(N)===c.getPrecedence(I)}function D(P){return P.operator!==P.parent.operator&&!c.isParenthesised(S,P)}function T(P){return S.getTokenAfter(f(P),c.isNotClosingParenToken)}function R(P){const N=P.parent,I=f(N)===P?P:N,L=f(N)!==P?P:N,j={leftOperator:I.operator||"?:",rightOperator:L.operator||"?:"};b.report({node:I,loc:T(I).loc,messageId:"unexpectedMixedOperator",data:j}),b.report({node:L,loc:T(L).loc,messageId:"unexpectedMixedOperator",data:j})}function F(P){O.test(P.parent.type)&&D(P)&&!k(P)&&R(P)}return{BinaryExpression:F,LogicalExpression:F}}},lg}var ug,eA;function Vj(){return eA||(eA=1,ug={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(c){const s=c.options[0];let u=!1,p=!1;typeof s=="object"?(u=s.grouping,p=s.allowCall):u=!!s;function a(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}const d=a(),v="require",m="uninitialized",o="other",y="core",O="file",x="module",g="computed";function f(k){return k?k.type==="CallExpression"&&k.callee.type==="Identifier"&&k.callee.name==="require"?v:p&&k.type==="CallExpression"&&k.callee.type==="CallExpression"?f(k.callee):k.type==="MemberExpression"?f(k.object):o:m}function b(k){if(k.type==="MemberExpression")return b(k.object);if(k.arguments.length===0)return g;const D=k.arguments[0];return D.type!=="Literal"||typeof D.value!="string"?g:d.includes(D.value)?y:/^\.{0,2}\//u.test(D.value)?O:x}function S(k){const D={};return k.forEach(T=>{const R=f(T.init);D[R]=!0}),!!(D[v]&&(D[m]||D[o]))}function E(k){const D={};return k.forEach(T=>{f(T.init)===v&&(D[b(T.init)]=!0)}),Object.keys(D).length<=1}return{VariableDeclaration(k){S(k.declarations)?c.report({node:k,messageId:"noMixRequire"}):u&&!E(k.declarations)&&c.report({node:k,messageId:"noMixCoreModuleFileComputed"})}}}}),ug}var cg,tA;function Wj(){return tA||(tA=1,cg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(c){const s=c.sourceCode;let u;switch(c.options[0]){case!0:case"smart-tabs":u=!0;break;default:u=!1}return{"Program:exit"(p){const a=s.lines,d=s.getAllComments(),v=new Set;d.forEach(o=>{for(let y=o.loc.start.line+1;y<=o.loc.end.line;y++)v.add(y)});let m=/^(?=( +|\t+))\1(?:\t| )/u;u&&(m=/^(?=(\t*))\1(?=( +))\2\t/u),a.forEach((o,y)=>{const O=m.exec(o);if(O){const x=y+1,g={start:{line:x,column:O[0].length-2},end:{line:x,column:O[0].length}};if(!v.has(x)){const f=s.getNodeByRangeIndex(s.getIndexFromLoc(g.start));f&&["Literal","TemplateElement"].includes(f.type)||c.report({node:p,loc:g,messageId:"mixedSpacesAndTabs"})}}})}}}}),cg}var fg,rA;function Gj(){return rA||(rA=1,fg={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(c){const s=c.options[0]||{ignoreNonDeclaration:!1},u=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return s.ignoreNonDeclaration||u.push("AssignmentExpression > AssignmentExpression.right"),{[u](p){c.report({node:p,messageId:"unexpectedChain"})}}}}),fg}var pg,nA;function zj(){if(nA)return pg;nA=1;const c=Ze();return pg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.ignoreEOLComments,d=Object.assign({Property:!0},p.exceptions),v=Object.keys(d).some(o=>d[o]);function m(o){const y=o.value.split(` +`),O=y[0],x=`${O.slice(0,12)}...`;return y.length===1&&O.length<=12?O:x}return{Program(){u.tokensAndComments.forEach((o,y,O)=>{if(y===O.length-1)return;const x=O[y+1];if(!u.text.slice(o.range[1],x.range[0]).includes(" ")||o.loc.end.linef.replaceTextRange([o.range[1],x.range[0]]," ")})})}}}},pg}var hg,sA;function Zj(){if(sA)return hg;sA=1;const c=Ze();return hg={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(s){function u(p){return p.type.indexOf("JSX")===0}return{Literal(p){c.LINEBREAK_MATCHER.test(p.raw)&&!u(p.parent)&&s.report({node:p,messageId:"multilineString"})}}}},hg}var dg,iA;function Xj(){return iA||(iA=1,dg={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(c){let s=2,u=s,p=s;c.options.length&&(s=c.options[0].max,u=typeof c.options[0].maxEOF<"u"?c.options[0].maxEOF:s,p=typeof c.options[0].maxBOF<"u"?c.options[0].maxBOF:s);const a=c.sourceCode,d=a.lines.at(-1)===""?a.lines.slice(0,-1):a.lines,v=new Set;return{TemplateLiteral(m){m.quasis.forEach(o=>{for(let y=o.loc.start.line;y((y.trim()||v.has(O+1))&&o.push(O+1),o),[]).concat(d.length+1).reduce((o,y)=>{let O,x;return o===0?(O="blankBeginningOfFile",x=p):y===d.length+1?(O="blankEndOfFile",x=u):(O="consecutiveBlank",x=s),y-o-1>x&&c.report({node:m,loc:{start:{line:o+x+1,column:0},end:{line:y,column:0}},messageId:O,data:{max:x,pluralizedLines:x===1?"line":"lines"},fix(g){const f=a.getIndexFromLoc({line:o+1,column:0}),b=y-x,S=b<=d.length?a.getIndexFromLoc({line:b,column:0}):a.text.length;return g.removeRange([f,S])}}),y},0)}}}}),dg}var mg,aA;function Yj(){return aA||(aA=1,mg={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(c){const s=c.options[0],u=s&&s.exceptions||[],p=c.sourceCode;function a(v,m,o){const y=v.identifier;v.init===!1&&v.isWrite()&&(m===0||o[m-1].identifier!==y)&&c.report({node:y,messageId:"nativeReassign",data:y})}function d(v){v.writeable===!1&&!u.includes(v.name)&&v.references.forEach(a)}return{Program(v){p.getScope(v).variables.forEach(d)}}}}),mg}var gg,oA;function Hj(){return oA||(oA=1,gg={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(c){function s(d){return d.alternate&&d.alternate.type!=="IfStatement"}function u(d){return d.type==="UnaryExpression"&&d.operator==="!"}function p(d){return d.type==="BinaryExpression"&&(d.operator==="!="||d.operator==="!==")}function a(d){return u(d.test)||p(d.test)}return{IfStatement(d){s(d)&&a(d)&&c.report({node:d,messageId:"unexpectedNegated"})},ConditionalExpression(d){a(d)&&c.report({node:d,messageId:"unexpectedNegated"})}}}}),gg}var yg,lA;function Kj(){return lA||(lA=1,yg={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(c){return{BinaryExpression(s){s.operator==="in"&&s.left.type==="UnaryExpression"&&s.left.operator==="!"&&c.report({node:s,messageId:"negatedLHS"})}}}}),yg}var bg,uA;function Jj(){return uA||(uA=1,bg={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(c){return{ConditionalExpression(s){(s.alternate.type==="ConditionalExpression"||s.consequent.type==="ConditionalExpression")&&c.report({node:s,messageId:"noNestedTernary"})}}}}),bg}var vg,cA;function eq(){return cA||(cA=1,vg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(c){return{"ExpressionStatement > NewExpression"(s){c.report({node:s.parent,messageId:"noNewStatement"})}}}}),vg}var xg,fA;function tq(){if(fA)return xg;fA=1;const c=Ze(),s=new Set(["apply","bind","call"]);return xg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(u){const p=u.sourceCode;return{"Program:exit"(a){const v=p.getScope(a).set.get("Function");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,{parent:y}=o;let O;if(y){if(o===y.callee&&(y.type==="NewExpression"||y.type==="CallExpression"))O=y;else if(y.type==="MemberExpression"&&o===y.object&&s.has(c.getStaticPropertyName(y))){const x=y.parent.type==="ChainExpression"?y.parent:y;x.parent.type==="CallExpression"&&x.parent.callee===x&&(O=x.parent)}}O&&u.report({node:O,messageId:"noFunctionConstructor"})})}}}},xg}var Og,pA;function rq(){if(pA)return Og;pA=1;const c=["Symbol","BigInt"];return Og={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(s){const u=s.sourceCode;return{"Program:exit"(p){const a=u.getScope(p);for(const d of c){const v=a.set.get(d);v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier,y=o.parent;y&&y.type==="NewExpression"&&y.callee===o&&s.report({node:o,messageId:"noNewNonconstructor",data:{name:d}})})}}}}},Og}var Sg,hA;function nq(){if(hA)return Sg;hA=1;const c=Ze();return Sg={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(s){const u=s.sourceCode;return{NewExpression(p){const a=c.getVariableByName(u.getScope(p),p.callee.name);a&&a.identifiers.length>0||p.callee.name==="Object"&&s.report({node:p,messageId:"preferLiteral"})}}}},Sg}var Eg,dA;function sq(){return dA||(dA=1,Eg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(c){return{NewExpression(s){s.callee.type==="Identifier"&&s.callee.name==="require"&&c.report({node:s,messageId:"noNewRequire"})}}}}),Eg}var Cg,mA;function iq(){return mA||(mA=1,Cg={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},deprecated:!0,replacedBy:["no-new-native-nonconstructor"],schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(c){const s=c.sourceCode;return{"Program:exit"(u){const a=s.getScope(u).set.get("Symbol");a&&a.defs.length===0&&a.references.forEach(d=>{const v=d.identifier,m=v.parent;m&&m.type==="NewExpression"&&m.callee===v&&c.report({node:v,messageId:"noNewSymbol"})})}}}}),Cg}var wg,gA;function aq(){if(gA)return wg;gA=1;const{getVariableByName:c}=Ze();return wg={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(s){const{sourceCode:u}=s;return{NewExpression(p){const a=["String","Number","Boolean"],{name:d}=p.callee;if(a.includes(d)){const v=c(u.getScope(p),d);v&&v.identifiers.length===0&&s.report({node:p,messageId:"noConstructor",data:{fn:d}})}}}}},wg}var kg,yA;function oq(){if(yA)return kg;yA=1;const c=/\\[89]/u;function s(u){return`\\u${u.charCodeAt(0).toString(16).padStart(4,"0")}`}return kg={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(u){const p=u.sourceCode;function a(d,v,m){return{messageId:d,data:{original:p.getText().slice(...v),replacement:m},fix(o){return o.replaceTextRange(v,m)}}}return{Literal(d){if(typeof d.value!="string"||!c.test(d.raw))return;const v=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let m;for(;m=v.exec(d.raw);){const{previousEscape:o,decimalEscape:y}=m.groups,O=d.range[0]+m.index+m[0].length,x=O-y.length,g=[x,O],f=[];o==="\\0"?f.push(a("refactor",[x-o.length,O],`${s("\0")}${y[1]}`),a("refactor",g,s(y[1]))):f.push(a("refactor",g,y[1])),f.push(a("escapeBackslash",g,`\\${y}`)),u.report({node:d,loc:{start:p.getLocFromIndex(x),end:p.getLocFromIndex(O)},messageId:"decimalEscape",data:{decimalEscape:y},suggest:f})}}}}},kg}var Ag,bA;function lq(){if(bA)return Ag;bA=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u}=Kr(),p=Ze().getStaticPropertyName,a=["Atomics","JSON","Math","Reflect","Intl"];function d(v){return v.type==="ChainExpression"?d(v.expression):v.type==="MemberExpression"?p(v):v.name}return Ag={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(v){const m=v.sourceCode;return{Program(o){const y=m.getScope(o),O=new u(y),x={};for(const g of a)x[g]={[c]:!0,[s]:!0};for(const{node:g,path:f}of O.iterateGlobalReferences(x)){const b=d(g.callee),S=f[0],E=b===S?"unexpectedCall":"unexpectedRefCall";v.report({node:g,messageId:E,data:{name:b,ref:S}})}}}}},Ag}var Pg,vA;function uq(){if(vA)return Pg;vA=1;const{getVariableByName:c,isArrowToken:s,isStartOfExpressionStatement:u,needsPrecedingSemicolon:p}=Ze();return Pg={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(a){const d=a.sourceCode;function v(o){if(u(o))return!0;const y=d.getTokenBefore(o);return!!(y&&s(y))}function m(o){if(o.callee.type!=="Identifier"||o.callee.name!=="Object"||o.arguments.length)return;const y=c(d.getScope(o),"Object");if(y&&y.identifiers.length===0){let O,x,g="useLiteral";v(o)?(O="({})",p(d,o)?(x=";({})",g="useLiteralAfterSemicolon"):x="({})"):O=x="{}",a.report({node:o,messageId:"preferLiteral",suggest:[{messageId:g,data:{replacement:O},fix:f=>f.replaceText(o,x)}]})}}return{CallExpression:m,NewExpression:m}}},Pg}var Tg,xA;function cq(){return xA||(xA=1,Tg={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(c){return{Literal(s){typeof s.value=="number"&&/^0[0-9]/u.test(s.raw)&&c.report({node:s,messageId:"noOctal"})}}}}),Tg}var Dg,OA;function fq(){return OA||(OA=1,Dg={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(c){return{Literal(s){if(typeof s.value!="string")return;const u=s.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);u&&c.report({node:s,messageId:"octalEscapeSequence",data:{sequence:u[1]}})}}}}),Dg}var Ig,SA;function pq(){if(SA)return Ig;SA=1;const c=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return Ig={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(s){const u=s.options[0]&&s.options[0].props,p=s.options[0]&&s.options[0].ignorePropertyModificationsFor||[],a=s.options[0]&&s.options[0].ignorePropertyModificationsForRegex||[],d=s.sourceCode;function v(x){let g=x.identifier,f=g.parent;for(;f&&(!c.test(f.type)||f.type==="ForInStatement"||f.type==="ForOfStatement");){switch(f.type){case"AssignmentExpression":return f.left===g;case"UpdateExpression":return!0;case"UnaryExpression":if(f.operator==="delete")return!0;break;case"ForInStatement":case"ForOfStatement":return f.left===g;case"CallExpression":if(f.callee!==g)return!1;break;case"MemberExpression":if(f.property===g)return!1;break;case"Property":if(f.key===g)return!1;break;case"ConditionalExpression":if(f.test===g)return!1;break}g=f,f=g.parent}return!1}function m(x){return p.includes(x)||a.some(g=>new RegExp(g,"u").test(x))}function o(x,g,f){const b=x.identifier;b&&!x.init&&(g===0||f[g-1].identifier!==b)&&(x.isWrite()?s.report({node:b,messageId:"assignmentToFunctionParam",data:{name:b.name}}):u&&v(x)&&!m(b.name)&&s.report({node:b,messageId:"assignmentToFunctionParamProp",data:{name:b.name}}))}function y(x){x.defs[0].type==="Parameter"&&x.references.forEach(o)}function O(x){d.getDeclaredVariables(x).forEach(y)}return{"FunctionDeclaration:exit":O,"FunctionExpression:exit":O,"ArrowFunctionExpression:exit":O}}},Ig}var Rg,EA;function hq(){return EA||(EA=1,Rg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(c){const s=/^__(?:dir|file)name$/u;return{BinaryExpression(u){const p=u.left,a=u.right;u.operator==="+"&&(p.type==="Identifier"&&s.test(p.name)||a.type==="Identifier"&&s.test(a.name))&&c.report({node:u,messageId:"usePathFunctions"})}}}}),Rg}var Fg,CA;function dq(){if(CA)return Fg;CA=1;function c(u){const p=u.parent;return p.type==="ForStatement"&&p.update===u}function s(u){const p=u.parent;return p.type==="SequenceExpression"?s(p):c(u)}return Fg={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(u){const p=u.options[0];let a=!1;return typeof p=="object"&&(a=p.allowForLoopAfterthoughts===!0),{UpdateExpression(d){a&&s(d)||u.report({node:d,messageId:"unexpectedUnaryOp",data:{operator:d.operator}})}}}},Fg}var _g,wA;function mq(){return wA||(wA=1,_g={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of ({})."}},create(c){return{MemberExpression(s){const u=s.object.name,p=s.property.name;u==="process"&&!s.computed&&p&&p==="env"&&c.report({node:s,messageId:"unexpectedProcessEnv"})}}}}),_g}var Bg,kA;function gq(){return kA||(kA=1,Bg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(c){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(s){c.report({node:s.parent,messageId:"noProcessExit"})}}}}),Bg}var Lg,AA;function yq(){if(AA)return Lg;AA=1;const{findVariable:c}=Kr(),s=Ze(),u=new Set(["ArrowFunctionExpression","FunctionExpression"]);function p(y,O){const x=c(O,y);return x!==null&&x.scope.type==="global"&&x.defs.length===0}function a(y){const O=y.upper;return O.type==="function-expression-name"?O.upper:O}function d(y,O){const x=y.parent;return x.type==="NewExpression"&&x.arguments[0]===y&&x.callee.type==="Identifier"&&x.callee.name==="Promise"&&p(x.callee,a(O))}function v(y){return y.type==="UnaryExpression"&&y.operator==="void"}function m(y,O,x){const g=s.getPrecedence(O)E.type==="Keyword"&&E.value==="return"),b=y.getTokenAfter(f),S=f.value==="return"&&f.range[1]===b.range[0];return[x.insertTextBefore(b,`${S?" ":""}void ${g?"(":""}`),x.insertTextAfter(O,g?")":"")]}function o(y,O,x){const g=y.getTokenBefore(O.body,s.isArrowToken),f=y.getTokenAfter(g),b=y.getLastToken(O);return[x.insertTextBefore(f,"{"),x.insertTextAfter(b,"}")]}return Lg={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(y){let O=null;const x=y.sourceCode,{allowVoid:g=!1}=y.options[0]||{};return{onCodePathStart(f,b){if(O={upper:O,shouldCheck:u.has(b.type)&&d(b,x.getScope(b))},O.shouldCheck&&b.type==="ArrowFunctionExpression"&&b.expression&&!(g&&v(b.body))){const S=[];g&&S.push({messageId:"prependVoid",fix(E){return m(x,b.body,E)}}),b.body.type==="FunctionExpression"&&!b.body.id||S.push({messageId:"wrapBraces",fix(E){return o(x,b,E)}}),y.report({node:b.body,messageId:"returnsValue",suggest:S})}},onCodePathEnd(){O=O.upper},ReturnStatement(f){if(O.shouldCheck&&f.argument){if(!g){y.report({node:f,messageId:"returnsValue"});return}v(f.argument)||y.report({node:f,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(b){return m(x,f.argument,b)}}]})}}}}},Lg}var Ng,PA;function bq(){if(PA)return Ng;PA=1;const{getStaticPropertyName:c}=Ze();return Ng={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(s){return{MemberExpression(u){c(u)==="__proto__"&&s.report({node:u,messageId:"unexpectedProto"})}}}},Ng}var Mg,TA;function vq(){if(TA)return Mg;TA=1;const c=Ze();function s(u){let p;if(u.type==="MemberExpression")p=u.object;else if(u.type==="CallExpression")p=u.callee;else return!1;return u.optional?!0:s(p)}return Mg={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(u){const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function a(d){const v=c.skipChainExpression(d.callee);if(v.type!=="MemberExpression")return;const m=c.getStaticPropertyName(v);m!==null&&p.has(m)&&u.report({messageId:"prototypeBuildIn",loc:v.property.loc,data:{prop:m},node:d,suggest:[{messageId:"callObjectPrototype",data:{prop:m},fix(o){const y=u.sourceCode;if(s(d)||d.callee.type==="ChainExpression")return null;const O=c.getVariableByName(y.getScope(d),"Object");if(!O||O.scope.type!=="global"||O.defs.length>0)return null;let x=y.getText(v.object);c.getPrecedence(v.object)<=c.getPrecedence({type:"SequenceExpression"})&&(x=`(${x})`);const g=y.getTokenAfter(d.callee,c.isOpeningParenToken),b=d.arguments.length===0?"":", ";return[o.replaceText(v,`Object.prototype.${m}.call`),o.insertTextAfter(g,x+b)]}}]})}return{CallExpression:a}}},Mg}var $g,DA;function xq(){if(DA)return $g;DA=1;const c=Ze();return $g={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(s){const u={builtinGlobals:!!(s.options.length===0||s.options[0].builtinGlobals)},p=s.sourceCode;function*a(m){u.builtinGlobals&&(m.eslintImplicitGlobalSetting==="readonly"||m.eslintImplicitGlobalSetting==="writable")&&(yield{type:"builtin"});for(const o of m.identifiers)yield{type:"syntax",node:o,loc:o.loc};if(m.eslintExplicitGlobalComments)for(const o of m.eslintExplicitGlobalComments)yield{type:"comment",node:o,loc:c.getNameLocationInGlobalDirectiveComment(p,o,m.name)}}function d(m){for(const o of m.variables){const[y,...O]=a(o);if(O.length===0)continue;const x=y.type==="builtin"?"redeclaredAsBuiltin":"redeclaredBySyntax",g={id:o.name};for(const{type:f,node:b,loc:S}of O){const E=f===y.type?"redeclared":x;s.report({node:b,loc:S,messageId:E,data:g})}}}function v(m){const o=p.getScope(m);o.block===m&&d(o)}return{Program(m){const o=p.getScope(m);d(o),o.type==="global"&&o.childScopes[0]&&o.block===o.childScopes[0].block&&d(o.childScopes[0])},FunctionDeclaration:v,FunctionExpression:v,ArrowFunctionExpression:v,StaticBlock:v,BlockStatement:v,ForStatement:v,ForInStatement:v,ForOfStatement:v,SwitchStatement:v}}},$g}var jg,IA;function Oq(){if(IA)return jg;IA=1;const c=Ze(),s=Cs(),u=new s.RegExpParser,p=/ {2}/u;function a(d){return d&&d.type==="Literal"&&typeof d.value=="string"}return jg={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(d){const v=d.sourceCode;function m(O,x,g,f,b){if(!p.test(g))return;const S=[];let E;try{E=u.parsePattern(x,0,x.length,{unicode:b.includes("u"),unicodeSets:b.includes("v")})}catch{return}s.visitRegExpAST(E,{onCharacterClassEnter(T){S.push(T)}});const k=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let D;for(;D=k.exec(x);){const{1:{length:T},index:R}=D;if(S.every(({start:F,end:P})=>R0,b=O.arguments[0];if(O.callee.type==="Identifier"&&O.callee.name==="RegExp"&&a(b)&&!f){const S=b.value,E=b.raw.slice(1,-1),k=b.range[0]+1;let D;if(O.arguments.length<2)D="";else{const T=O.arguments[1];if(a(T))D=T.value;else return}m(O,S,E,k,D)}}return{Literal:o,CallExpression:y,NewExpression:y}}},jg}var qg,RA;function Sq(){if(RA)return qg;RA=1;const c=Ze();return qg={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictedNamedExportsPattern:{type:"string"},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(s){const u=new Set(s.options[0]&&s.options[0].restrictedNamedExports),p=s.options[0]&&s.options[0].restrictedNamedExportsPattern,a=s.options[0]&&s.options[0].restrictDefaultExports,d=s.sourceCode;function v(m){const o=c.getModuleExportName(m);let y=!1;if(p&&o!=="default"&&(y=new RegExp(p,"u").test(o)),y||u.has(o)){s.report({node:m,messageId:"restrictedNamed",data:{name:o}});return}if(o==="default")if(m.parent.type==="ExportAllDeclaration")a&&a.namespaceFrom&&s.report({node:m,messageId:"restrictedDefault"});else{const O=!!m.parent.parent.source,x=c.getModuleExportName(m.parent.local);if(!O&&a&&a.named){s.report({node:m,messageId:"restrictedDefault"});return}O&&a&&(x==="default"&&a.defaultFrom||x!=="default"&&a.namedFrom)&&s.report({node:m,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(m){m.exported&&v(m.exported)},ExportDefaultDeclaration(m){a&&a.direct&&s.report({node:m,messageId:"restrictedDefault"})},ExportNamedDeclaration(m){const o=m.declaration;o?o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"?v(o.id):o.type==="VariableDeclaration"&&d.getDeclaredVariables(o).map(y=>y.defs.find(O=>O.parent===o)).map(y=>y.name).forEach(v):m.specifiers.map(y=>y.exported).forEach(v)}}}},qg}var Qg,FA;function Eq(){return FA||(FA=1,Qg={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(c){const s=c.sourceCode;if(c.options.length===0)return{};const u=c.options.reduce((d,v)=>(typeof v=="string"?d[v]=null:d[v.name]=v.message,d),{});function p(d){const v=d.identifier.name,m=u[v],o=m?"customMessage":"defaultMessage";c.report({node:d.identifier,messageId:o,data:{name:v,customMessage:m}})}function a(d){return Object.hasOwn(u,d)}return{Program(d){const v=s.getScope(d);v.variables.forEach(m=>{!m.defs.length&&a(m.name)&&m.references.forEach(p)}),v.through.forEach(m=>{a(m.identifier.name)&&p(m)})}}}}),Qg}var Ug,_A;function BA(){if(_A)return Ug;_A=1;function c(K){return Array.isArray(K)?K:[K]}const s="",u=" ",p="\\",a=/^\s+$/,d=/(?:[^\\]|^)\\$/,v=/^\\!/,m=/^\\#/,o=/\r?\n/g,y=/^\.*\/|^\.+$/,O="/";let x="node-ignore";typeof Symbol<"u"&&(x=Symbol.for("node-ignore"));const g=x,f=(K,te,V)=>Object.defineProperty(K,te,{value:V}),b=/([0-z])-([0-z])/g,S=()=>!1,E=K=>K.replace(b,(te,V,ae)=>V.charCodeAt(0)<=ae.charCodeAt(0)?te:s),k=K=>{const{length:te}=K;return K.slice(0,te-te%2)},D=[[/^\uFEFF/,()=>s],[/\\?\s+$/,K=>K.indexOf("\\")===0?u:s],[/\\\s/g,()=>u],[/[\\$.|*+(){^]/g,K=>`\\${K}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(K,te,V)=>te+6{const ae=V.replace(/\\\*/g,"[^\\/]*");return te+ae}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p],[/\\\\/g,()=>p],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(K,te,V,ae,z)=>te===p?`\\[${V}${k(ae)}${z}`:z==="]"&&ae.length%2===0?`[${E(V)}${ae}]`:"[]"],[/(?:[^*])$/,K=>/\/$/.test(K)?`${K}$`:`${K}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(K,te)=>`${te?`${te}[^/]+`:"[^/]*"}(?=$|\\/$)`]],T=Object.create(null),R=(K,te)=>{let V=T[K];return V||(V=D.reduce((ae,z)=>ae.replace(z[0],z[1].bind(K)),K),T[K]=V),te?new RegExp(V,"i"):new RegExp(V)},F=K=>typeof K=="string",P=K=>K&&F(K)&&!a.test(K)&&!d.test(K)&&K.indexOf("#")!==0,N=K=>K.split(o);class I{constructor(te,V,ae,z){this.origin=te,this.pattern=V,this.negative=ae,this.regex=z}}const L=(K,te)=>{const V=K;let ae=!1;K.indexOf("!")===0&&(ae=!0,K=K.substr(1)),K=K.replace(v,"!").replace(m,"#");const z=R(K,te);return new I(V,K,ae,z)},j=(K,te)=>{throw new te(K)},G=(K,te,V)=>F(K)?K?G.isNotRelative(K)?V(`path should be a \`path.relative()\`d string, but got "${te}"`,RangeError):!0:V("path must not be empty",TypeError):V(`path must be a string, but got \`${te}\``,TypeError),U=K=>y.test(K);G.isNotRelative=U,G.convert=K=>K;class Q{constructor({ignorecase:te=!0,ignoreCase:V=te,allowRelativePaths:ae=!1}={}){f(this,g,!0),this._rules=[],this._ignoreCase=V,this._allowRelativePaths=ae,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(te){if(te&&te[g]){this._rules=this._rules.concat(te._rules),this._added=!0;return}if(P(te)){const V=L(te,this._ignoreCase);this._added=!0,this._rules.push(V)}}add(te){return this._added=!1,c(F(te)?N(te):te).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(te){return this.add(te)}_testOne(te,V){let ae=!1,z=!1;return this._rules.forEach(ue=>{const{negative:ne}=ue;if(z===ne&&ae!==z||ne&&!ae&&!z&&!V)return;ue.regex.test(te)&&(ae=!ne,z=ne)}),{ignored:ae,unignored:z}}_test(te,V,ae,z){const ue=te&&G.convert(te);return G(ue,te,this._allowRelativePaths?S:j),this._t(ue,V,ae,z)}_t(te,V,ae,z){if(te in V)return V[te];if(z||(z=te.split(O)),z.pop(),!z.length)return V[te]=this._testOne(te,ae);const ue=this._t(z.join(O)+O,V,ae,z);return V[te]=ue.ignored?ue:this._testOne(te,ae)}ignores(te){return this._test(te,this._ignoreCache,!1).ignored}createFilter(){return te=>!this.ignores(te)}filter(te){return c(te).filter(this.createFilter())}test(te){return this._test(te,this._testCache,!0)}}const $=K=>new Q(K),W=K=>G(K&&G.convert(K),K,S);if($.isPathValid=W,$.default=$,Ug=$,typeof xr<"u"&&(xr.env&&xr.env.IGNORE_TEST_WIN32||xr.platform==="win32")){const K=V=>/^\\\\\?\\/.test(V)||/["<>|\u0000-\u001F]+/u.test(V)?V:V.replace(/\\/g,"/");G.convert=K;const te=/^[a-z]:\//i;G.isNotRelative=V=>te.test(V)||U(V)}return Ug}var Vg,LA;function Cq(){if(LA)return Vg;LA=1;const c=Ze(),s=BA(),u={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}},allowImportNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"],not:{required:["importNames","allowImportNames"]}}]},uniqueItems:!0};return Vg={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",allowedImportName:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.",allowedImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}",everythingWithAllowImportNames:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.",everythingWithAllowImportNamesAndCustomMessage:"* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}",allowedImportNamePattern:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.",allowedImportNamePatternWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}",everythingWithAllowedImportNamePattern:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.",everythingWithAllowedImportNamePatternWithCustomMessage:"* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}"},schema:{anyOf:[u,{type:"array",items:[{type:"object",properties:{paths:u,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},allowImportNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},regex:{type:"string"},importNamePattern:{type:"string"},allowImportNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,not:{anyOf:[{required:["importNames","allowImportNames"]},{required:["importNamePattern","allowImportNamePattern"]},{required:["importNames","allowImportNamePattern"]},{required:["importNamePattern","allowImportNames"]},{required:["allowImportNames","allowImportNamePattern"]}]},oneOf:[{required:["group"]},{required:["regex"]}]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(a){const d=a.sourceCode,v=Array.isArray(a.options)?a.options:[],m=typeof v[0]=="object"&&(Object.hasOwn(v[0],"paths")||Object.hasOwn(v[0],"patterns")),o=(m?v[0].paths:a.options)||[],y=o.reduce((E,k)=>{const D=typeof k=="string"?k:k.name;return E[D]||(E[D]=[]),typeof k=="string"?E[D].push({}):E[D].push({message:k.message,importNames:k.importNames,allowImportNames:k.allowImportNames}),E},Object.create(null));let O=(m?v[0].patterns:[])||[];O.length>0&&typeof O[0]=="string"&&(O=[{group:O}]);const x=O.map(({group:E,regex:k,message:D,caseSensitive:T,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N})=>({...E?{matcher:s({allowRelativePaths:!0,ignorecase:!T}).add(E)}:{},...typeof k=="string"?{regexMatcher:new RegExp(k,T?"u":"iu")}:{},customMessage:D,importNames:R,importNamePattern:F,allowImportNames:P,allowImportNamePattern:N}));if(Object.keys(o).length===0&&x.length===0)return{};function g(E,k,D){Object.hasOwn(y,E)&&y[E].forEach(T=>{const R=T.message,F=T.importNames,P=T.allowImportNames;if(!F&&!P){a.report({node:D,messageId:R?"pathWithCustomMessage":"path",data:{importSource:E,customMessage:R}});return}k.forEach((N,I)=>{if(I==="*"){const[L]=N;F?a.report({node:D,messageId:R?"everythingWithCustomMessage":"everything",loc:L.loc,data:{importSource:E,importNames:F,customMessage:R}}):P&&a.report({node:D,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:L.loc,data:{importSource:E,allowedImportNames:P,customMessage:R}});return}F&&F.includes(I)&&N.forEach(L=>{a.report({node:D,messageId:R?"importNameWithCustomMessage":"importName",loc:L.loc,data:{importSource:E,customMessage:R,importName:I}})}),P&&!P.includes(I)&&N.forEach(L=>{a.report({node:D,loc:L.loc,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",data:{importSource:E,customMessage:R,importName:I,allowedImportNames:P}})})})})}function f(E,k,D){const T=E.source.value.trim(),R=k.customMessage,F=k.importNames,P=k.importNamePattern?new RegExp(k.importNamePattern,"u"):null,N=k.allowImportNames,I=k.allowImportNamePattern?new RegExp(k.allowImportNamePattern,"u"):null;if(!F&&!N&&!P&&!I){a.report({node:E,messageId:R?"patternWithCustomMessage":"patterns",data:{importSource:T,customMessage:R}});return}D.forEach((L,j)=>{if(j==="*"){const[G]=L;F?a.report({node:E,messageId:R?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:G.loc,data:{importSource:T,importNames:F,customMessage:R}}):N?a.report({node:E,messageId:R?"everythingWithAllowImportNamesAndCustomMessage":"everythingWithAllowImportNames",loc:G.loc,data:{importSource:T,allowedImportNames:N,customMessage:R}}):I?a.report({node:E,messageId:R?"everythingWithAllowedImportNamePatternWithCustomMessage":"everythingWithAllowedImportNamePattern",loc:G.loc,data:{importSource:T,allowedImportNamePattern:I,customMessage:R}}):a.report({node:E,messageId:R?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:G.loc,data:{importSource:T,importNames:P,customMessage:R}});return}(F&&F.includes(j)||P&&P.test(j))&&L.forEach(G=>{a.report({node:E,messageId:R?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j}})}),N&&!N.includes(j)?L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNameWithCustomMessage":"allowedImportName",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNames:N}})}):I&&!I.test(j)&&L.forEach(G=>{a.report({node:E,messageId:R?"allowedImportNamePatternWithCustomMessage":"allowedImportNamePattern",loc:G.loc,data:{importSource:T,customMessage:R,importName:j,allowedImportNamePattern:I}})})})}function b(E,k){return k.regexMatcher?k.regexMatcher.test(E):k.matcher.ignores(E)}function S(E){const k=E.source.value.trim(),D=new Map;if(E.type==="ExportAllDeclaration"){const T=d.getFirstToken(E,1);D.set("*",[{loc:T.loc}])}else if(E.specifiers)for(const T of E.specifiers){let R;const F={loc:T.loc};T.type==="ImportDefaultSpecifier"?R="default":T.type==="ImportNamespaceSpecifier"?R="*":T.imported?R=c.getModuleExportName(T.imported):T.local&&(R=c.getModuleExportName(T.local)),typeof R=="string"&&(D.has(R)?D.get(R).push(F):D.set(R,[F]))}g(k,D,E),x.forEach(T=>{b(k,T)&&f(E,T,D)})}return{ImportDeclaration:S,ExportNamedDeclaration(E){E.source&&S(E)},ExportAllDeclaration:S}}},Vg}var Wg,NA;function wq(){if(NA)return Wg;NA=1;const c=Ze(),s=BA(),u={type:"array",items:{type:"string"},uniqueItems:!0},p={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return Wg={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[p,{type:"array",items:{type:"object",properties:{paths:p,patterns:u},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(a){const d=Array.isArray(a.options)?a.options:[],v=typeof d[0]=="object"&&(Object.hasOwn(d[0],"paths")||Object.hasOwn(d[0],"patterns")),m=(v?d[0].paths:a.options)||[],o=(v?d[0].patterns:[])||[],y=m.reduce((E,k)=>(typeof k=="string"?E[k]=null:E[k.name]=k.message,E),{});if(Object.keys(m).length===0&&o.length===0)return{};const O=s({allowRelativePaths:!0}).add(o);function x(E){return E&&E.type==="Literal"&&typeof E.value=="string"}function g(E){return E.callee.type==="Identifier"&&E.callee.name==="require"}function f(E){return x(E)?E.value.trim():c.isStaticTemplateLiteral(E)?E.quasis[0].value.cooked.trim():null}function b(E,k){const D=y[k],T=D?"customMessage":"defaultMessage";a.report({node:E,messageId:T,data:{name:k,customMessage:D}})}function S(E){return Object.hasOwn(y,E)}return{CallExpression(E){if(g(E)&&E.arguments.length){const k=f(E.arguments[0]);k&&(S(k)&&b(E,k),o.length>0&&O.ignores(k)&&a.report({node:E,messageId:"patternMessage",data:{name:k}}))}}}}},Wg}var Gg,MA;function kq(){if(MA)return Gg;MA=1;const c=Ze();return Gg={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(s){const u=s.options;if(u.length===0)return{};const p=new Map,a=new Map,d=new Map;u.forEach(m=>{const o=m.object,y=m.property;typeof o>"u"?d.set(y,{message:m.message}):typeof y>"u"?a.set(o,{message:m.message}):(p.has(o)||p.set(o,new Map),p.get(o).set(y,{message:m.message}))});function v(m,o,y){if(y===null)return;const O=p.get(o),x=O?O.get(y):a.get(o),g=d.get(y);if(x){const f=x.message?` ${x.message}`:"";s.report({node:m,messageId:"restrictedObjectProperty",data:{objectName:o,propertyName:y,message:f}})}else if(g){const f=g.message?` ${g.message}`:"";s.report({node:m,messageId:"restrictedProperty",data:{propertyName:y,message:f}})}}return{MemberExpression(m){v(m,m.object&&m.object.name,c.getStaticPropertyName(m))},ObjectPattern(m){let o=null;m.parent.type==="VariableDeclarator"?m.parent.init&&m.parent.init.type==="Identifier"&&(o=m.parent.init.name):(m.parent.type==="AssignmentExpression"||m.parent.type==="AssignmentPattern")&&m.parent.right.type==="Identifier"&&(o=m.parent.right.name),m.properties.forEach(y=>{v(m,o,c.getStaticPropertyName(y))})}}}},Gg}var zg,$A;function Aq(){return $A||($A=1,zg={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(c){return c.options.reduce((s,u)=>{const p=typeof u=="string",a=!p&&!!u.message,d=p?u:u.selector,v=a?u.message:`Using '${d}' is not allowed.`;return Object.assign(s,{[d](m){c.report({node:m,messageId:"restrictedSyntax",data:{message:v}})}})},{})}}),zg}var Zg,jA;function Pq(){if(jA)return Zg;jA=1;const c=Ze(),s=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return Zg={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(u){const p=(u.options[0]||"except-parens")!=="except-parens",a=u.sourceCode;return{AssignmentExpression(d){if(!p&&c.isParenthesised(a,d))return;let v=d,m=v.parent;for(;m&&!s.test(m.type);)v=m,m=m.parent;m&&m.type==="ReturnStatement"?u.report({node:m,messageId:"returnAssignment"}):m&&m.type==="ArrowFunctionExpression"&&m.body===v&&u.report({node:m,messageId:"arrowAssignment"})}}}},Zg}var Xg,qA;function Tq(){if(qA)return Xg;qA=1;const c=Ze();return Xg={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(s){function u(d){s.report({node:s.sourceCode.getFirstToken(d),loc:d.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(v){const m=s.sourceCode,[o,y]=m.getFirstTokens(d,2);if(!(o.loc.start.line===y.loc.start.line))return null;const[x,g]=o.range,b=m.text[g]===" "?1:0,S=[x,g+b];return v.removeRange(S)}}]})}function p(d){let v=d;for(;!c.isFunction(v)&&v.type!=="Program";){if(v.parent.type==="TryStatement"&&(v===v.parent.block||v===v.parent.handler&&v.parent.finalizer))return!0;v=v.parent}return!1}function a(d){return d.parent.type==="ArrowFunctionExpression"?!0:d.parent.type==="ReturnStatement"?!p(d.parent):d.parent.type==="ConditionalExpression"&&(d===d.parent.consequent||d===d.parent.alternate)||d.parent.type==="LogicalExpression"&&d===d.parent.right||d.parent.type==="SequenceExpression"&&d===d.parent.expressions.at(-1)?a(d.parent):!1}return{AwaitExpression(d){a(d)&&!p(d)&&u(d)}}}},Xg}var Yg,QA;function Dq(){if(QA)return Yg;QA=1;const c=Ze();return Yg={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(s){function u(p){const a=c.getStaticStringValue(p);typeof a=="string"&&a.toLowerCase().indexOf("javascript:")===0&&s.report({node:p,messageId:"unexpectedScriptURL"})}return{Literal(p){p.value&&typeof p.value=="string"&&u(p)},TemplateLiteral(p){p.parent&&p.parent.type==="TaggedTemplateExpression"||u(p)}}}},Yg}var Hg,UA;function Iq(){if(UA)return Hg;UA=1;const c=Ze(),s=/\s+/gu;function u(p,a,d,v){if(!(!p||!a))if(p.type==="Identifier"&&a.type==="Identifier"&&p.name===a.name)v(a);else if(p.type==="ArrayPattern"&&a.type==="ArrayExpression"){const m=Math.min(p.elements.length,a.elements.length);for(let o=0;o=1){let m=0;for(let o=a.properties.length-1;o>=0;--o){const y=a.properties[o].type;if(y==="SpreadElement"||y==="ExperimentalSpreadProperty"){m=o+1;break}}for(let o=0;om.type===v[o].type&&m.value===v[o].value)}return{BinaryExpression(p){new Set(["===","==","!==","!=",">","<",">=","<="]).has(p.operator)&&u(p.left,p.right)&&c.report({node:p,messageId:"comparingToSelf"})}}}}),Kg}var Jg,WA;function Fq(){if(WA)return Jg;WA=1;const c=Ze(),s={allowInParentheses:!0};return Jg={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{type:"object",properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(u){const p=Object.assign({},s,u.options[0]),a=u.sourceCode,d={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function v(y){return y.parent&&d[y.parent.type]&&y===y.parent[d[y.parent.type]]}function m(y){return c.isParenthesised(a,y)}function o(y){const O=a.getTokenBefore(y,1),x=a.getTokenAfter(y,1);return m(y)&&O&&x&&c.isOpeningParenToken(O)&&O.range[1]<=y.range[0]&&c.isClosingParenToken(x)&&x.range[0]>=y.range[1]}return{SequenceExpression(y){if(y.parent.type==="ForStatement"&&(y===y.parent.init||y===y.parent.update))return;if(p.allowInParentheses){if(v(y)){if(o(y))return}else if(m(y))return}const O=a.getTokenAfter(y.expressions[0],c.isCommaToken);u.report({node:y,loc:O.loc,messageId:"unexpectedCommaExpression"})}}}},Jg}var e0,GA;function _q(){if(GA)return e0;GA=1;const c=Ze(),{findVariable:s}=Kr();function u(m,o){const y=s(o,m);return y!==null&&y.scope.type==="global"&&y.defs.length===0}function p(m,o,y,O,x){const g=m.parent;return g.type==="CallExpression"&&g.arguments[x]===m&&c.isSpecificMemberAccess(g.callee,y,O)&&u(c.skipChainExpression(g.callee).object,o)}function a(m,o){if(p(m,o,"Object","defineProperty",2)||p(m,o,"Reflect","defineProperty",2))return!0;const y=m.parent;if(y.type==="Property"&&y.value===m){const O=y.parent;if(O.type==="ObjectExpression"&&(p(O,o,"Object","create",1)||p(O,o,"Object","defineProperties",1)))return!0}return!1}function d(m,o){const y=m.parent;return!!((y.type==="Property"||y.type==="MethodDefinition")&&y.kind==="set"&&y.value===m||y.type==="Property"&&y.value===m&&c.getStaticPropertyName(y)==="set"&&y.parent.type==="ObjectExpression"&&a(y.parent,o))}function v(m){const o=m.upper;return o.type==="function-expression-name"?o.upper:o}return e0={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(m){let o=null;const y=m.sourceCode;function O(f){const b=v(y.getScope(f));o={upper:o,isSetter:d(f,b)}}function x(){o=o.upper}function g(f){m.report({node:f,messageId:"returnsValue"})}return{FunctionDeclaration:O,FunctionExpression:O,ArrowFunctionExpression(f){O(f),o.isSetter&&f.expression&&g(f.body)},"FunctionDeclaration:exit":x,"FunctionExpression:exit":x,"ArrowFunctionExpression:exit":x,ReturnStatement(f){o&&o.isSetter&&f.argument&&g(f)}}}},e0}var t0,zA;function Bq(){if(zA)return t0;zA=1;const c=Ze(),s=new Set(["ArrowFunctionExpression","FunctionExpression"]),u=new Set(["CallExpression"]),p=/^For(?:In|Of)Statement$/u,a=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return t0={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(d){const v={builtinGlobals:d.options[0]&&d.options[0].builtinGlobals,hoist:d.options[0]&&d.options[0].hoist||"functions",allow:d.options[0]&&d.options[0].allow||[],ignoreOnInitialization:d.options[0]&&d.options[0].ignoreOnInitialization},m=d.sourceCode;function o(T,R){return T&&T.range[0]<=R&&R<=T.range[1]}function y(T,R){let F=T;for(;F&&!R(F);)F=F.parent;return F}function O(T){const R=T.upper;return R.type==="function-expression-name"?R.upper:R}function x(T,R){const F=R.defs[0];if(!F)return!1;const{variableScope:P}=T.scope;if(!(s.has(P.block.type)&&O(P)===R.scope))return!1;const N=P.block,{parent:I}=N,L=y(I,U=>u.has(U.type));if(!L)return!1;let j=F.name;const G=L.range[1];for(;j;){if(j.type==="VariableDeclarator"){if(o(j.init,G)||p.test(j.parent.parent.type)&&o(j.parent.parent.right,G))return!0;break}else if(j.type==="AssignmentPattern"){if(o(j.right,G))return!0}else if(a.test(j.type))break;j=j.parent}return!1}function g(T){return v.allow.includes(T.name)}function f(T){const R=T.scope.block;return R.type==="ClassDeclaration"&&R.id===T.identifiers[0]}function b(T,R){const F=R.scope,P=R.defs[0],N=P&&P.parent&&P.parent.range,I=T.scope,L=T.defs[0],j=L&&L.name.range;return N&&j&&N[0]0||v.builtinGlobals&&"writeable"in N)&&!b(P,N)&&!(v.ignoreOnInitialization&&x(P,N))&&!(v.hoist!=="all"&&k(P,N))){const I=E(N),L=I.global?"noShadowGlobal":"noShadow",j={name:P.name};I.global||(j.shadowedLine=I.line,j.shadowedColumn=I.column),d.report({node:P.identifiers[0],messageId:L,data:j})}}}return{"Program:exit"(T){const F=m.getScope(T).childScopes.slice();for(;F.length;){const P=F.pop();F.push(...P.childScopes),D(P)}}}}},t0}var r0,ZA;function Lq(){if(ZA)return r0;ZA=1;function c(s){return s.name==="undefined"&&s.references.every(u=>!u.isWrite())&&s.defs.every(u=>u.node.type==="VariableDeclarator"&&u.node.init===null)}return r0={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(s){const u=new Set(["undefined","NaN","Infinity","arguments","eval"]),p=s.sourceCode;return{"VariableDeclaration, :function, CatchClause"(a){for(const d of p.getDeclaredVariables(a))d.defs.length>0&&u.has(d.name)&&!c(d)&&s.report({node:d.defs[0].name,messageId:"shadowingRestrictedName",data:{name:d.name}})}}}},r0}var n0,XA;function Nq(){return XA||(XA=1,n0={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(c){const s=c.sourceCode;function u(p){const a=s.getLastToken(p.callee);let d=a,v=s.getTokenAfter(a);for(;v&&v.range[1]{let o;for(;(o=c.exec(v))!==null;)a&&!s.test(v.slice(0,o.index))||u.report({node:d,loc:{start:{line:m+1,column:o.index},end:{line:m+1,column:o.index+o[0].length}},messageId:"unexpectedTab"})})}}}},a0}var o0,JA;function qq(){return JA||(JA=1,o0={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(c){const s=/\$\{[^}]+\}/u;return{Literal(u){typeof u.value=="string"&&s.test(u.value)&&c.report({node:u,messageId:"unexpectedTemplateExpression"})}}}}),o0}var l0,eP;function Qq(){return eP||(eP=1,l0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(c){return{ConditionalExpression(s){c.report({node:s,messageId:"noTernaryOperator"})}}}}),l0}var u0,tP;function Uq(){if(tP)return u0;tP=1;const c=Ze();function s(p){return p.type==="FunctionExpression"&&p.parent.type==="MethodDefinition"&&p.parent.kind==="constructor"}class u{constructor(){or(this,"superCalled",!1);or(this,"invalidNodes",[])}}return u0={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(p){let a=null,d=Object.create(null);function v(g){var f;return!g.reachable||((f=d[g.id])==null?void 0:f.superCalled)}function m(){return!!(a&&a.isConstructor&&a.hasExtends)}function o(g){for(const f of g)if(!v(f))return!1;return!0}function y(){return m()&&!o(a.currentSegments)}function O(g){const f=a.currentSegments;for(const b of f)b.reachable&&d[b.id].invalidNodes.push(g)}function x(){const g=a.currentSegments;for(const f of g)f.reachable&&(d[f.id].superCalled=!0)}return{onCodePathStart(g,f){if(s(f)){const b=f.parent.parent.parent;a={upper:a,isConstructor:!0,hasExtends:!!(b.superClass&&!c.isNullOrUndefined(b.superClass)),codePath:g,currentSegments:new Set}}else a={upper:a,isConstructor:!1,hasExtends:!1,codePath:g,currentSegments:new Set}},onCodePathEnd(g){const f=a.hasExtends;if(a=a.upper,!f)return;const b=new Set;g.traverseSegments((S,E)=>{const k=d[S.id],D=k.invalidNodes.filter(T=>!b.has(T));for(const T of D)b.add(T),p.report({messageId:"noBeforeSuper",node:T,data:{kind:T.type==="Super"?"super":"this"}});k.superCalled&&E.skip()})},onCodePathSegmentStart(g){a.currentSegments.add(g),m()&&(d[g.id]={superCalled:g.prevSegments.length>0&&g.prevSegments.every(v),invalidNodes:[]})},onUnreachableCodePathSegmentStart(g){a.currentSegments.add(g)},onUnreachableCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentEnd(g){a.currentSegments.delete(g)},onCodePathSegmentLoop(g,f){m()&&a.codePath.traverseSegments({first:f,last:g},(b,S)=>{const E=d[b.id]??new u;E.superCalled?S.skip():b.prevSegments.length>0&&b.prevSegments.every(v)&&(E.superCalled=!0),d[b.id]=E})},ThisExpression(g){y()&&O(g)},Super(g){!c.isCallee(g)&&y()&&O(g)},"CallExpression:exit"(g){g.callee.type==="Super"&&y()&&x()},"Program:exit"(){d=Object.create(null)}}}},u0}var c0,rP;function Vq(){if(rP)return c0;rP=1;const c=Ze();return c0={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(s){return{ThrowStatement(u){c.couldBeError(u.argument)?u.argument.type==="Identifier"&&u.argument.name==="undefined"&&s.report({node:u,messageId:"undef"}):s.report({node:u,messageId:"object"})}}}},c0}var f0,nP;function Wq(){if(nP)return f0;nP=1;const c=Ze();return f0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(s){const u=s.sourceCode,p="[   -​ ]",a=`^${p}*$`,d=`${p}+$`,v=s.options[0]||{},m=v.skipBlankLines||!1,o=v.ignoreComments||!1;function y(x,g,f){s.report({node:x,loc:g,messageId:"trailingSpace",fix(b){return b.removeRange(f)}})}function O(x){const g=new Set;return x.forEach(f=>{const b=f.type==="Block"?f.loc.end.line-1:f.loc.end.line;for(let S=f.loc.start.line;S<=b;S++)g.add(S)}),g}return{Program:function(g){const f=new RegExp(d,"u"),b=new RegExp(a,"u"),S=u.lines,E=u.getText().match(c.createGlobalLinebreakMatcher()),k=u.getAllComments(),D=O(k);let T=0;for(let R=0,F=S.length;RQ.parent.range[0]&&U{const o=m.identifier;!p&&c(o)||s.report({node:o,messageId:"undef",data:o})})}}}},p0}var h0,iP;function zq(){if(iP)return h0;iP=1;const c=Ze();return h0={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(s){const u=s.sourceCode;return{VariableDeclarator(p){const a=u.getText(p.id),d=p.init&&p.init.name,v=u.getScope(p),m=c.getVariableByName(v,"undefined"),o=m&&m.defs.length>0,y=u.getLastToken(p);d==="undefined"&&p.parent.kind!=="const"&&!o&&s.report({node:p,messageId:"unnecessaryUndefinedInit",data:{name:a},fix(O){return p.parent.kind==="var"||p.id.type==="ArrayPattern"||p.id.type==="ObjectPattern"||u.commentsExistBetween(p.id,y)?null:O.removeRange([p.id.range[1],p.range[1]])}})}}}},h0}var d0,aP;function Zq(){return aP||(aP=1,d0={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(c){const s=c.sourceCode;function u(a){c.report({node:a,messageId:"unexpectedUndefined"})}function p(a){const d=a.set.get("undefined");if(!d)return;const v=d.references,m=d.defs;v.filter(o=>!o.init).forEach(o=>u(o.identifier)),m.forEach(o=>u(o.name))}return{"Program:exit"(a){const v=[s.getScope(a)];for(;v.length;){const m=v.pop();v.push(...m.childScopes),p(m)}}}}}),d0}var m0,oP;function Xq(){return oP||(oP=1,m0={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(c){const s=c.options[0]||{},u=s.allow?s.allow:[],p=typeof s.allowAfterThis<"u"?s.allowAfterThis:!1,a=typeof s.allowAfterSuper<"u"?s.allowAfterSuper:!1,d=typeof s.allowAfterThisConstructor<"u"?s.allowAfterThisConstructor:!1,v=typeof s.enforceInMethodNames<"u"?s.enforceInMethodNames:!1,m=typeof s.enforceInClassFields<"u"?s.enforceInClassFields:!1,o=typeof s.allowFunctionParams<"u"?s.allowFunctionParams:!0,y=typeof s.allowInArrayDestructuring<"u"?s.allowInArrayDestructuring:!0,O=typeof s.allowInObjectDestructuring<"u"?s.allowInObjectDestructuring:!0,x=c.sourceCode;function g(N){return u.includes(N)}function f(N){const I=N.length;return N!=="_"&&(N[0]==="_"||N[I-1]==="_")}function b(N){return N==="__proto__"}function S(N){return N==="_"}function E(N){return N.object.type==="MemberExpression"&&N.object.property.name==="constructor"&&N.object.object.type==="ThisExpression"}function k(N){o||N.params.forEach(I=>{const{type:L}=I;let j;if(L==="RestElement"?j=I.argument:L==="AssignmentPattern"?j=I.left:j=I,j.type==="Identifier"){const G=j.name;f(G)&&!g(G)&&c.report({node:I,messageId:"unexpectedUnderscore",data:{identifier:G}})}})}function D(N){if(N.type==="FunctionDeclaration"&&N.id){const I=N.id.name;typeof I<"u"&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}k(N)}function T(N){x.getDeclaredVariables(N).forEach(I=>{const j=I.defs.find(Q=>Q.node===N).name,G=j.name;let U=j.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(U.type);)U=U.parent;f(G)&&!S(G)&&!g(G)&&!(y&&U.type==="ArrayPattern")&&!(O&&U.type==="ObjectPattern")&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:G}})})}function R(N){const I=N.property.name,L=N.object.type==="ThisExpression",j=N.object.type==="Super",G=E(N);typeof I<"u"&&f(I)&&!(L&&p)&&!(j&&a)&&!(G&&d)&&!b(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:I}})}function F(N){const I=N.key.name,L=N.type==="MethodDefinition"||N.type==="Property"&&N.method;typeof I<"u"&&v&&L&&f(I)&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}function P(N){const I=N.key.name;typeof I<"u"&&f(I)&&m&&!g(I)&&c.report({node:N,messageId:"unexpectedUnderscore",data:{identifier:N.key.type==="PrivateIdentifier"?`#${I}`:I}})}return{FunctionDeclaration:D,VariableDeclarator:T,MemberExpression:R,MethodDefinition:F,PropertyDefinition:P,Property:F,FunctionExpression:D,ArrowFunctionExpression:D}}}),m0}var g0,lP;function Yq(){if(lP)return g0;lP=1;const c=Ze();return g0={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(s){const u=/^[gimsuy]+$/u,p=s.sourceCode;function a(d,v){const m=p.getTokenAfter(d,c.isNotClosingParenToken),o=p.getTokenBefore(m);m.loc.start.line!==o.loc.end.line&&s.report({node:d,loc:m.loc,messageId:v})}return{MemberExpression(d){!d.computed||d.optional||a(d.object,"property")},TaggedTemplateExpression(d){const{quasi:v}=d;p.getTokenBefore(v).loc.end.line!==v.loc.start.line&&s.report({node:d,loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(d){d.arguments.length===0||d.optional||a(d.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(d){const v=p.getTokenAfter(d,o=>o.value==="/"),m=p.getTokenAfter(v);m.type==="Identifier"&&u.test(m.value)&&v.range[1]===m.range[0]&&a(d.left,"division")}}}},g0}var y0,uP;function Hq(){if(uP)return y0;uP=1;const c=tp(),s=Ze(),u=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,p=/^(?:DoWhile|For|While)Statement$/u,a=/^(?:BinaryExpression|ConditionalExpression)$/u,d=/^(?:ArrowFunction|Class|Function)Expression$/u,v=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function m(b){if(b.init){const S=b.resolved&&b.resolved.defs[0];if(!S||S.type!=="Variable"||S.parent.kind!=="var")return!1}return b.isWrite()}function o(b){return!b.modified}function y(b){return!(b.modified||b.group)}function O(b,S){const E=b.range,k=S.identifier.range;return E[0]<=k[0]&&k[1]<=E[1]}const x={WhileStatement:O,DoWhileStatement:O,ForStatement(b,S){return O(b,S)&&!(b.init&&O(b.init,S))}};function g(b){let S=b.identifier;for(;S;){if(S.type==="FunctionDeclaration")return S.id?S:null;S=S.parent}return null}function f(b,S){for(let E=0;E0&&f(I,L),I.filter(y).forEach(k)}return{"Program:exit"(N){const I=[S.getScope(N)];E=new Map;let L;for(;L=I.pop();)I.push(...L.childScopes),L.variables.forEach(P);E.forEach(T),E=null}}}},y0}var b0,cP;function Kq(){if(cP)return b0;cP=1;const c=Ze(),s=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),u={"==":"!=","!=":"==","===":"!==","!==":"==="},p=c.getPrecedence({type:"LogicalExpression",operator:"||"});return b0={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(a){const v=(a.options[0]||{}).defaultAssignment!==!1,m=a.sourceCode;function o(g){return g.type==="Literal"&&typeof g.value=="boolean"}function y(g){if(g.type==="BinaryExpression"&&Object.hasOwn(u,g.operator)){const f=m.getFirstTokenBetween(g.left,g.right,S=>S.value===g.operator),b=m.getText();return b.slice(g.range[0],f.range[0])+u[g.operator]+b.slice(f.range[1],g.range[1])}return c.getPrecedence(g)=this.startNode.range[0]&&a.range[1]<=this.endNode.range[1]}isConsecutive(a){return this.contains(this.sourceCode.getTokenBefore(a))}merge(a){this.endNode=a}reset(a){this.startNode=this.endNode=a}}return v0={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(p){let a=null;const d=new u(p.sourceCode),v=[];let m=new Set;function o(y){let O=null;if(y&&(y.type==="PropertyDefinition"||s(m))){if(d.isEmpty){d.reset(y);return}if(d.contains(y))return;if(d.isConsecutive(y)){d.merge(y);return}O=y}d.isEmpty||p.report({messageId:"unreachableCode",loc:d.location,node:d.startNode}),d.reset(O)}return{onCodePathStart(){v.push(m),m=new Set},onCodePathEnd(){m=v.pop()},onUnreachableCodePathSegmentStart(y){m.add(y)},onUnreachableCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentEnd(y){m.delete(y)},onCodePathSegmentStart(y){m.add(y)},BlockStatement:o,BreakStatement:o,ClassDeclaration:o,ContinueStatement:o,DebuggerStatement:o,DoWhileStatement:o,ExpressionStatement:o,ForInStatement:o,ForOfStatement:o,ForStatement:o,IfStatement:o,ImportDeclaration:o,LabeledStatement:o,ReturnStatement:o,SwitchStatement:o,ThrowStatement:o,TryStatement:o,VariableDeclaration(y){(y.kind!=="var"||y.declarations.some(c))&&o(y)},WhileStatement:o,WithStatement:o,ExportNamedDeclaration:o,ExportDefaultDeclaration:o,ExportAllDeclaration:o,"Program:exit"(){o()},"MethodDefinition[kind='constructor']"(){a={upper:a,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(y){const{hasSuperCall:O}=a;if(a=a.upper,!y.value.body)return;const x=y.parent.parent;if(x.superClass&&!O)for(const g of x.body.body)g.type==="PropertyDefinition"&&!g.static&&o(g)},"CallExpression > Super.callee"(){a&&(a.hasSuperCall=!0)}}}},v0}var x0,pP;function e6(){if(pP)return x0;pP=1;const c=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];function s(a){for(const d of a)if(d.reachable)return!0;return!1}function u(a){const d=a.parent;if(d)switch(d.type){case"WhileStatement":return a===d.test;case"DoWhileStatement":return a===d.body;case"ForStatement":return a===(d.update||d.test||d.body);case"ForInStatement":case"ForOfStatement":return a===d.left}return!1}function p(a,d){return a.filter(v=>!d.includes(v))}return x0={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:c},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(a){const d=a.options[0]&&a.options[0].ignore||[],v=p(c,d),m=v.join(","),o=new Map,y=new Set,O=[];let x=new Set;return{onCodePathStart(){O.push(x),x=new Set},onCodePathEnd(){x=O.pop()},onUnreachableCodePathSegmentStart(g){x.add(g)},onUnreachableCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentEnd(g){x.delete(g)},onCodePathSegmentStart(g,f){if(x.add(g),u(f)){const b=f.parent;o.set(g,b)}},onCodePathSegmentLoop(g,f,b){const S=o.get(f);(b===S||b.type==="ContinueStatement")&&y.delete(S)},[m](g){s(x)&&y.add(g)},"Program:exit"(){y.forEach(g=>a.report({node:g,messageId:"invalid"}))}}}},x0}var O0,hP;function t6(){if(hP)return O0;hP=1;const c=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/u,s=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/u,u=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/u;return O0={meta:{type:"problem",docs:{description:"Disallow control flow statements in `finally` blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-finally"},schema:[],messages:{unsafeUsage:"Unsafe usage of {{nodeType}}."}},create(p){function a(m){return m.parent.type==="TryStatement"&&m.parent.finalizer===m}function d(m,o){let y=!1,O;m.type==="BreakStatement"&&!m.label?O=s:m.type==="ContinueStatement"?O=u:O=c;for(let x=m;x&&!O.test(x.type);x=x.parent)if(x.parent.label&&o&&x.parent.label.name===o.name&&(y=!0),a(x))return!(o&&y);return!1}function v(m){d(m,m.label)&&p.report({messageId:"unsafeUsage",data:{nodeType:m.type},node:m,line:m.loc.line,column:m.loc.column})}return{ReturnStatement:v,ThrowStatement:v,BreakStatement:v,ContinueStatement:v}}},O0}var S0,dP;function r6(){if(dP)return S0;dP=1;const c=Ze();function s(a){return a==="in"||a==="instanceof"}function u(a){return a==="<"||a===">"||a===">="||a==="<="}function p(a){return a.type==="UnaryExpression"&&a.operator==="!"}return S0={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(a){const d=a.sourceCode,m=(a.options[0]||{}).enforceForOrderingRelations===!0;return{BinaryExpression(o){const y=o.operator,O=m&&u(y);(s(y)||O)&&p(o.left)&&!c.isParenthesised(d,o.left)&&a.report({node:o,loc:o.left.loc,messageId:"unexpected",data:{operator:y},suggest:[{messageId:"suggestNegatedExpression",data:{operator:y},fix(x){const f=[d.getFirstToken(o.left).range[1],o.range[1]],b=d.text.slice(f[0],f[1]);return x.replaceTextRange(f,`(${b})`)}},{messageId:"suggestParenthesisedNegation",fix(x){return x.replaceText(o.left,`(${d.getText(o.left)})`)}}]})}}}},S0}var E0,mP;function n6(){if(mP)return E0;mP=1;const c=new Set(["+","-","/","*","%","**"]),s=new Set(["+=","-=","/=","*=","%=","**="]),u=new Set(["in","instanceof"]);function p(a){return a.type==="ObjectPattern"||a.type==="ArrayPattern"}return E0={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(a){const v=(a.options[0]||{}).disallowArithmeticOperators||!1;function m(g){a.report({messageId:"unsafeOptionalChain",node:g})}function o(g){a.report({messageId:"unsafeArithmetic",node:g})}function y(g,f){if(g)switch(g.type){case"LogicalExpression":g.operator==="||"||g.operator==="??"?y(g.right,f):g.operator==="&&"&&(y(g.left,f),y(g.right,f));break;case"SequenceExpression":y(g.expressions.at(-1),f);break;case"ConditionalExpression":y(g.consequent,f),y(g.alternate,f);break;case"AwaitExpression":y(g.argument,f);break;case"ChainExpression":f(g);break}}function O(g){y(g,m)}function x(g){y(g,o)}return{"AssignmentExpression, AssignmentPattern"(g){p(g.left)&&O(g.right)},"ClassDeclaration, ClassExpression"(g){O(g.superClass)},CallExpression(g){g.optional||O(g.callee)},NewExpression(g){O(g.callee)},VariableDeclarator(g){p(g.id)&&O(g.init)},MemberExpression(g){g.optional||O(g.object)},TaggedTemplateExpression(g){O(g.tag)},ForOfStatement(g){O(g.right)},SpreadElement(g){g.parent&&g.parent.type!=="ObjectExpression"&&O(g.argument)},BinaryExpression(g){u.has(g.operator)&&O(g.right),v&&c.has(g.operator)&&(x(g.right),x(g.left))},WithStatement(g){O(g.object)},UnaryExpression(g){v&&c.has(g.operator)&&x(g.argument)},AssignmentExpression(g){v&&s.has(g.operator)&&x(g.right)}}}},E0}var C0,gP;function s6(){if(gP)return C0;gP=1;const c=Ze();function s(){return!0}function u(){return!1}return C0={meta:{type:"suggestion",docs:{description:"Disallow unused expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-expressions"},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean",default:!1},allowTernary:{type:"boolean",default:!1},allowTaggedTemplates:{type:"boolean",default:!1},enforceForJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unusedExpression:"Expected an assignment or function call and instead saw an expression."}},create(p){const a=p.options[0]||{},d=a.allowShortCircuit||!1,v=a.allowTernary||!1,m=a.allowTaggedTemplates||!1,o=a.enforceForJSX||!1;function y(b){return b.type==="ExpressionStatement"&&b.expression.type==="Literal"&&typeof b.expression.value=="string"}function O(b,S){for(let E=0;Ey.removeRange([o.range[0],o.body.range[0]]):null}),p=p.upper}function m(o){if(!o.label)return;const y=o.label.name;let O=p;for(;O;){if(O.label===y){O.used=!0;break}O=O.upper}}return{LabeledStatement:a,"LabeledStatement:exit":v,BreakStatement:m,ContinueStatement:m}}},w0}var k0,bP;function a6(){return bP||(bP=1,k0={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(c){const s=[];function u(p){const a=p.parent.parent,d=a.type==="AssignmentExpression";return!d&&a.type!=="ForInStatement"&&a.type!=="ForOfStatement"&&a.type!=="AssignmentPattern"||a.left!==p.parent?!1:d&&a.operator!=="="?a.parent.type==="ExpressionStatement":!0}return{ClassBody(p){const a=new Map;s.unshift(a);for(const d of p.body)(d.type==="PropertyDefinition"||d.type==="MethodDefinition")&&d.key.type==="PrivateIdentifier"&&a.set(d.key.name,{declaredNode:d,isAccessor:d.type==="MethodDefinition"&&(d.kind==="set"||d.kind==="get")})},PrivateIdentifier(p){const a=s.find(o=>o.has(p.name));if(!a)return;const d=a.get(p.name);if(d.isUsed||p.parent.type==="PropertyDefinition"||p.parent.type==="MethodDefinition")return;if(d.isAccessor){d.isUsed=!0;return}if(u(p))return;const v=p.parent.parent.type,m=p.parent.parent.parent.type;v==="UpdateExpression"&&m==="ExpressionStatement"||v==="Property"&&m==="ObjectPattern"&&p.parent.parent.value===p.parent||v!=="RestElement"&&v!=="ArrayPattern"&&(d.isUsed=!0)},"ClassBody:exit"(){const p=s.shift();for(const[a,{declaredNode:d,isUsed:v}]of p.entries())v||c.report({node:d,loc:d.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${a}`}})}}}}),k0}var A0,vP;function o6(){if(vP)return A0;vP=1;const c=Ze();return A0={meta:{type:"problem",docs:{description:"Disallow unused variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-vars"},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"},destructuredArrayIgnorePattern:{type:"string"},ignoreClassWithStaticInitBlock:{type:"boolean"},reportUsedIgnorePattern:{type:"boolean"}},additionalProperties:!1}]}],messages:{unusedVar:"'{{varName}}' is {{action}} but never used{{additional}}.",usedIgnoredVar:"'{{varName}}' is marked as ignored but is used{{additional}}."}},create(s){const u=s.sourceCode,p=/^(?:RestElement|(?:Experimental)?RestProperty)$/u,a={vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1},d=s.options[0];d&&(typeof d=="string"?a.vars=d:(a.vars=d.vars||a.vars,a.args=d.args||a.args,a.ignoreRestSiblings=d.ignoreRestSiblings||a.ignoreRestSiblings,a.caughtErrors=d.caughtErrors||a.caughtErrors,a.ignoreClassWithStaticInitBlock=d.ignoreClassWithStaticInitBlock||a.ignoreClassWithStaticInitBlock,a.reportUsedIgnorePattern=d.reportUsedIgnorePattern||a.reportUsedIgnorePattern,d.varsIgnorePattern&&(a.varsIgnorePattern=new RegExp(d.varsIgnorePattern,"u")),d.argsIgnorePattern&&(a.argsIgnorePattern=new RegExp(d.argsIgnorePattern,"u")),d.caughtErrorsIgnorePattern&&(a.caughtErrorsIgnorePattern=new RegExp(d.caughtErrorsIgnorePattern,"u")),d.destructuredArrayIgnorePattern&&(a.destructuredArrayIgnorePattern=new RegExp(d.destructuredArrayIgnorePattern,"u"))));function v(U){if(a.destructuredArrayIgnorePattern&&U.name.parent.type==="ArrayPattern")return"array-destructure";switch(U.type){case"CatchClause":return"catch-clause";case"Parameter":return"parameter";default:return"variable"}}function m(U){let Q,$;switch(U){case"array-destructure":Q=a.destructuredArrayIgnorePattern,$="elements of array destructuring";break;case"catch-clause":Q=a.caughtErrorsIgnorePattern,$="caught errors";break;case"parameter":Q=a.argsIgnorePattern,$="args";break;case"variable":Q=a.varsIgnorePattern,$="vars";break;default:throw new Error(`Unexpected variable type: ${U}`)}return Q&&(Q=Q.toString()),[$,Q]}function o(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"defined",additional:$}}function y(U){const Q=U.defs&&U.defs[0];let $="";if(Q){const[W,K]=m(v(Q));K&&W&&($=`. Allowed unused ${W} must match ${K}`)}return{varName:U.name,action:"assigned a value",additional:$}}function O(U,Q){const[$,W]=m(Q);let K="";return W&&$&&(K=`. Used ${$} must not match ${W}`),{varName:U.name,additional:K}}const x=/(?:Statement|Declaration)$/u;function g(U){const Q=U.defs[0];if(Q){let $=Q.node;if($.type==="VariableDeclarator")$=$.parent;else if(Q.type==="Parameter")return!1;return $.parent.type.indexOf("Export")===0}return!1}function f(U){return U.type==="Property"&&U.parent.type==="ObjectPattern"&&p.test(U.parent.properties.at(-1).type)}function b(U){if(a.ignoreRestSiblings){const Q=U.defs.some(W=>f(W.name.parent)),$=U.references.some(W=>f(W.identifier.parent));return Q||$}return!1}function S(U){return U.isRead()}function E(U,Q){let $=U.from;for(;$;){if(Q.includes($.block))return!0;$=$.upper}return!1}function k(U){const Q=[];return U.defs.forEach($=>{const{type:W,node:K}=$;W==="FunctionName"&&Q.push(K),W==="Variable"&&K.init&&(K.init.type==="FunctionExpression"||K.init.type==="ArrowFunctionExpression")&&Q.push(K.init)}),Q}function D(U,Q){return U.range[0]>=Q.range[0]&&U.range[1]<=Q.range[1]}function T(U){const Q=U.parent;return Q.type==="ExpressionStatement"?!0:Q.type==="SequenceExpression"?Q.expressions.at(-1)===U?T(Q):!0:!1}function R(U,Q){const $=U.identifier,W=$.parent,K=U.from.variableScope,te=U.resolved.scope.variableScope,V=K!==te||c.isInLoop($);return Q&&D($,Q)?Q:W.type==="AssignmentExpression"&&T(W)&&$===W.left&&!V?W.right:null}function F(U,Q){let $=U,W=U.parent;for(;W&&D(W,Q);){switch(W.type){case"SequenceExpression":if(W.expressions.at(-1)!==$)return!1;break;case"CallExpression":case"NewExpression":return W.callee!==$;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(x.test(W.type))return!0}$=W,W=W.parent}return!1}function P(U,Q){const $=c.getUpperFunction(U);return $&&D($,Q)&&F($,Q)}function N(U,Q){const $=U.identifier,W=$.parent;return U.isRead()&&(W.type==="AssignmentExpression"&&W.left===$&&T(W)&&!c.isLogicalAssignmentOperator(W.operator)||W.type==="UpdateExpression"&&T(W)||Q&&D($,Q)&&!P($,Q))}function I(U){let Q=U.identifier.parent;return Q.type==="VariableDeclarator"&&(Q=Q.parent.parent),Q.type!=="ForInStatement"&&Q.type!=="ForOfStatement"||(Q.body.type==="BlockStatement"?Q=Q.body.body[0]:Q=Q.body,!Q)?!1:Q.type==="ReturnStatement"}function L(U){if(U.eslintUsed)return!0;const Q=k(U),$=Q.length>0;let W=null;return U.references.some(K=>{if(I(K))return!0;const te=N(K,W);return W=R(K,W),S(K)&&!te&&!($&&E(K,Q))})}function j(U){const Q=U.defs[0],$=u.getDeclaredVariables(Q.node);return!$.slice($.indexOf(U)+1).some(K=>K.references.length>0||K.eslintUsed)}function G(U,Q){const $=U.variables,W=U.childScopes;let K,te;if(U.type!=="global"||a.vars==="all")for(K=0,te=$.length;Kne.identifier.parent.type==="ArrayPattern");if((ae.name.parent.type==="ArrayPattern"||ue)&&a.destructuredArrayIgnorePattern&&a.destructuredArrayIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"array-destructure")});continue}if(z==="ClassName"){const ne=ae.node.body.body.some(ce=>ce.type==="StaticBlock");if(a.ignoreClassWithStaticInitBlock&&ne)continue}if(z==="CatchClause"){if(a.caughtErrors==="none")continue;if(a.caughtErrorsIgnorePattern&&a.caughtErrorsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"catch-clause")});continue}}else if(z==="Parameter"){if((ae.node.parent.type==="Property"||ae.node.parent.type==="MethodDefinition")&&ae.node.parent.kind==="set"||a.args==="none")continue;if(a.argsIgnorePattern&&a.argsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"parameter")});continue}if(a.args==="after-used"&&c.isFunction(ae.name.parent)&&!j(V))continue}else if(a.varsIgnorePattern&&a.varsIgnorePattern.test(ae.name.name)){a.reportUsedIgnorePattern&&L(V)&&s.report({node:ae.name,messageId:"usedIgnoredVar",data:O(V,"variable")});continue}}!L(V)&&!g(V)&&!b(V)&&Q.push(V)}for(K=0,te=W.length;K0){const te=K.references.filter(ae=>ae.isWrite()&&ae.from.variableScope===K.scope.variableScope);let V;te.length>0&&(V=te.at(-1)),s.report({node:V?V.identifier:K.identifiers[0],messageId:"unusedVar",data:K.references.some(ae=>ae.isWrite())?y(K):o(K)})}else if(K.eslintExplicitGlobalComments){const te=K.eslintExplicitGlobalComments[0];s.report({node:U,loc:c.getNameLocationInGlobalDirectiveComment(u,te,K.name),messageId:"unusedVar",data:o(K)})}}}}}},A0}var P0,xP;function l6(){if(xP)return P0;xP=1;const c=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,s=/^For(?:In|Of)Statement$/u;function u(o){let y=!0,O=!0,x=!0,g=!1;return typeof o=="string"?y=o!=="nofunc":typeof o=="object"&&o!==null&&(y=o.functions!==!1,O=o.classes!==!1,x=o.variables!==!1,g=!!o.allowNamedExports),{functions:y,classes:O,variables:x,allowNamedExports:g}}function p(o,y){return o&&o.range[0]<=y&&y<=o.range[1]}function a(o,y){return o.body.some(O=>O.type==="StaticBlock"&&p(O,y)||O.type==="PropertyDefinition"&&O.static&&O.value&&p(O.value,y))}function d(o){return o.type==="class-static-block"?!0:o.type==="class-field-initializer"?o.block.parent.static:!1}function v(o){const y=o.resolved;let O=o.from;for(;y.scope.variableScope!==O.variableScope;)if(d(O.variableScope))O=O.variableScope.upper;else return!0;return!1}function m(o){if(v(o))return!1;const y=o.identifier.range[1],O=o.resolved.defs[0];if(O.type==="ClassName"){const g=O.node;return p(g,y)&&!a(g.body,y)}let x=O.name.parent;for(;x;){if(x.type==="VariableDeclarator"){if(p(x.init,y)||s.test(x.parent.parent.type)&&p(x.parent.parent.right,y))return!0;break}else if(x.type==="AssignmentPattern"){if(p(x.right,y))return!0}else if(c.test(x.type))break;x=x.parent}return!1}return P0={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(o){const y=u(o.options[0]),O=o.sourceCode;function x(f){if(f.init)return!1;const{identifier:b}=f;if(y.allowNamedExports&&b.parent.type==="ExportSpecifier"&&b.parent.local===b)return!1;const S=f.resolved;if(!S||S.defs.length===0)return!1;const E=S.defs[0].type;return!(!y.functions&&E==="FunctionName"||(!y.variables&&E==="Variable"||!y.classes&&E==="ClassName")&&v(f))}function g(f){f.references.filter(x).forEach(b=>{const E=b.resolved.defs[0].name;(b.identifier.range[1]T.nextSegments)};function*E(){for(yield*S.results;S.queueSegments.length>0;){const T=S.queueSegments.shift();if(S.subsequentSegments.has(T))continue;S.subsequentSegments.add(T);const R=b.find(P=>P.segments.includes(T)&&!p(P,f.identifier));R||S.queueSegments.push(...T.nextSegments);const F={segment:T,assignment:R};S.results.push(F),yield F}}const k=f.variable.references.filter(T=>T.isRead());if(!k.length)return;const D=b.find(T=>T===f||T.segments.length&&T.segments.every(R=>!f.segments.includes(R))?!1:!!(u(f,T.identifier)||T.expression&&T.expression.range[0]<=f.identifier.range[0]&&f.identifier.range[1]<=T.expression.range[1]));for(const T of k){if(O.scope!==o(T.from))return;if(u(f,T.identifier)&&(p(f,T.identifier)||f.segments.some(R=>x(R,T.identifier)))){if(D&&u(D,T.identifier))continue;return}if(!D){for(const R of E())if(x(R.segment,T.identifier)){if(R.assignment&&u(R.assignment,T.identifier))continue;return}}}a.report({node:f.identifier,messageId:"unnecessaryAssignment"})}for(const f of O.assignments.values()){f.sort((b,S)=>b.identifier.range[0]-S.identifier.range[0]);for(const b of f)g(b,f)}}return{onCodePathStart(O,x){const g=d.getScope(x);v={upper:v,codePath:O,scope:g,segments:Object.create(null),currentSegments:new Set,assignments:new Map},m.add(v.scope)},onCodePathEnd(){y(v),v=v.upper},onCodePathSegmentStart(O){const x={segment:O,first:null,last:null};v.segments[O.id]=x,v.currentSegments.add(O)},onCodePathSegmentEnd(O){v.currentSegments.delete(O)},Identifier(O){for(const x of v.currentSegments){const g=v.segments[x.id];g.first||(g.first=O),g.last=O}},":matches(VariableDeclarator[init!=null], AssignmentExpression, UpdateExpression):exit"(O){if(v.currentSegments.size===0)return;const x=v.assignments;let g,f=null;O.type==="VariableDeclarator"?(g=O.id,f=O.init):O.type==="AssignmentExpression"?(g=O.left,f=O.right):g=O.argument;for(const b of s(g)){const S=d.getScope(b),E=c(S,b);if(!E||E.scope.type==="global"&&E.defs.length===0||v.scope!==o(E.scope)||E.eslintUsed||E.scope.type==="module"&&(E.defs.some(D=>D.type==="Variable"&&D.parent.parent.type==="ExportNamedDeclaration"||D.type==="FunctionName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration")||D.type==="ClassName"&&(D.node.parent.type==="ExportNamedDeclaration"||D.node.parent.type==="ExportDefaultDeclaration"))||E.references.some(D=>D.identifier.parent.type==="ExportSpecifier")))continue;let k=x.get(E);k||(k=[],x.set(E,k)),k.push({variable:E,identifier:b,node:O,expression:f,segments:[...v.currentSegments]})}}}}},T0}var D0,SP;function c6(){if(SP)return D0;SP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),{RegExpParser:a,visitRegExpAST:d}=Cs(),v=new a;function m(O){const x=[];let g=O;do x.push(g),g=g.parent;while(g);return x}function o(O){return O.type==="Assertion"&&(O.kind==="lookahead"||O.kind==="lookbehind")}function y(O){return o(O)&&O.negate}return D0={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."}},create(O){const x=O.sourceCode;function g(f,b,S){let E;try{E=v.parsePattern(b,0,b.length,{unicode:S.includes("u"),unicodeSets:S.includes("v")})}catch{return}d(E,{onBackreferenceEnter(k){const D=[k.resolved].flat(),T=m(k),R=D.map(G=>{const U=m(G);if(T.includes(G))return{messageId:"nested",group:G};let Q=T.length-1,$=U.length-1;do Q--,$--;while(T[Q]===U[$]);const W=$+1,K=U.slice(0,W),te=U.slice(W),V=te.find(o),ae=V&&V.kind==="lookbehind";return K.at(-1).type==="Alternative"?{messageId:"disjunctive",group:G}:!ae&&k.end<=G.start?{messageId:"forward",group:G}:ae&&G.end<=k.start?{messageId:"backward",group:G}:K.some(y)?{messageId:"intoNegativeLookaround",group:G}:null});if(R.length===0||R.some(G=>!G))return;let F;const P=R.filter(G=>G.messageId!=="disjunctive");P.length?F=P:F=R;const[{messageId:N,group:I},...L]=F;let j="";L.length===1?j=" and another group":L.length>1&&(j=` and other ${L.length} groups`),O.report({node:f,messageId:N,data:{bref:k.raw,group:I.raw,otherGroups:j}})}})}return{"Literal[regex]"(f){const{pattern:b,flags:S}=f.regex;g(f,b,S)},Program(f){const b=x.getScope(f),S=new u(b),E={RegExp:{[c]:!0,[s]:!0}};for(const{node:k}of S.iterateGlobalReferences(E)){const[D,T]=k.arguments,R=p(D,b),F=p(T,b);typeof R=="string"&&g(k,R,F||"")}}}}},D0}var I0,EP;function f6(){if(EP)return I0;EP=1;const c=Ze();function s(p){const a=c.skipChainExpression(p.callee);return a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.computed===!1&&(a.property.name==="call"&&p.arguments.length>=1||a.property.name==="apply"&&p.arguments.length===2&&p.arguments[1].type==="ArrayExpression")}function u(p,a,d){return p?c.equalTokens(p,a,d):c.isNullOrUndefined(a)}return I0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.call()` and `.apply()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-call"},schema:[],messages:{unnecessaryCall:"Unnecessary '.{{name}}()'."}},create(p){const a=p.sourceCode;return{CallExpression(d){if(!s(d))return;const v=c.skipChainExpression(d.callee),m=c.skipChainExpression(v.object),o=m.type==="MemberExpression"?m.object:null,y=d.arguments[0];u(o,y,a)&&p.report({node:d,messageId:"unnecessaryCall",data:{name:v.property.name}})}}}},I0}var R0,CP;function p6(){return CP||(CP=1,R0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(c){return{CatchClause(s){s.param&&s.param.type==="Identifier"&&s.body.body.length&&s.body.body[0].type==="ThrowStatement"&&s.body.body[0].argument.type==="Identifier"&&s.body.body[0].argument.name===s.param.name&&(s.parent.finalizer?c.report({node:s,messageId:"unnecessaryCatchClause"}):c.report({node:s.parent,messageId:"unnecessaryCatch"}))}}}}),R0}var F0,wP;function h6(){if(wP)return F0;wP=1;const c=Ze();function s(u){if(!u.computed)return!1;const{key:p}=u;if(p.type!=="Literal")return!1;const{value:a}=p;if(typeof a!="number"&&typeof a!="string")return!1;switch(u.type){case"Property":return a!=="__proto__";case"PropertyDefinition":return u.static?a!=="constructor"&&a!=="prototype":a!=="constructor";case"MethodDefinition":return u.static?a!=="prototype":a!=="constructor";default:throw new Error(`Unexpected node type: ${u.type}`)}}return F0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(u){var m;const p=u.sourceCode,a=((m=u.options[0])==null?void 0:m.enforceForClassMembers)??!0;function d(o){if(s(o)){const{key:y}=o;u.report({node:o,messageId:"unnecessarilyComputedProperty",data:{property:p.getText(y)},fix(O){const x=p.getTokenBefore(y,c.isOpeningBracketToken),g=p.getTokenAfter(y,c.isClosingBracketToken);if(p.commentsExistBetween(x,g))return null;const f=p.getTokenBefore(x),S=(f.range[1]===x.range[0]&&!c.canTokensBeAdjacent(f,p.getFirstToken(y))?" ":"")+y.raw;return O.replaceTextRange([x.range[0],g.range[1]],S)}})}}function v(){}return{Property:d,MethodDefinition:a?d:v,PropertyDefinition:a?d:v}}},F0}var _0,kP;function d6(){if(kP)return _0;kP=1;const c=Ze();function s(d){return d.type==="BinaryExpression"&&d.operator==="+"}function u(d){return d.value==="+"&&d.type==="Punctuator"}function p(d){let v=d.left;for(;s(v);)v=v.right;return v}function a(d){let v=d.right;for(;s(v);)v=v.left;return v}return _0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(d){const v=d.sourceCode;return{BinaryExpression(m){if(m.operator!=="+")return;const o=p(m),y=a(m);if(c.isStringLiteral(o)&&c.isStringLiteral(y)&&c.isTokenOnSameLine(o,y)){const O=v.getFirstTokenBetween(o,y,u);d.report({node:m,loc:O.loc,messageId:"unexpectedConcat"})}}}}},_0}var B0,AP;function m6(){if(AP)return B0;AP=1;const c=Ze();function s(y){return y.length===1&&y[0].type==="ExpressionStatement"&&y[0].expression.type==="CallExpression"&&y[0].expression.callee.type==="Super"}function u(y){return y.type==="Identifier"||y.type==="RestElement"}function p(y){return y.length===1&&y[0].type==="SpreadElement"&&y[0].argument.type==="Identifier"&&y[0].argument.name==="arguments"}function a(y,O){return y.type==="Identifier"&&O.type==="Identifier"&&y.name===O.name}function d(y,O){return y.type==="RestElement"&&O.type==="SpreadElement"&&a(y.argument,O.argument)}function v(y,O){return a(y,O)||d(y,O)}function m(y,O){if(y.length!==O.length)return!1;for(let x=0;x?@^`~");return L0={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(y){const O=y.sourceCode,x=new s;function g(E,k,D,T){const R=E.range[0]+k,F=[R,R+1],P=O.getLocFromIndex(R);y.report({node:E,loc:{start:P,end:{line:P.line,column:P.column+1}},messageId:"unnecessaryEscape",data:{character:D},suggest:[{messageId:c.isDirective(E.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(N){return N.removeRange(F)}},...T?[]:[{messageId:"escapeBackslash",fix(N){return N.insertTextBeforeRange(F,"\\")}}]]})}function f(E,k){const D=E.type==="TemplateElement",T=k[0][1];let R=!a.has(T),F;D?(F=T==="`",T==="$"?R=k.input[k.index+2]!=="{":T==="{"&&(R=k.input[k.index-1]!=="$")):F=T===E.raw[0],R&&!F&&g(E,k.index,k[0].slice(1))}function b(E){const{pattern:k,flags:D}=E.regex;let T;const R=D.includes("u"),F=D.includes("v");try{T=x.parsePattern(k,0,k.length,{unicode:R,unicodeSets:F})}catch{return}const P=[];u(T,{onCharacterClassEnter:N=>P.unshift(N),onCharacterClassLeave:()=>P.shift(),onExpressionCharacterClassEnter:N=>P.unshift(N),onExpressionCharacterClassLeave:()=>P.shift(),onCharacterEnter(N){if(!N.raw.startsWith("\\"))return;const I=N.raw.slice(1);if(I!==String.fromCodePoint(N.value))return;let L;if(P.length?L=F?m:d:L=v,L.has(I))return;const j=N.start+1;let G=!1;if(P.length){const U=P[0];if(I==="^"&&U.start+1===N.start)return;if(F){if(o.has(I)&&(k[N.end]===I||k[N.start-1]===I&&(I!=="^"||!U.negate||U.start+1u.getCommentsInside(E).length||E.type==="AssignmentPattern"&&c.isParenthesised(u,E.left)?null:S.replaceText(x,u.getText(E))}})}function o(x){if(!a)for(const g of x.properties){if(g.type!=="Property"||g.shorthand||g.computed)continue;const f=g.key.type==="Identifier"&&g.key.name||g.key.type==="Literal"&&g.key.value,b=g.value.type==="AssignmentPattern"?g.value.left.name:g.value.name;f===b&&m(g,g.key,"Destructuring assignment")}}function y(x){d||x.imported.range[0]!==x.local.range[0]&&c.getModuleExportName(x.imported)===x.local.name&&m(x,x.imported,"Import")}function O(x){v||x.local.range[0]!==x.exported.range[0]&&c.getModuleExportName(x.local)===c.getModuleExportName(x.exported)&&m(x,x.local,"Export")}return{ObjectPattern:o,ImportSpecifier:y,ExportSpecifier:O}}},N0}var M0,DP;function b6(){if(DP)return M0;DP=1;const c=Ze(),s=Oo();function u(v,m){const o=v.indexOf(m);o!==-1&&v.splice(o,1)}function p(v){return c.STATEMENT_LIST_PARENTS.has(v.parent.type)}function a(v){for(let m=v;m&&m.parent&&!c.isFunction(m);m=m.parent)if(m.parent.type==="TryStatement"&&m.parent.finalizer===m)return!0;return!1}function d(v){for(const m of v)if(m.reachable)return!0;return!1}return M0={meta:{type:"suggestion",docs:{description:"Disallow redundant return statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-return"},fixable:"code",schema:[],messages:{unnecessaryReturn:"Unnecessary return statement."}},create(v){const m=new WeakMap,o=v.sourceCode;let y=null;function O(b){const S=m.get(b);return!S||S.returned}function x(b,S,E){const k=E||new WeakSet;for(const D of S){if(!D.reachable){k.has(D)||(k.add(D),x(b,D.allPrevSegments.filter(O),k));continue}m.has(D)&&b.push(...m.get(D).uselessReturns)}return b}function g(b,S){if(!b.reachable){S.add(b),b.allPrevSegments.filter(O).filter(k=>!S.has(k)).forEach(k=>g(k,S));return}const E=m.get(b);E&&(E.uselessReturns=E.uselessReturns.filter(k=>{if(y.traversedTryBlockStatements&&y.traversedTryBlockStatements.length>0){const D=k.range[0],T=k.range[1];if(y.traversedTryBlockStatements.some(F=>{const P=F.range[0],N=F.range[1];return D>=P&&T<=N}))return!0}return u(y.uselessReturns,k),!1}))}function f(){y.currentSegments.forEach(b=>g(b,new Set))}return{onCodePathStart(b){y={upper:y,uselessReturns:[],traversedTryBlockStatements:[],codePath:b,currentSegments:new Set}},onCodePathEnd(){for(const b of y.uselessReturns)v.report({node:b,loc:b.loc,messageId:"unnecessaryReturn",fix(S){return p(b)&&!o.getCommentsInside(b).length?new s(S,o).retainEnclosingFunction(b).remove(b):null}});y=y.upper},onCodePathSegmentStart(b){y.currentSegments.add(b);const S={uselessReturns:x([],b.allPrevSegments),returned:!1};m.set(b,S)},onUnreachableCodePathSegmentStart(b){y.currentSegments.add(b)},onUnreachableCodePathSegmentEnd(b){y.currentSegments.delete(b)},onCodePathSegmentEnd(b){y.currentSegments.delete(b)},ReturnStatement(b){if(b.argument&&f(),!(b.argument||c.isInLoop(b)||a(b)||!d(y.currentSegments))){for(const S of y.currentSegments){const E=m.get(S);E&&(E.uselessReturns.push(b),E.returned=!0)}y.uselessReturns.push(b)}},"TryStatement > BlockStatement.block:exit"(b){y.traversedTryBlockStatements.push(b)},"TryStatement:exit"(){y.traversedTryBlockStatements.pop()},ClassDeclaration:f,ContinueStatement:f,DebuggerStatement:f,DoWhileStatement:f,EmptyStatement:f,ExpressionStatement:f,ForInStatement:f,ForOfStatement:f,ForStatement:f,IfStatement:f,ImportDeclaration:f,LabeledStatement:f,SwitchStatement:f,ThrowStatement:f,TryStatement:f,VariableDeclaration:f,WhileStatement:f,WithStatement:f,ExportNamedDeclaration:f,ExportDefaultDeclaration:f,ExportAllDeclaration:f}}},M0}var $0,IP;function v6(){if(IP)return $0;IP=1;const c=Ze();function s(g){return!!g.scope&&g.scope.type==="global"}function u(g){let f=g;for(;f.type!=="function"&&f.type!=="global";)f=f.upper;return f}function p(g){const f=u(g.scope);return g.references.some(b=>u(b.from)!==f)}function a(g){return(g.parent.type==="ForOfStatement"||g.parent.type==="ForInStatement")&&g===g.parent.left}function d(g){return g.declarations.every(f=>f.init!==null)}const v=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function m(g){for(let f=g;f;f=f.parent)if(v.test(f.type))return f;return null}function o(g){return g.defs.length>=2}function y(g){function f(b){const S=g.range,E=b.identifier.range;return E[0]S[1]}return function(b){return b.references.some(f)}}function O(g){const f=g.range[0],b=g.range[1];return S=>{const E=S.defs[0].name,k=E.range[0],D=E.parent.type==="AssignmentPattern"?E.parent.right:null,T=D&&D.range[0],R=D&&D.range[1];return S.references.some(F=>{const P=F.identifier.range[0],N=F.identifier.range[1];return!F.init&&(P=T&&N<=R||!c.isFunction(g)&&P>=f&&N<=b)})}}function x(g){return g.name==="let"}return $0={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(g){const f=g.sourceCode;function b(k){return k.init?f.getDeclaredVariables(k).some(O(k.init)):!1}function S(k){const D=f.getDeclaredVariables(k),T=m(k);return!(k.parent.type==="SwitchCase"||k.declarations.some(b)||D.some(s)||D.some(o)||D.some(y(T))||D.some(x)||c.isInLoop(k)&&(D.some(p)||!a(k)&&!d(k))||!a(k)&&!(k.parent.type==="ForStatement"&&k.parent.init===k)&&!c.STATEMENT_LIST_PARENTS.has(k.parent.type))}function E(k){g.report({node:k,messageId:"unexpectedVar",fix(D){const T=f.getFirstToken(k,{filter:R=>R.value==="var"});return S(k)?D.replaceText(T,"let"):null}})}return{"VariableDeclaration:exit"(k){k.kind==="var"&&E(k)}}}},$0}var j0,RP;function x6(){return RP||(RP=1,j0={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(c){const s=c.options[0]&&c.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(u){s&&u.parent&&u.parent.type==="ExpressionStatement"||c.report({node:u,messageId:"noVoid"})}}}}),j0}var q0,FP;function O6(){if(FP)return q0;FP=1;const c=Zl(),s=Ze(),u=40;return q0={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(p){const a=p.sourceCode,d=p.options[0]||{},v=d.terms||["todo","fixme","xxx"],m=d.location||"start",o=[...d.decoration||[]].join(""),y=/\bno-warning-comments\b/u;function O(b){const S=c(b),E=c(o),k="\\b";let D="";m==="start"?D=`^[\\s${E}]*`:/^\w/u.test(b)&&(D=k);const T=/\w$/u.test(b)?k:"",R="iu";return new RegExp(`${D}${S}${T}`,R)}const x=v.map(O);function g(b){const S=[];return x.forEach((E,k)=>{E.test(b)&&S.push(v[k])}),S}function f(b){const S=b.value;if(s.isDirectiveComment(b)&&y.test(S))return;g(S).forEach(k=>{let D="",T=!1;for(const R of S.trim().split(/\s+/u)){const F=D?`${D} ${R}`:R;if(F.length<=u)D=F;else{T=!0;break}}p.report({node:b,messageId:"unexpectedComment",data:{matchedTerm:k,comment:`${D}${T?"...":""}`}})})}return{Program(){a.getAllComments().filter(S=>S.type!=="Shebang").forEach(f)}}}},q0}var Q0,_P;function S6(){if(_P)return Q0;_P=1;const c=Ze();return Q0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(s){const u=s.sourceCode;function p(a,d,v){s.report({node:a,messageId:"unexpectedWhitespace",data:{propName:u.getText(a.property)},fix(m){let o="";return!a.computed&&!a.optional&&c.isDecimalInteger(a.object)||u.commentsExistBetween(d,v)?null:(a.optional?o="?.":a.computed||(o="."),m.replaceTextRange([d.range[1],v.range[0]],o))}})}return{MemberExpression(a){let d,v;c.isTokenOnSameLine(a.object,a.property)&&(a.computed?(d=u.getTokenBefore(a.property,c.isOpeningBracketToken),v=u.getTokenBefore(d,a.optional?1:0)):(d=u.getFirstToken(a.property),v=u.getTokenBefore(d,1)),u.isSpaceBetweenTokens(v,d)&&p(a,v,d))}}}},Q0}var U0,BP;function E6(){return BP||(BP=1,U0={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(c){return{WithStatement(s){c.report({node:s,messageId:"unexpectedWith"})}}}}),U0}var V0,LP;function C6(){if(LP)return V0;LP=1;const c={enum:["beside","below","any"]};return V0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[c,{properties:{overrides:{properties:{if:c,else:c,while:c,do:c,for:c},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(s){const u=s.sourceCode;function p(d){return s.options[1]&&s.options[1].overrides&&s.options[1].overrides[d]||s.options[0]||"beside"}function a(d,v){const m=p(v);if(d.type==="BlockStatement"||m==="any")return;const o=u.getTokenBefore(d);o.loc.end.line===d.loc.start.line&&m==="below"?s.report({node:d,messageId:"expectLinebreak",fix:y=>y.insertTextBefore(d,` +`)}):o.loc.end.line!==d.loc.start.line&&m==="beside"&&s.report({node:d,messageId:"expectNoLinebreak",fix(y){return u.getText().slice(o.range[1],d.range[0]).trim()?null:y.replaceTextRange([o.range[1],d.range[0]]," ")}})}return{IfStatement(d){a(d.consequent,"if"),d.alternate&&d.alternate.type!=="IfStatement"&&a(d.alternate,"else")},WhileStatement:d=>a(d.body,"while"),DoWhileStatement:d=>a(d.body,"do"),ForStatement:d=>a(d.body,"for"),ForInStatement:d=>a(d.body,"for"),ForOfStatement:d=>a(d.body,"for")}}},V0}var W0,NP;function w6(){if(NP)return W0;NP=1;const c=Ze(),s={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function u(m){let o=!1,y=Number.POSITIVE_INFINITY,O=!1;return m?m==="always"?y=0:m==="never"?y=Number.POSITIVE_INFINITY:(o=!!m.multiline,y=m.minProperties||Number.POSITIVE_INFINITY,O=!!m.consistent):O=!0,{multiline:o,minProperties:y,consistent:O}}function p(m){return typeof m=="object"&&m!==null}function a(m){return p(m)||typeof m=="string"}function d(m){if(p(m)&&Object.values(m).some(a))return{ObjectExpression:u(m.ObjectExpression),ObjectPattern:u(m.ObjectPattern),ImportDeclaration:u(m.ImportDeclaration),ExportNamedDeclaration:u(m.ExportDeclaration)};const o=u(m);return{ObjectExpression:o,ObjectPattern:o,ImportDeclaration:o,ExportNamedDeclaration:o}}function v(m,o,y,O){let x;return m.type==="ObjectExpression"||m.type==="ObjectPattern"?x=m.properties:x=m.specifiers.filter(g=>g.type==="ImportSpecifier"||g.type==="ExportSpecifier"),x.length>=o.minProperties||o.multiline&&x.length>0&&y.loc.start.line!==O.loc.end.line}return W0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[s,{type:"object",properties:{ObjectExpression:s,ObjectPattern:s,ImportDeclaration:s,ExportDeclaration:s},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(m){const o=m.sourceCode,y=d(m.options[0]);function O(x){const g=y[x.type];if(x.type==="ImportDeclaration"&&!x.specifiers.some(R=>R.type==="ImportSpecifier")||x.type==="ExportNamedDeclaration"&&!x.specifiers.some(R=>R.type==="ExportSpecifier"))return;const f=o.getFirstToken(x,R=>R.value==="{");let b;x.typeAnnotation?b=o.getTokenBefore(x.typeAnnotation):b=o.getLastToken(x,R=>R.value==="}");let S=o.getTokenAfter(f,{includeComments:!0}),E=o.getTokenBefore(b,{includeComments:!0});const k=v(x,g,S,E),D=c.isCommentToken(S),T=c.isCommentToken(E);if(S=o.getTokenAfter(f),E=o.getTokenBefore(b),k)c.isTokenOnSameLine(f,S)&&m.report({messageId:"expectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(R){return D?null:R.insertTextAfter(f,` +`)}}),c.isTokenOnSameLine(E,b)&&m.report({messageId:"expectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(R){return T?null:R.insertTextBefore(b,` +`)}});else{const R=g.consistent,F=!c.isTokenOnSameLine(f,S),P=!c.isTokenOnSameLine(E,b);(!R&&F||R&&F&&!P)&&m.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:x,loc:f.loc,fix(N){return D?null:N.removeRange([f.range[1],S.range[0]])}}),(!R&&P||R&&!F&&P)&&m.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:x,loc:b.loc,fix(N){return T?null:N.removeRange([E.range[1],b.range[0]])}})}}return{ObjectExpression:O,ObjectPattern:O,ImportDeclaration:O,ExportNamedDeclaration:O}}},W0}var G0,MP;function k6(){if(MP)return G0;MP=1;const c=Ze();return G0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(s){const u=s.options[0]==="always",p=s.sourceCode;function a(S){return s.options[1]?s.options[1][S]===!u:!1}const d={spaced:u,arraysInObjectsException:a("arraysInObjects"),objectsInObjectsException:a("objectsInObjects")};function v(S,E){const k=s.sourceCode.getTokenAfter(E,{includeComments:!0});s.report({node:S,loc:{start:E.loc.end,end:k.loc.start},messageId:"unexpectedSpaceAfter",data:{token:E.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function m(S,E){const k=s.sourceCode.getTokenBefore(E,{includeComments:!0});s.report({node:S,loc:{start:k.loc.end,end:E.loc.start},messageId:"unexpectedSpaceBefore",data:{token:E.value},fix(D){return D.removeRange([k.range[1],E.range[0]])}})}function o(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceAfter",data:{token:E.value},fix(k){return k.insertTextAfter(E," ")}})}function y(S,E){s.report({node:S,loc:E.loc,messageId:"requireSpaceBefore",data:{token:E.value},fix(k){return k.insertTextBefore(E," ")}})}function O(S,E,k,D,T){if(c.isTokenOnSameLine(E,k)){const R=p.isSpaceBetweenTokens(E,k);d.spaced&&!R&&o(S,E),!d.spaced&&R&&k.type!=="Line"&&v(S,E)}if(c.isTokenOnSameLine(D,T)){const F=(d.arraysInObjectsException&&c.isClosingBracketToken(D)||d.objectsInObjectsException&&c.isClosingBraceToken(D))&&p.getNodeByRangeIndex(D.range[0]).type,P=d.arraysInObjectsException&&F==="ArrayExpression"||d.objectsInObjectsException&&(F==="ObjectExpression"||F==="ObjectPattern")?!d.spaced:d.spaced,N=p.isSpaceBetweenTokens(D,T);P&&!N&&y(S,T),!P&&N&&m(S,T)}}function x(S){const E=S.properties.at(-1);return p.getTokenAfter(E,c.isClosingBraceToken)}function g(S){if(S.properties.length===0)return;const E=p.getFirstToken(S),k=x(S),D=p.getTokenAfter(E,{includeComments:!0}),T=p.getTokenBefore(k,{includeComments:!0});O(S,E,D,T,k)}function f(S){if(S.specifiers.length===0)return;let E=S.specifiers[0];const k=S.specifiers.at(-1);if(k.type!=="ImportSpecifier")return;E.type!=="ImportSpecifier"&&(E=S.specifiers[1]);const D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}function b(S){if(S.specifiers.length===0)return;const E=S.specifiers[0],k=S.specifiers.at(-1),D=p.getTokenBefore(E),T=p.getTokenAfter(k,c.isNotCommaToken),R=p.getTokenAfter(D,{includeComments:!0}),F=p.getTokenBefore(T,{includeComments:!0});O(S,D,R,F,T)}return{ObjectPattern:g,ObjectExpression:g,ImportDeclaration:f,ExportNamedDeclaration:b}}},G0}var z0,$P;function A6(){return $P||($P=1,z0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(c){const s=c.options[0]&&(c.options[0].allowAllPropertiesOnSameLine||c.options[0].allowMultiplePropertiesPerLine),u=s?"propertiesOnNewlineAll":"propertiesOnNewline",p=c.sourceCode;return{ObjectExpression(a){if(s&&a.properties.length>1){const d=p.getFirstToken(a.properties[0]),v=p.getLastToken(a.properties.at(-1));if(d.loc.end.line===v.loc.start.line)return}for(let d=1;d0){const te=K.filter(T);te.length!==K.length&&(te.length>0?u.report({node:$,messageId:"unexpectedMix"}):W&&K.every(R)&&u.report({node:$,messageId:"expectedAllPropertiesShorthanded"}))}}function P($,W){const K=W.computed?b.getFirstToken(W,s.isOpeningBracketToken):b.getFirstToken(W.key),te=W.computed?b.getFirstTokenBetween(W.key,W.value,s.isClosingBracketToken):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="";if(b.commentsExistBetween(te,W.value))return null;W.value.async&&(ae+="async "),W.value.generator&&(ae+="*");const z=[K.range[0],W.range[1]],ue=ae+V;if(W.value.type==="FunctionExpression"){const Se=b.getTokens(W.value).find(Me=>Me.type==="Keyword"&&Me.value==="function"),we=W.value.generator?b.getTokenAfter(Se):Se;return $.replaceTextRange(z,ue+b.text.slice(we.range[1],W.value.range[1]))}const ne=b.getTokenBefore(W.value.body,s.isArrowToken),ce=b.text.slice(ne.range[1],W.value.range[1]),Be=b.getFirstToken(W.value,{skip:W.value.async?1:0}).range[0],oe=b.getTokenBefore(ne).range[1],Z=W.value.params.length===1&&W.value.params[0].range[0]===Be,ge=b.text.slice(Be,oe),Re=Z?`(${ge})`:ge;return $.replaceTextRange(z,ue+Re+ce)}function N($,W){const K=W.computed?b.getTokens(W).find(z=>z.value==="["):b.getFirstToken(W.key),te=W.computed?b.getTokensBetween(W.key,W.value).find(z=>z.value==="]"):b.getLastToken(W.key),V=b.text.slice(K.range[0],te.range[1]);let ae="function";return W.value.async&&(ae=`async ${ae}`),W.value.generator&&(ae=`${ae}*`),$.replaceTextRange([W.range[0],te.range[1]],`${V}: ${ae}`)}const I=[],L=new WeakSet,j=new WeakSet;function G($){I.unshift(new Set),b.getScope($).variables.filter(W=>W.name==="arguments").forEach(W=>{W.references.map(K=>K.identifier).forEach(K=>j.add(K))})}function U(){I.shift()}function Q(){I[0].forEach($=>L.add($))}return{Program:G,FunctionDeclaration:G,FunctionExpression:G,"Program:exit":U,"FunctionDeclaration:exit":U,"FunctionExpression:exit":U,ArrowFunctionExpression($){I[0].add($)},"ArrowFunctionExpression:exit"($){I[0].delete($)},ThisExpression:Q,Super:Q,MetaProperty($){$.meta.name==="new"&&$.property.name==="target"&&Q()},Identifier($){j.has($)&&Q()},ObjectExpression($){m?F($,!1):o&&F($,!0)},"Property:exit"($){const W=$.method||$.shorthand;if($.parent.type!=="ObjectPattern"&&!($.kind==="get"||$.kind==="set")&&!($.computed&&$.value.type!=="FunctionExpression"&&$.value.type!=="ArrowFunctionExpression")){if(W)if($.method&&(v||g&&D($.key))){const K=v?"expectedMethodLongform":"expectedLiteralMethodLongform";u.report({node:$,messageId:K,fix:te=>N(te,$)})}else v&&u.report({node:$,messageId:"expectedPropertyLongform",fix:K=>K.insertTextAfter($.key,`: ${$.key.name}`)});else if(a&&!$.value.id&&($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression")){if(O&&$.key.type==="Identifier"&&E($.key.name))return;if(x){const K=s.getStaticPropertyName($);if(K!==null&&x.test(K))return}if(g&&D($.key))return;($.value.type==="FunctionExpression"||$.value.type==="ArrowFunctionExpression"&&$.value.body.type==="BlockStatement"&&f&&!L.has($.value))&&u.report({node:$,messageId:"expectedMethodShorthand",fix:K=>P(K,$)})}else if($.value.type==="Identifier"&&$.key.name===$.value.name&&d)u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}});else if($.value.type==="Identifier"&&$.key.type==="Literal"&&$.key.value===$.value.name&&d){if(g)return;u.report({node:$,messageId:"expectedPropertyShorthand",fix(K){return b.getCommentsInside($).length>0?null:K.replaceText($,$.value.name)}})}}}}}},Z0}var X0,qP;function T6(){if(qP)return X0;qP=1;const c=Ze();function s(u){return c.STATEMENT_LIST_PARENTS.has(u.parent.type)}return X0={meta:{type:"suggestion",docs:{description:"Enforce variables to be declared either together or separately in functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var"},fixable:"code",schema:[{oneOf:[{enum:["always","never","consecutive"]},{type:"object",properties:{separateRequires:{type:"boolean"},var:{enum:["always","never","consecutive"]},let:{enum:["always","never","consecutive"]},const:{enum:["always","never","consecutive"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never","consecutive"]},uninitialized:{enum:["always","never","consecutive"]}},additionalProperties:!1}]}],messages:{combineUninitialized:"Combine this with the previous '{{type}}' statement with uninitialized variables.",combineInitialized:"Combine this with the previous '{{type}}' statement with initialized variables.",splitUninitialized:"Split uninitialized '{{type}}' declarations into multiple statements.",splitInitialized:"Split initialized '{{type}}' declarations into multiple statements.",splitRequires:"Split requires to be separated into a single block.",combine:"Combine this with the previous '{{type}}' statement.",split:"Split '{{type}}' declarations into multiple statements."}},create(u){const p="always",a="never",d="consecutive",v=u.options[0]||p,m={};typeof v=="string"?(m.var={uninitialized:v,initialized:v},m.let={uninitialized:v,initialized:v},m.const={uninitialized:v,initialized:v}):typeof v=="object"&&(m.separateRequires=!!v.separateRequires,m.var={uninitialized:v.var,initialized:v.var},m.let={uninitialized:v.let,initialized:v.let},m.const={uninitialized:v.const,initialized:v.const},Object.hasOwn(v,"uninitialized")&&(m.var.uninitialized=v.uninitialized,m.let.uninitialized=v.uninitialized,m.const.uninitialized=v.uninitialized),Object.hasOwn(v,"initialized")&&(m.var.initialized=v.initialized,m.let.initialized=v.initialized,m.const.initialized=v.initialized));const o=u.sourceCode,y=[],O=[];function x(){O.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function g(){y.push({initialized:!1,uninitialized:!1}),x()}function f(){O.pop()}function b(){y.pop(),f()}function S(N){return N.init&&N.init.type==="CallExpression"&&N.init.callee.name==="require"}function E(N,I,L){for(let j=0;j0&&j.uninitialized===p&&G.uninitialized||L.initialized>0&&j.initialized===p&&G.initialized&&!U||G.required&&U?!1:(E(N,I,G),!0)}function R(N){const I=N[0],L=Array.isArray(I.parent.parent.body)?I.parent.parent.body:[],j=L.findIndex(U=>U.range[0]===I.parent.range[0]),G=L[j-1];return U=>{const Q=o.getTokenBefore(I),$=o.getTokenBefore(Q),W=[];return G&&G.kind===o.getText(Q)&&($.value===";"?W.push(U.replaceText($,",")):W.push(U.insertTextAfter($,",")),W.push(U.replaceText(Q,""))),W}}function F(N){const{parent:I}=N;return s(I.type==="ExportNamedDeclaration"?I:N)?L=>N.declarations.map(j=>{const G=o.getTokenAfter(j);if(G===null)return null;const U=o.getTokenAfter(G,{includeComments:!0});if(G.value!==",")return null;const Q=N.parent.type==="ExportNamedDeclaration"?"export ":"";if(U.range[0]===G.range[1])return L.replaceText(G,`; ${Q}${N.kind} `);if(U.loc.start.line>G.loc.end.line||U.type==="Line"||U.type==="Block"){let $=U;for(;$.type==="Line"||$.type==="Block";)$=o.getTokenAfter($,{includeComments:!0});return L.replaceTextRange([G.range[0],$.range[0]],`;${o.text.slice(G.range[1],$.range[0])}${Q}${N.kind} `)}return L.replaceText(G,`; ${Q}${N.kind}`)}).filter(j=>j):null}function P(N){const I=N.parent,L=N.kind;if(!m[L])return;const j=N.declarations,G=D(j),U=j.some(S)&&!j.every(S);m[L].initialized===p&&m.separateRequires&&U&&u.report({node:N,messageId:"splitRequires"});const Q=I.body&&I.body.length>0&&I.body.indexOf(N)||0;if(Q>0){const $=I.body[Q-1],W=$.type==="VariableDeclaration",K=j.concat($.declarations||[]);if(W&&$.kind===L&&!(K.some(S)&&!K.every(S))){const te=D($.declarations);m[L].initialized===d&&m[L].uninitialized===d?u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)}):m[L].initialized===d&&G.initialized>0&&te.initialized>0?u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}):m[L].uninitialized===d&&G.uninitialized>0&&te.uninitialized>0&&u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}if(!T(L,j)){if(m[L].initialized===p&&m[L].uninitialized===p)u.report({node:N,messageId:"combine",data:{type:L},fix:R(j)});else if(m[L].initialized===p&&G.initialized>0&&u.report({node:N,messageId:"combineInitialized",data:{type:L},fix:R(j)}),m[L].uninitialized===p&&G.uninitialized>0){if(N.parent.left===N&&(N.parent.type==="ForInStatement"||N.parent.type==="ForOfStatement"))return;u.report({node:N,messageId:"combineUninitialized",data:{type:L},fix:R(j)})}}(I.type!=="ForStatement"||I.init!==N)&&G.uninitialized+G.initialized>1&&(m[L].initialized===a&&m[L].uninitialized===a?u.report({node:N,messageId:"split",data:{type:L},fix:F(N)}):m[L].initialized===a&&G.initialized>0?u.report({node:N,messageId:"splitInitialized",data:{type:L},fix:F(N)}):m[L].uninitialized===a&&G.uninitialized>0&&u.report({node:N,messageId:"splitUninitialized",data:{type:L},fix:F(N)}))}return{Program:g,FunctionDeclaration:g,FunctionExpression:g,ArrowFunctionExpression:g,StaticBlock:g,BlockStatement:x,ForStatement:x,ForInStatement:x,ForOfStatement:x,SwitchStatement:x,VariableDeclaration:P,"ForStatement:exit":f,"ForOfStatement:exit":f,"ForInStatement:exit":f,"SwitchStatement:exit":f,"BlockStatement:exit":f,"Program:exit":b,"FunctionDeclaration:exit":b,"FunctionExpression:exit":b,"ArrowFunctionExpression:exit":b,"StaticBlock:exit":b}}},X0}var Y0,QP;function D6(){return QP||(QP=1,Y0={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(c){const s=c.options[0]==="always";function u(a){return a==="ForStatement"||a==="ForInStatement"||a==="ForOfStatement"}function p(a){if(u(a.parent.type))return;const d=a.declarations;let v;d.forEach(m=>{v&&v.loc.end.line===m.loc.start.line&&(s||v.init||m.init)&&c.report({node:a,messageId:"expectVarOnNewline",loc:m.loc,fix:o=>o.insertTextBefore(m,` +`)}),v=m})}return{VariableDeclaration:p}}}),Y0}var H0,UP;function I6(){if(UP)return H0;UP=1;const c=Ze();function s(a){return["*","&","^","|"].includes(a)}function u(a){return["+","-","/","%","<<",">>",">>>","**"].includes(a)}function p(a){return a.type==="Identifier"||a.type==="MemberExpression"&&(a.object.type==="Identifier"||a.object.type==="ThisExpression")&&(!a.computed||a.property.type==="Literal")}return H0={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(a){const d=a.sourceCode;function v(y){return d.getFirstTokenBetween(y.left,y.right,O=>O.value===y.operator)}function m(y){if(y.operator!=="="||y.right.type!=="BinaryExpression")return;const O=y.left,x=y.right,g=x.operator;if(s(g)||u(g)){const f=`${g}=`;c.isSameReference(O,x.left,!0)?a.report({node:y,messageId:"replaced",data:{operator:f},fix(b){if(p(O)&&p(x.left)){const S=v(y),E=v(x),k=d.getText().slice(y.range[0],S.range[0]),D=d.getText().slice(E.range[1],y.right.range[1]);return d.commentsExistBetween(S,E)?null:b.replaceText(y,`${k}${f}${D}`)}return null}}):c.isSameReference(O,x.right,!0)&&s(g)&&a.report({node:y,messageId:"replaced",data:{operator:f}})}}function o(y){y.operator!=="="&&!c.isLogicalAssignmentOperator(y.operator)&&a.report({node:y,messageId:"unexpected",data:{operator:y.operator},fix(O){if(p(y.left)){const x=d.getFirstToken(y),g=v(y),f=d.getText().slice(y.range[0],g.range[0]),b=y.operator.slice(0,-1);let S;if(d.commentsExistBetween(x,g))return null;if(c.getPrecedence(y.right)<=c.getPrecedence({type:"BinaryExpression",operator:b})&&!c.isParenthesised(d,y.right))S=`${d.text.slice(g.range[1],y.right.range[0])}(${d.getText(y.right)})`;else{const E=d.getTokenAfter(g,{includeComments:!0});let k="";g.range[1]===E.range[0]&&!c.canTokensBeAdjacent({type:"Punctuator",value:b},E)&&(k=" "),S=`${k}${d.text.slice(g.range[1],y.range[1])}`}return O.replaceText(y,`${f}= ${f}${b}${S}`)}return null}})}return{AssignmentExpression:a.options[0]!=="never"?m:o}}},H0}var K0,VP;function R6(){if(VP)return K0;VP=1;const c=Ze();return K0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(s){const u=!s.options[0],p=s.options[0]||"after",a=s.options[1]||{},d=a.overrides?Object.assign({},a.overrides):{};u&&!d["?"]&&(d["?"]="before"),u&&!d[":"]&&(d[":"]="before");const v=s.sourceCode;function m(O,x){return g=>{const f=v.getTokenBefore(O),b=v.getTokenAfter(O),S=v.text.slice(f.range[1],O.range[0]),E=v.text.slice(O.range[1],b.range[0]),k=!c.isTokenOnSameLine(f,O),D=!c.isTokenOnSameLine(O,b);let T,R;if(k!==D&&x!=="none"){if(v.getTokenBefore(O,{includeComments:!0})!==f&&v.getTokenAfter(O,{includeComments:!0})!==b)return null;T=E,R=S}else{const F=c.createGlobalLinebreakMatcher();if(T=x==="before"||S.trim()?S:S.replace(F,""),R=x==="after"||E.trim()?E:E.replace(F,""),T===S&&R===E)return null}return R===""&&b.type==="Punctuator"&&"+-".includes(O.value)&&b.value===O.value&&(R+=" "),g.replaceTextRange([f.range[1],b.range[0]],T+O.value+R)}}function o(O,x,g){const f=v.getTokenBefore(x,T=>T.value===g),b=v.getTokenBefore(f),S=v.getTokenAfter(f),E=d[g],k=E||p,D=m(f,k);c.isTokenOnSameLine(b,f)&&c.isTokenOnSameLine(f,S)||(E!=="ignore"&&!c.isTokenOnSameLine(b,f)&&!c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"badLinebreak",data:{operator:g},fix:D}):k==="before"&&c.isTokenOnSameLine(b,f)?s.report({node:O,loc:f.loc,messageId:"operatorAtBeginning",data:{operator:g},fix:D}):k==="after"&&c.isTokenOnSameLine(f,S)?s.report({node:O,loc:f.loc,messageId:"operatorAtEnd",data:{operator:g},fix:D}):k==="none"&&s.report({node:O,loc:f.loc,messageId:"noLinebreak",data:{operator:g},fix:D}))}function y(O){o(O,O.right,O.operator)}return{BinaryExpression:y,LogicalExpression:y,AssignmentExpression:y,VariableDeclarator(O){O.init&&o(O,O.init,"=")},PropertyDefinition(O){O.value&&o(O,O.value,"=")},ConditionalExpression(O){o(O,O.consequent,"?"),o(O,O.alternate,":")}}}},K0}var J0,WP;function F6(){if(WP)return J0;WP=1;const c=Ze();return J0={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(s){const u={},p=s.options[0]||"always",a=s.options[1]||{};if(typeof p=="string"){const b=p==="always";u.blocks=b,u.switches=b,u.classes=b}else Object.hasOwn(p,"blocks")&&(u.blocks=p.blocks==="always"),Object.hasOwn(p,"switches")&&(u.switches=p.switches==="always"),Object.hasOwn(p,"classes")&&(u.classes=p.classes==="always");Object.hasOwn(a,"allowSingleLineBlocks")&&(u.allowSingleLineBlocks=a.allowSingleLineBlocks===!0);const d=s.sourceCode;function v(b){return b.type==="SwitchStatement"?d.getTokenBefore(b.cases[0]):b.type==="StaticBlock"?d.getFirstToken(b,{skip:1}):d.getFirstToken(b)}function m(b){return b.type==="Line"||b.type==="Block"}function o(b,S){return S.loc.start.line-b.loc.end.line>=2}function y(b){let S,E=b;do S=E,E=d.getTokenAfter(E,{includeComments:!0});while(m(E)&&E.loc.start.line===S.loc.end.line);return E}function O(b){let S=b,E;do E=S,S=d.getTokenBefore(S,{includeComments:!0});while(m(S)&&S.loc.end.line===E.loc.start.line);return S}function x(b){switch(b.type){case"BlockStatement":case"StaticBlock":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function g(b){const S=v(b),E=y(S),k=d.getTokenBefore(E,{includeComments:!0}),D=d.getLastToken(b),T=O(D),R=d.getTokenAfter(T,{includeComments:!0}),F=o(k,E),P=o(T,R);u.allowSingleLineBlocks&&c.isTokenOnSameLine(k,R)||(x(b)?(F||s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.insertTextAfter(k,` +`)},messageId:"alwaysPadBlock"}),P||s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},fix(N){return N.insertTextBefore(R,` +`)},messageId:"alwaysPadBlock"})):(F&&s.report({node:b,loc:{start:k.loc.start,end:E.loc.start},fix(N){return N.replaceTextRange([k.range[1],E.range[0]-E.loc.start.column],` +`)},messageId:"neverPadBlock"}),P&&s.report({node:b,loc:{end:R.loc.start,start:T.loc.end},messageId:"neverPadBlock",fix(N){return N.replaceTextRange([T.range[1],R.range[0]-R.loc.start.column],` +`)}})))}const f={};return Object.hasOwn(u,"switches")&&(f.SwitchStatement=function(b){b.cases.length!==0&&g(b)}),Object.hasOwn(u,"blocks")&&(f.BlockStatement=function(b){b.body.length!==0&&g(b)},f.StaticBlock=f.BlockStatement),Object.hasOwn(u,"classes")&&(f.ClassBody=function(b){b.body.length!==0&&g(b)}),f}},J0}var ey,GP;function _6(){if(GP)return ey;GP=1;const c=Ze(),s=`[${Array.from(c.LINEBREAKS).join("")}]`,u=new RegExp(String.raw`^(\s*?${s})\s*${s}(\s*;?)$`,"u"),p=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,a=/^require\(/u;function d(D){return{test:(T,R)=>R.getFirstToken(T).value===D}}function v(D){return{test:(T,R)=>T.loc.start.line===T.loc.end.line&&R.getFirstToken(T).value===D}}function m(D){return{test:(T,R)=>T.loc.start.line!==T.loc.end.line&&R.getFirstToken(T).value===D}}function o(D){return{test:T=>T.type===D}}function y(D){if(D.type==="ExpressionStatement"){let T=c.skipChainExpression(D.expression);return T.type==="UnaryExpression"&&(T=c.skipChainExpression(T.argument)),T.type==="CallExpression"&&c.isFunction(T.callee)}return!1}function O(D,T){if(T.type==="DoWhileStatement"&&T.body.type==="BlockStatement"||y(T))return!0;const R=D.getLastToken(T,c.isNotSemicolonToken),F=R&&c.isClosingBraceToken(R)?D.getNodeByRangeIndex(R.range[0]):null;return!!F&&(F.type==="BlockStatement"||F.type==="SwitchStatement")}function x(D,T){const R=D.getLastToken(T),F=D.getTokenBefore(R),P=D.getTokenAfter(R);return!!(F&&P&&F.range[0]>=T.range[0]&&c.isSemicolonToken(R)&&R.loc.start.line!==F.loc.end.line&&R.loc.end.line===P.loc.start.line)?F:R}function g(D,T,R){return T+R}function f(){}function b(D,T,R,F){F.length!==0&&D.report({node:R,messageId:"unexpectedBlankLine",fix(P){if(F.length>=2)return null;const N=F[0][0],I=F[0][1],L=N.range[1],j=I.range[0],G=D.sourceCode.text.slice(L,j).replace(u,g);return P.replaceTextRange([L,j],G)}})}function S(D,T,R,F){F.length>0||D.report({node:R,messageId:"expectedBlankLine",fix(P){const N=D.sourceCode;let I=x(N,T);const L=N.getFirstTokenBetween(I,R,{includeComments:!0,filter(G){return c.isTokenOnSameLine(I,G)?(I=G,!1):!0}})||R,j=c.isTokenOnSameLine(I,L)?` + +`:` +`;return P.insertTextAfter(I,j)}})}const E={any:{verify:f},never:{verify:b},always:{verify:S}},k={"*":{test:()=>!0},"block-like":{test:(D,T)=>O(T,D)},"cjs-export":{test:(D,T)=>D.type==="ExpressionStatement"&&D.expression.type==="AssignmentExpression"&&p.test(T.getText(D.expression.left))},"cjs-import":{test:(D,T)=>D.type==="VariableDeclaration"&&D.declarations.length>0&&!!D.declarations[0].init&&a.test(T.getText(D.declarations[0].init))},directive:{test:c.isDirective},expression:{test:D=>D.type==="ExpressionStatement"&&!c.isDirective(D)},iife:{test:y},"multiline-block-like":{test:(D,T)=>D.loc.start.line!==D.loc.end.line&&O(T,D)},"multiline-expression":{test:D=>D.loc.start.line!==D.loc.end.line&&D.type==="ExpressionStatement"&&!c.isDirective(D)},"multiline-const":m("const"),"multiline-let":m("let"),"multiline-var":m("var"),"singleline-const":v("const"),"singleline-let":v("let"),"singleline-var":v("var"),block:o("BlockStatement"),empty:o("EmptyStatement"),function:o("FunctionDeclaration"),break:d("break"),case:d("case"),class:d("class"),const:d("const"),continue:d("continue"),debugger:d("debugger"),default:d("default"),do:d("do"),export:d("export"),for:d("for"),if:d("if"),import:d("import"),let:d("let"),return:d("return"),switch:d("switch"),throw:d("throw"),try:d("try"),var:d("var"),while:d("while"),with:d("with")};return ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(E)},statementType:{anyOf:[{enum:Object.keys(k)},{type:"array",items:{enum:Object.keys(k)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(D){const T=D.sourceCode,R=D.options||[];let F=null;function P(){F={upper:F,prevNode:null}}function N(){F=F.upper}function I(Q,$){let W=Q;for(;W.type==="LabeledStatement";)W=W.body;return Array.isArray($)?$.some(I.bind(null,W)):k[$].test(W,T)}function L(Q,$){for(let W=R.length-1;W>=0;--W){const K=R[W];if(I(Q,K.prev)&&I($,K.next))return E[K.blankLine]}return E.any}function j(Q,$){const W=[];let K=x(T,Q);if($.loc.start.line-K.loc.end.line>=2)do{const te=T.getTokenAfter(K,{includeComments:!0});te.loc.start.line-K.loc.end.line>=2&&W.push([K,te]),K=te}while(K.range[0]<$.range[0]);return W}function G(Q){const $=Q.parent.type;if(!(c.STATEMENT_LIST_PARENTS.has($)||$==="SwitchStatement"))return;const K=F.prevNode;if(K){const te=L(K,Q),V=j(K,Q);te.verify(D,K,Q,V)}F.prevNode=Q}function U(Q){G(Q),P()}return{Program:P,BlockStatement:P,SwitchStatement:P,StaticBlock:P,"Program:exit":N,"BlockStatement:exit":N,"SwitchStatement:exit":N,"StaticBlock:exit":N,":statement":G,SwitchCase:U,"SwitchCase:exit":N}}},ey}var ty,zP;function B6(){if(zP)return ty;zP=1;const c=Ze();function s(v){return v&&v.defs[0].type==="FunctionName"}function u(v,m,o){return v.meta.name===m&&v.property.name===o}function p(v){const m=v.variables;for(let o=0;om.type==="Identifier")&&v.length!==new Set(v.map(m=>m.name)).size}return ty={meta:{type:"suggestion",docs:{description:"Require using arrow functions for callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-arrow-callback"},schema:[{type:"object",properties:{allowNamedFunctions:{type:"boolean",default:!1},allowUnboundThis:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{preferArrowCallback:"Unexpected function expression."}},create(v){const m=v.options[0]||{},o=m.allowUnboundThis!==!1,y=m.allowNamedFunctions,O=v.sourceCode;let x=[];function g(){x.push({this:!1,super:!1,meta:!1})}function f(){return x.pop()}return{Program(){x=[]},ThisExpression(){const b=x.at(-1);b&&(b.this=!0)},Super(){const b=x.at(-1);b&&(b.super=!0)},MetaProperty(b){const S=x.at(-1);S&&u(b,"new","target")&&(S.meta=!0)},FunctionDeclaration:g,"FunctionDeclaration:exit":f,FunctionExpression:g,"FunctionExpression:exit"(b){const S=f();if(y&&b.id&&b.id.name||b.generator)return;const E=O.getDeclaredVariables(b)[0];if(s(E)&&E.references.length>0)return;const k=p(O.getScope(b));if(k&&k.references.length>0)return;const D=a(b);D.isCallback&&(!o||!S.this||D.isLexicalThis)&&!S.super&&!S.meta&&v.report({node:b,messageId:"preferArrowCallback",*fix(T){if(!D.isLexicalThis&&S.this||d(b.params))return;if(D.isLexicalThis){const I=b.parent;if(I.type!=="MemberExpression")return;const L=I.parent,j=O.getTokenAfter(I.object,c.isNotClosingParenToken),G=O.getLastToken(L);if(c.isParenthesised(O,I)||O.commentsExistBetween(j,G))return;yield T.removeRange([j.range[0],G.range[1]])}const R=O.getFirstToken(b,b.async?1:0),F=O.getTokenAfter(R,c.isOpeningParenToken),P=O.getTokenBefore(b.body);O.commentsExistBetween(R,F)?(yield T.remove(R),b.id&&(yield T.remove(b.id))):yield T.removeRange([R.range[0],F.range[0]]),yield T.insertTextAfter(P," =>");let N=D.isLexicalThis?b.parent.parent:b;N.type==="ChainExpression"&&(N=N.parent),N.parent.type!=="CallExpression"&&N.parent.type!=="ConditionalExpression"&&!c.isParenthesised(O,N)&&!c.isParenthesised(O,b)&&(yield T.insertTextBefore(N,"("),yield T.insertTextAfter(N,")"))}})}}}},ty}var ry,ZP;function L6(){if(ZP)return ry;ZP=1;const c=Oo(),s=Ze(),u=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,p=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,a=/^(?:VariableDeclarator|AssignmentExpression)$/u;function d(f){return f.parent.type==="ForStatement"&&f.parent.init===f}function v(f){let b=f.parent;for(;u.test(b.type);)b=b.parent;return b.type==="VariableDeclarator"||b.type==="AssignmentExpression"&&b.parent.type==="ExpressionStatement"&&p.test(b.parent.parent.type)}function m(f,b){if(b.through.some(E=>E.resolved&&E.resolved.name===f))return!0;const S=s.getVariableByName(b,f);return S!==null?S.defs.some(E=>E.type==="Parameter"):!1}function o(f){if(!f.isWrite())return null;let b=f.identifier.parent;for(;u.test(b.type);)b=b.parent;return a.test(b.type)?b:null}function y(f){switch(f.type){case"ObjectPattern":return f.properties.some(b=>b?y(b.argument||b.value):!1);case"ArrayPattern":return f.elements.some(b=>b?y(b):!1);case"AssignmentPattern":return y(f.left);case"MemberExpression":return!0}return!1}function O(f,b){if(f.eslintUsed&&f.scope.type==="global")return null;let S=null,E=!1;const k=f.references;for(let T=0;TG.value).map(G=>G.value.name).some(G=>m(G,f.scope)),L=y(N)):N.type==="ArrayPattern"&&(I=N.elements.map(G=>G&&G.name).some(G=>m(G,f.scope)),L=y(N)),I||L)return null}S=R}else if(R.isRead()&&S===null){if(b)return null;E=!0}}return S!==null&&S.from===f.scope&&v(S.identifier)?E?f.defs[0].name:S.identifier:null}function x(f,b){const S=new Map;for(let E=0;EU.type.endsWith("Statement")),j=L===null;if(!j&&L.declarations.length>0){const U=L.declarations[0];if(U.init){const Q=U.init.parent;Q.type==="VariableDeclarator"&&(Q.id.name!==F&&(F=Q.id.name,T=0),Q.id.type==="ObjectPattern"&&Q.init.name!==F&&(F=Q.init.name,T=0),Q.id!==R&&(R=Q.id,T=0))}}let G=L&&(L.parent.type==="ForInStatement"||L.parent.type==="ForOfStatement"||L.declarations.every(U=>U.init))&&I.length===N.length;if(!j&&L.declarations&&L.declarations.length!==1&&L&&L.declarations&&L.declarations.length>=1){T+=I.length;let U=0;L.declarations.forEach(Q=>{Q.id.type==="ObjectPattern"?U+=Q.id.properties.length:Q.id.type==="ArrayPattern"?U+=Q.id.elements.length:U+=1}),G=G&&T===U}I.forEach(U=>{f.report({node:U,messageId:"useConst",data:U,fix:G?Q=>{const $=S.getFirstToken(L,W=>W.value===L.kind);return new c(Q,S).retainRange(L.range).replaceTextRange($.range,"const")}:null})})}}return{"Program:exit"(){x(D,k).forEach(P)},VariableDeclaration(N){N.kind==="let"&&!d(N)&&D.push(...S.getDeclaredVariables(N))}}}},ry}var ny,XP;function N6(){if(XP)return ny;XP=1;const c=Ze(),s=c.getPrecedence({type:"AssignmentExpression"});return ny={meta:{type:"suggestion",docs:{description:"Require destructuring from arrays and/or objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-destructuring"},fixable:"code",schema:[{oneOf:[{type:"object",properties:{VariableDeclarator:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1},AssignmentExpression:{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{array:{type:"boolean"},object:{type:"boolean"}},additionalProperties:!1}]},{type:"object",properties:{enforceForRenamedProperties:{type:"boolean"}},additionalProperties:!1}],messages:{preferDestructuring:"Use {{type}} destructuring."}},create(u){const p=u.options[0],a=u.options[1]&&u.options[1].enforceForRenamedProperties;let d={VariableDeclarator:{array:!0,object:!0},AssignmentExpression:{array:!0,object:!0}};p&&(d=typeof p.array<"u"||typeof p.object<"u"?{VariableDeclarator:p,AssignmentExpression:p}:p);function v(b,S){return d&&d[b]&&d[b][S]}function m(b){return Number.isInteger(b.property.value)}function o(b,S,E){u.report({node:b,messageId:"preferDestructuring",data:{type:S},fix:E})}function y(b){return b.type==="VariableDeclarator"&&b.id.type==="Identifier"&&b.init.type==="MemberExpression"&&!b.init.computed&&b.init.property.type==="Identifier"&&b.id.name===b.init.property.name}function O(b,S){const E=S.init,k=u.sourceCode;if(k.getCommentsInside(S).length>k.getCommentsInside(E.object).length)return null;let D=k.getText(E.object);return c.getPrecedence(E.object)O(D,E):null;if(v(E.type,"object")&&a){o(E,"object",k);return}if(v(E.type,"object")){const D=S.property;(D.type==="Literal"&&b.name===D.value||D.type==="Identifier"&&b.name===D.name&&!S.computed)&&o(E,"object",k)}}function g(b){b.init&&b.init.type==="MemberExpression"&&x(b.id,b.init,b)}function f(b){b.operator==="="&&x(b.left,b.right,b)}return{VariableDeclarator:g,AssignmentExpression:f}}},ny}var sy,YP;function M6(){if(YP)return sy;YP=1;const c=Ze(),{CALL:s,ReferenceTracker:u}=Kr(),p=c.getPrecedence({type:"BinaryExpression",operator:"**"});function a(o){return c.getPrecedence(o)<=p||o.type==="AwaitExpression"||o.type==="UnaryExpression"}function d(o){return c.getPrecedence(o)=p)&&!(O.type==="BinaryExpression"&&O.operator==="**"&&O.right===o)&&!((O.type==="CallExpression"||O.type==="NewExpression")&&O.arguments.includes(o))&&!(O.type==="MemberExpression"&&O.computed&&O.property===o)&&O.type!=="ArrayExpression")&&!c.isParenthesised(y,o)}function m(o,y){return y?`(${o})`:o}return sy={meta:{type:"suggestion",docs:{description:"Disallow the use of `Math.pow` in favor of the `**` operator",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-exponentiation-operator"},schema:[],fixable:"code",messages:{useExponentiation:"Use the '**' operator instead of 'Math.pow'."}},create(o){const y=o.sourceCode;function O(x){o.report({node:x,messageId:"useExponentiation",fix(g){if(x.arguments.length!==2||x.arguments.some(L=>L.type==="SpreadElement")||y.getCommentsInside(x).length>0)return null;const f=x.arguments[0],b=x.arguments[1],S=y.getText(f),E=y.getText(b),k=a(f),D=d(b),T=v(x,y);let R="",F="";if(!T){if(!k){const L=y.getFirstToken(f),j=y.getTokenBefore(x);j&&j.range[1]===x.range[0]&&!c.canTokensBeAdjacent(j,L)&&(R=" ")}if(!D){const L=y.getLastToken(b),j=y.getTokenAfter(x);j&&x.range[1]===j.range[0]&&!c.canTokensBeAdjacent(L,j)&&(F=" ")}}const P=m(S,k),N=m(E,D),I=m(`${P}**${N}`,T);return g.replaceText(x,`${R}${I}${F}`)}})}return{Program(x){const g=y.getScope(x),f=new u(g),b={Math:{pow:{[s]:!0}}};for(const{node:S}of f.iterateGlobalReferences(b))O(S)}}}},sy}var iy,HP;function $6(){if(HP)return iy;HP=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Cs(),d=new a.RegExpParser;function v(m,o,y,O){switch(O.type){case"Literal":if(typeof O.value=="string"&&y.includes("\\"))return null;break;case"TemplateLiteral":if(O.expressions.length||y.slice(1,-1)!==o)return null;break;default:return null}const x=O.range[0]+m+2;return[{fix(g){const b=(o.match(/temp\d+/gu)||[]).reduce((S,E)=>Math.max(S,Number(E.slice(4))),0);return g.insertTextBeforeRange([x,x],`?`)},messageId:"addGroupName"},{fix(g){return g.insertTextBeforeRange([x,x],"?:")},messageId:"addNonCapture"}]}return iy={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(m){const o=m.sourceCode;function y(O,x,g,f){let b;try{b=d.parsePattern(O,0,O.length,{unicode:!!(f&&f.includes("u")),unicodeSets:!!(f&&f.includes("v"))})}catch{return}a.visitRegExpAST(b,{onCapturingGroupEnter(S){if(!S.name){const E=o.getText(g),k=v(S.start,O,E,g);m.report({node:x,messageId:"required",data:{group:S.raw},suggest:k})}}})}return{Literal(O){O.regex&&y(O.regex.pattern,O,O,O.regex.flags)},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const S=p(b.arguments[0]),E=p(b.arguments[1]);S&&y(S,b,b.arguments[0],E)}}}}},iy}var ay,KP;function j6(){if(KP)return ay;KP=1;const c=Ze(),s=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);function u(p){return c.isSpecificId(p,"parseInt")||c.isSpecificMemberAccess(p,"Number","parseInt")}return ay={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(p){const a=p.sourceCode;return{"CallExpression[arguments.length=2]"(d){const[v,m]=d.arguments,o=c.getStaticStringValue(v),y=m.value;if(o!==null&&c.isStringLiteral(v)&&m.type==="Literal"&&typeof y=="number"&&s.has(y)&&u(d.callee)){const{system:O,literalPrefix:x}=s.get(y);p.report({node:d,messageId:"useLiteral",data:{system:O,functionName:a.getText(d.callee)},fix(g){if(a.getCommentsInside(d).length)return null;const f=`${x}${o}`;if(+f!==parseInt(o,y))return null;const b=a.getTokenBefore(d),S=a.getTokenAfter(d);let E="",k="";return b&&b.range[1]===d.range[0]&&!c.canTokensBeAdjacent(b,f)&&(E=" "),S&&d.range[1]===S.range[0]&&!c.canTokensBeAdjacent(f,S)&&(k=" "),g.replaceText(d,`${E}${f}${k}`)}})}}}}},ay}var oy,JP;function q6(){if(JP)return oy;JP=1;const c=Ze();function s(u){if(u.object.type==="ObjectExpression"&&u.object.properties.length===0)return!0;const p=u.object.type==="MemberExpression"&&c.getStaticPropertyName(u.object)==="prototype"?u.object.object:u.object;return p.type==="Identifier"&&p.name==="Object"}return oy={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(u){const p=u.sourceCode;return{CallExpression(a){if(!(a.callee.type==="MemberExpression"&&a.callee.object.type==="MemberExpression"))return;const d=c.getStaticPropertyName(a.callee),v=c.getStaticPropertyName(a.callee.object),m=s(a.callee.object),o=p.getScope(a),y=c.getVariableByName(o,"Object");d==="call"&&v==="hasOwnProperty"&&m&&y&&y.scope.type==="global"&&u.report({node:a,messageId:"useHasOwn",fix(O){if(p.getCommentsInside(a.callee).length>0)return null;const x=p.getTokenBefore(a.callee,{includeComments:!0});return x&&x.range[1]===a.callee.range[0]&&!c.canTokensBeAdjacent(x,"Object.hasOwn")?O.replaceText(a.callee," Object.hasOwn"):O.replaceText(a.callee,"Object.hasOwn")}})}}}},oy}var ly,eT;function Q6(){if(eT)return ly;eT=1;const{CALL:c,ReferenceTracker:s}=Kr(),{isCommaToken:u,isOpeningParenToken:p,isClosingParenToken:a,isParenthesised:d}=Ze(),v=/\s/u;function m(k){return k.arguments.some(D=>D.type==="SpreadElement")}function o(k){return k.type==="Property"&&(k.kind==="get"||k.kind==="set")}function y(k){return k.properties.some(o)}function O(k){return k.arguments.filter(D=>D.type==="ObjectExpression").some(y)}function x(k,D){const T=k.parent;switch(T.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return T.left===k&&!d(D,k);default:return!d(D,k)}}function g(k,D){switch(k.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!d(D,k);default:return!1}}function f(k,D,T){const R=[T.getFirstToken(k),T.getLastToken(k)];let F=T.getTokenBefore(k),P=T.getTokenAfter(k);for(;F&&P&&F.range[0]>D.range[0]&&p(F)&&a(P);)R.push(F,P),F=T.getTokenBefore(F),P=T.getTokenAfter(P);return R.sort((N,I)=>N.range[0]-I.range[0])}function b(k,D){const T=D.text;let R=k.range[0];{const F=D.getTokenBefore(k,{includeComments:!0});if(F&&F.type==="Line")return R}for(;v.test(T[R-1]||"");)R-=1;return R}function S(k,D){const T=D.text;let R=k.range[1];for(;v.test(T[R]||"");)R+=1;return R}function E(k,D){return function*(T){const R=D.getTokenAfter(k.callee,p),F=D.getLastToken(k);yield T.removeRange([k.range[0],R.range[0]]),x(k,D)?(yield T.replaceText(R,"({"),yield T.replaceText(F,"})")):(yield T.replaceText(R,"{"),yield T.replaceText(F,"}"));for(const P of k.arguments){const N=f(P,R,D),I=N.shift(),L=N.pop();if(P.type==="ObjectExpression"){const j=D.getLastToken(P,1),G=D.getTokenAfter(L);for(const $ of N)yield T.remove($);const U=[I.range[0],S(I,D)],Q=[Math.max(b(L,D),U[1]),L.range[1]];yield T.removeRange(U),yield T.removeRange(Q),(P.properties.length===0||u(j))&&u(G)&&(yield T.remove(G))}else g(P,D)?(yield T.insertTextBefore(I,"...("),yield T.insertTextAfter(L,")")):yield T.insertTextBefore(I,"...")}}}return ly={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(k){const D=k.sourceCode;return{Program(T){const R=D.getScope(T),F=new s(R),P={Object:{assign:{[c]:!0}}};for(const{node:N}of F.iterateGlobalReferences(P))if(N.arguments.length>=1&&N.arguments[0].type==="ObjectExpression"&&!m(N)&&!(N.arguments.length>1&&O(N))){const I=N.arguments.length===1?"useLiteralMessage":"useSpreadMessage",L=E(N,D);k.report({node:N,messageId:I,fix:L})}}}}},ly}var uy,tT;function U6(){if(tT)return uy;tT=1;const c=Ze();return uy={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(s){const u=s.options.length&&s.options[0].allowEmptyReject,p=s.sourceCode;function a(v){!v.arguments.length&&u||(!v.arguments.length||!c.couldBeError(v.arguments[0])||v.arguments[0].type==="Identifier"&&v.arguments[0].name==="undefined")&&s.report({node:v,messageId:"rejectAnError"})}function d(v){return c.isSpecificMemberAccess(v.callee,"Promise","reject")}return{CallExpression(v){d(v)&&a(v)},"NewExpression:exit"(v){v.callee.type==="Identifier"&&v.callee.name==="Promise"&&v.arguments.length&&c.isFunction(v.arguments[0])&&v.arguments[0].params.length>1&&v.arguments[0].params[1].type==="Identifier"&&p.getDeclaredVariables(v.arguments[0]).find(m=>m.name===v.arguments[0].params[1].name).references.filter(m=>m.isRead()).filter(m=>m.identifier.parent.type==="CallExpression"&&m.identifier===m.identifier.parent.callee).forEach(m=>a(m.identifier.parent))}}}},uy}var cy,rT;function V6(){return rT||(rT=1,cy={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(c){const s={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},u={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},p=(c.options[0]||{}).exceptions||[];function a(d,v,m){c.report({node:d,messageId:"preferReflect",data:{existing:v,substitute:m}})}return{CallExpression(d){const v=(d.callee.property||{}).name,m=(d.callee.object||{}).name==="Reflect",o=Object.hasOwn(u,v),y=p.includes(v);o&&!m&&!y&&a(d,s[v],u[v])},UnaryExpression(d){const v=d.operator==="delete",m=d.argument.type==="Identifier",o=p.includes("delete");v&&!m&&!o&&a(d,"the delete keyword","Reflect.deleteProperty")}}}}),cy}var fy,nT;function W6(){if(nT)return fy;nT=1;const c=Ze(),{CALL:s,CONSTRUCT:u,ReferenceTracker:p,findVariable:a}=Kr(),{RegExpValidator:d,visitRegExpAST:v,RegExpParser:m}=Cs(),{canTokensBeAdjacent:o}=Ze(),{REGEXPP_LATEST_ECMA_VERSION:y}=ig();function O(f){return f.type==="Literal"&&typeof f.value=="string"}function x(f){return f.type==="Literal"&&Object.hasOwn(f,"regex")}const g=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return fy={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:b=!1}={}]=f.options,S=f.sourceCode;function E($){const W=S.getScope($),K=a(W,$);return K!==null&&K.scope.type==="global"&&K.defs.length===0}function k($){return $.type==="TaggedTemplateExpression"&&c.isSpecificMemberAccess($.tag,"String","raw")&&E(c.skipChainExpression($.tag).object)&&c.isStaticTemplateLiteral($.quasi)}function D($){return O($)?$.value:c.isStaticTemplateLiteral($)?$.quasis[0].value.cooked:k($)?$.quasi.quasis[0].value.raw:null}function T($){return O($)||c.isStaticTemplateLiteral($)||k($)}function R($){const W=$.arguments;return!!((W.length===1||W.length===2)&&W.every(T))}function F($){const W=$.arguments;return!!(W.length===1&&x(W[0])||W.length===2&&x(W[0])&&T(W[1]))}function P($){return $<=5?5:Math.min($,y)}const N=P(f.languageOptions.ecmaVersion);function I($){switch($){case` +`:case`\\ +`:return"\\n";case"\r":case"\\\r":return"\\r";case" ":case"\\ ":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function L($,W){const K=new d({ecmaVersion:N});try{return K.validatePattern($,0,$.length,{unicode:W?W.includes("u"):!1,unicodeSets:W?W.includes("v"):!1}),W&&K.validateFlags(W),!0}catch{return!1}}function j($,W){return[...$].sort().join("")===[...W].sort().join("")}function G($,W){return[...new Set([...$,...W])].join("")}function U($,W,K){const te=S.getTokenBefore($);return S.getCommentsInside($).length===0&&(!te||g.has(te.value))&&L(W,K)}function Q($,W){const K=S.getTokenBefore($),te=S.getTokenAfter($);return(K&&!o(K,W)&&K.range[1]===$.range[0]?" ":"")+W+(te&&!o(W,te)&&$.range[1]===te.range[0]?" ":"")}return{Program($){const W=S.getScope($),K=new p(W),te={RegExp:{[s]:!0,[u]:!0}};for(const{node:V}of K.iterateGlobalReferences(te))if(b&&F(V)){const ae=V.arguments[0];if(V.arguments.length===2){const z=[],ue=D(V.arguments[1])||"";U(V,ae.regex.pattern,ue)&&z.push({messageId:"replaceWithLiteralAndFlags",pattern:ae.regex.pattern,flags:ue});const ne=ae.regex.flags||"",ce=G(ne,ue);!j(ce,ue)&&U(V,ae.regex.pattern,ce)&&z.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:ae.regex.pattern,flags:ce}),f.report({node:V,messageId:"unexpectedRedundantRegExpWithFlags",suggest:z.map(({flags:pe,pattern:Be,messageId:oe})=>({messageId:oe,data:{flags:pe},fix(Z){return Z.replaceText(V,Q(V,`/${Be}/${pe}`))}}))})}else{const z=[];U(V,ae.regex.pattern,ae.regex.flags)&&z.push(S.getText(ae)),f.report({node:V,messageId:"unexpectedRedundantRegExp",suggest:z.map(ue=>({messageId:"replaceWithLiteral",fix(ne){return ne.replaceText(V,Q(V,ue))}}))})}}else if(R(V)){let ae=D(V.arguments[0]),z=!1,ue;if(V.arguments[1]&&(ue=D(V.arguments[1])),U(V,ae,ue)||(z=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>T+D.slice(R.range[1],k[F+1].range[0]),"")}function g(S,E,k){if(S.type==="Literal"&&typeof S.value=="string")return`\`${S.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,D=>D.lastIndexOf("\\")%2?`\\${D}`:D).replace(new RegExp(`\\\\${S.raw[0]}`,"gu"),S.raw[0])}\``;if(S.type==="TemplateLiteral")return y.getText(S);if(s(S)&&a(S)){const D=y.getFirstTokenBetween(S.left,S.right,N=>N.value==="+"),T=x(S.left,D),R=x(D,S.right),F=m(S.left),P=v(S.right);return F?g(S.left,E,T+R).slice(0,-1)+g(S.right,null,k).slice(1):P?g(S.left,E,null).slice(0,-1)+g(S.right,T+R,k).slice(1):`${g(S.left,E,null)}${T}+${R}${g(S.right,k,null)}`}return`\`\${${E||""}${y.getText(S)}${k||""}}\``}function f(S,E){const k=u(E.parent);return p(k)?null:S.replaceText(k,g(k,null,null))}function b(S){if(!c.isStringLiteral(S)||!s(S.parent))return;const E=u(S.parent);O[E.range[0]]||(O[E.range[0]]=!0,d(E)&&o.report({node:E,messageId:"unexpectedStringConcatenation",fix:k=>f(k,S)}))}return{Program(){O=Object.create(null)},Literal:b,TemplateLiteral:b}}},dy}var my,oT;function X6(){if(oT)return my;oT=1;const c=Pl(),s=Ze(),u=Wh();return my={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(p){const a=p.options[0],d=p.options[1]&&p.options[1].keywords,v=!p.options[1]||p.options[1].unnecessary!==!1,m=p.options[1]&&p.options[1].numbers,o=p.sourceCode;function y(E){return u.includes(E)}function O(E,k,D){return k.length===1&&k[0].start===0&&k[0].end===E.length&&(["Identifier","Keyword","Null","Boolean"].includes(k[0].type)||k[0].type==="Numeric"&&!D&&String(+k[0].value)===k[0].value)}function x(E){return E.type==="Identifier"?E.name:E.value}function g(E){return E.type==="Literal"&&typeof E.value=="string"?o.getText(E):`"${E.type==="Identifier"?E.name:E.value}"`}function f(E){const k=E.key;if(!(E.method||E.computed||E.shorthand))if(k.type==="Literal"&&typeof k.value=="string"){let D;try{D=c.tokenize(k.value)}catch{return}if(D.length!==1||y(D[0].value)&&d)return;v&&O(k.value,D,m)&&p.report({node:E,messageId:"unnecessarilyQuotedProperty",data:{property:k.value},fix:R=>R.replaceText(k,x(k))})}else d&&k.type==="Identifier"&&y(k.name)?p.report({node:E,messageId:"unquotedReservedProperty",data:{property:k.name},fix:D=>D.replaceText(k,g(k))}):m&&k.type==="Literal"&&s.isNumericLiteral(k)&&p.report({node:E,messageId:"unquotedNumericProperty",data:{property:k.value},fix:D=>D.replaceText(k,g(k))})}function b(E){const k=E.key;!E.method&&!E.computed&&!E.shorthand&&!(k.type==="Literal"&&typeof k.value=="string")&&p.report({node:E,messageId:"unquotedPropertyFound",data:{property:k.name||k.value},fix:D=>D.replaceText(k,g(k))})}function S(E,k){const D=[],T=[];let R=null,F=!1;E.properties.forEach(P=>{const N=P.key;if(!(!N||P.method||P.computed||P.shorthand))if(N.type==="Literal"&&typeof N.value=="string"){if(D.push(P),k){let I;try{I=c.tokenize(N.value)}catch{F=!0;return}F=F||!O(N.value,I)||d&&y(I[0].value)}}else d&&k&&N.type==="Identifier"&&y(N.name)?(T.push(P),F=!0,R=N.name):T.push(P)}),k&&D.length&&!F?D.forEach(P=>{p.report({node:P,messageId:"redundantQuoting",fix:N=>N.replaceText(P.key,x(P.key))})}):T.length&&R?T.forEach(P=>{p.report({node:P,messageId:"requireQuotesDueToReservedWord",data:{property:R},fix:N=>N.replaceText(P.key,g(P.key))})}):D.length&&T.length&&T.forEach(P=>{p.report({node:P,messageId:"inconsistentlyQuotedProperty",data:{key:P.key.name||P.key.value},fix:N=>N.replaceText(P.key,g(P.key))})})}return{Property(E){(a==="always"||!a)&&b(E),a==="as-needed"&&f(E)},ObjectExpression(E){a==="consistent"&&S(E,!1),a==="consistent-as-needed"&&S(E,!0)}}}},my}var gy,lT;function Y6(){if(lT)return gy;lT=1;const c=Ze(),s={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},u=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(c.LINEBREAKS).join("")}]`,"u");s.double.convert=s.single.convert=s.backtick.convert=function(a){const d=this.quote,v=a[0];return d===v?a:d+a.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(m,o,y)=>o===v||v==="`"&&o==="${"?o:m===d||d==="`"&&m==="${"?`\\${m}`:y&&v==="`"?"\\n":m)+d};const p="avoid-escape";return gy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(a){const d=a.options[0],v=s[d||"double"],m=a.options[1],o=m&&m.allowTemplateLiterals===!0,y=a.sourceCode;let O=m&&m.avoidEscape===!0;m===p&&(O=!0);function x(E){return E.parent.type==="JSXAttribute"||E.parent.type==="JSXElement"||E.parent.type==="JSXFragment"}function g(E){return E.type==="ExpressionStatement"&&E.expression.type==="Literal"&&typeof E.expression.value=="string"&&!c.isParenthesised(y,E.expression)}function f(E){if(!c.isTopLevelExpressionStatement(E.parent))return!1;const k=E.parent.parent;for(let D=0;D0||E.quasis.length>=1&&u.test(E.quasis[0].value.raw))}return{Literal(E){const k=E.value,D=E.raw;if(v&&typeof k=="string"){let T=d==="backtick"&&b(E)||x(E)||c.isSurroundedBy(D,v.quote);!T&&O&&(T=c.isSurroundedBy(D,v.alternateQuote)&&D.includes(v.quote)),T||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(R){return d==="backtick"&&c.hasOctalOrNonOctalDecimalEscapeSequence(D)?null:R.replaceText(E,v.convert(E.raw))}})}},TemplateLiteral(E){o||d==="backtick"||S(E)||a.report({node:E,messageId:"wrongQuotes",data:{description:v.description},fix(k){return c.isTopLevelExpressionStatement(E.parent)&&!c.isParenthesised(y,E)?null:k.replaceText(E,v.convert(y.getText(E)))}})}}}},gy}var yy,uT;function H6(){if(uT)return yy;uT=1;const c=Ze(),s="always",u="as-needed",p=new Set(Array.from({length:37-2},(o,y)=>y+2));function a(o){return o.defs.length>=1}function d(o){return o.type==="MemberExpression"&&!o.computed&&o.property.type==="Identifier"&&o.property.name==="parseInt"}function v(o){return!(o.type==="Literal"&&!p.has(o.value)||o.type==="Identifier"&&o.name==="undefined")}function m(o){return o.type==="Literal"&&o.value===10}return yy={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(o){const y=o.options[0]||s,O=o.sourceCode;function x(g){const f=g.arguments;switch(f.length){case 0:o.report({node:g,messageId:"missingParameters"});break;case 1:y===s&&o.report({node:g,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(b){const S=O.getTokens(g),E=S.at(-1),k=S.at(-2),D=k.type==="Punctuator"&&k.value===",";return b.insertTextBefore(E,D?" 10,":", 10")}}]});break;default:y===u&&m(f[1])?o.report({node:g,messageId:"redundantRadix"}):v(f[1])||o.report({node:g,messageId:"invalidRadix"});break}}return{"Program:exit"(g){const f=O.getScope(g);let b;b=c.getVariableByName(f,"parseInt"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier;c.isCallee(E)&&x(E.parent)}),b=c.getVariableByName(f,"Number"),b&&!a(b)&&b.references.forEach(S=>{const E=S.identifier.parent,k=E.parent.type==="ChainExpression"?E.parent:E;d(E)&&c.isCallee(k)&&x(k.parent)})}}}},yy}var by,cT;function K6(){if(cT)return by;cT=1;function c(a,d=new Map){for(const v of a.references)v.resolved!==null&&d.set(v.identifier,v);for(const v of a.childScopes)v.type!=="function"&&c(v,d);return d}function s(a){if(a.writeExpr)return a.writeExpr;let d=a.identifier;for(;d;){const v=d.parent.type;if(v==="AssignmentExpression"&&d.parent.left===d)return d.parent.right;if(v==="MemberExpression"&&d.parent.object===d){d=d.parent;continue}break}return null}function u(a,d){if(!a||d&&a.defs.some(m=>m.type==="Parameter"))return!1;const v=a.scope.variableScope;return a.references.every(m=>m.from.variableScope===v)}class p{constructor(){this.info=new WeakMap}initialize(d){const v=new Set,m=new Set;for(const o of d.prevSegments){const y=this.info.get(o);y&&(y.outdatedReadVariables.forEach(Set.prototype.add,v),y.freshReadVariables.forEach(Set.prototype.add,m))}this.info.set(d,{outdatedReadVariables:v,freshReadVariables:m})}markAsRead(d,v){for(const m of d){const o=this.info.get(m);o&&(o.freshReadVariables.add(v),o.outdatedReadVariables.delete(v))}}makeOutdated(d){for(const v of d){const m=this.info.get(v);m&&(m.freshReadVariables.forEach(Set.prototype.add,m.outdatedReadVariables),m.freshReadVariables.clear())}}isOutdated(d,v){for(const m of d){const o=this.info.get(m);if(o&&o.outdatedReadVariables.has(v))return!0}return!1}}return by={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(a){const d=!!a.options[0]&&a.options[0].allowProperties,v=a.sourceCode,m=new Map,o=new p;let y=null;return{onCodePathStart(O,x){const g=v.getScope(x),f=g.type==="function"&&(g.block.async||g.block.generator);y={upper:y,codePath:O,referenceMap:f?c(g):null,currentSegments:new Set}},onCodePathEnd(){y=y.upper},onCodePathSegmentStart(O){o.initialize(O),y.currentSegments.add(O)},onUnreachableCodePathSegmentStart(O){y.currentSegments.add(O)},onUnreachableCodePathSegmentEnd(O){y.currentSegments.delete(O)},onCodePathSegmentEnd(O){y.currentSegments.delete(O)},Identifier(O){const{referenceMap:x}=y,g=x&&x.get(O);if(!g)return;const f=g.resolved,b=s(g),S=g.identifier.parent.type==="MemberExpression";if(g.isRead()&&!(b&&b.parent.operator==="=")&&o.markAsRead(y.currentSegments,f),b&&b.parent.right===b&&!u(f,S)){let E=m.get(b);E||(E=[],m.set(b,E)),E.push(g)}},":expression:exit"(O){if(!y.referenceMap)return;(O.type==="AwaitExpression"||O.type==="YieldExpression")&&o.makeOutdated(y.currentSegments);const x=m.get(O);if(x){m.delete(O);for(const g of x){const f=g.resolved;o.isOutdated(y.currentSegments,f)&&(O.parent.left===g.identifier?a.report({node:O.parent,messageId:"nonAtomicUpdate",data:{value:f.name}}):d||a.report({node:O.parent,messageId:"nonAtomicObjectUpdate",data:{value:v.getText(O.parent.left),object:f.name}}))}}}}}},by}var vy,fT;function J6(){if(fT)return vy;fT=1;const c=Ze();function s(u){return u[0].toUpperCase()+u.slice(1)}return vy={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression.",removeAsync:"Remove 'async'."},hasSuggestions:!0},create(u){const p=u.sourceCode;let a=null;function d(){a={upper:a,hasAwait:!1}}function v(m){if(!m.generator&&m.async&&!a.hasAwait&&!c.isEmptyFunction(m)){const o=m.parent.type==="MethodDefinition"&&m.parent.value===m||m.parent.type==="Property"&&m.parent.method&&m.parent.value===m?m.parent:m,y=p.getFirstToken(o,f=>f.value==="async"),O=[y.range[0],p.getTokenAfter(y,{includeComments:!0}).range[0]],x=p.getTokenAfter(y),g=x.type==="Punctuator"&&(x.value==="["||x.value==="(")&&(o.type==="MethodDefinition"||c.isStartOfExpressionStatement(o))&&c.needsPrecedingSemicolon(p,o);u.report({node:m,loc:c.getFunctionHeadLoc(m,p),messageId:"missingAwait",data:{name:s(c.getFunctionNameWithKind(m))},suggest:[{messageId:"removeAsync",fix:f=>f.replaceTextRange(O,g?";":"")}]})}a=a.upper}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d,"FunctionDeclaration:exit":v,"FunctionExpression:exit":v,"ArrowFunctionExpression:exit":v,AwaitExpression(){a&&(a.hasAwait=!0)},ForOfStatement(m){a&&m.await&&(a.hasAwait=!0)}}}},vy}var xy,pT;function e8(){if(pT)return xy;pT=1;const{CALL:c,CONSTRUCT:s,ReferenceTracker:u,getStringIfConstant:p}=Kr(),a=Ze(),{isValidWithUnicodeFlag:d}=ig();function v(m,o){let y;return m==="v"?y=!o.includes("v"):m==="u"?y=!o.includes("u"):y=!o.includes("u")&&!o.includes("v"),y}return xy={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",addVFlag:"Add the 'v' flag.",requireUFlag:"Use the 'u' flag.",requireVFlag:"Use the 'v' flag."},schema:[{type:"object",properties:{requireFlag:{enum:["u","v"]}},additionalProperties:!1}]},create(m){const o=m.sourceCode,{requireFlag:y}=m.options[0]??{};return{"Literal[regex]"(O){const x=O.regex.flags||"";v(y,x)&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:O,suggest:d(m.languageOptions.ecmaVersion,O.regex.pattern,y)?[{fix(f){const b=y??"u",S=o.getText(O),E=S.lastIndexOf("/");if(y){const k=y==="u"?"v":"u";if(S.includes(k,E))return f.replaceText(O,S.slice(0,E)+S.slice(E).replace(k,y))}return f.insertTextAfter(O,b)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})},Program(O){const x=o.getScope(O),g=new u(x),f={RegExp:{[c]:!0,[s]:!0}};for(const{node:b}of g.iterateGlobalReferences(f)){const[S,E]=b.arguments;if(S&&S.type==="SpreadElement")continue;const k=p(S,x),D=p(E,x);let T=!E;typeof D=="string"&&(T=v(y,D)),T&&m.report({messageId:y==="v"?"requireVFlag":"requireUFlag",node:b,suggest:typeof k=="string"&&d(m.languageOptions.ecmaVersion,k,y)?[{fix(R){const F=y??"u";if(E){if(E.type==="Literal"&&typeof E.value=="string"||E.type==="TemplateLiteral"){const N=o.getText(E),I=y==="u"?"v":"u";return D.includes(I)?E.type==="Literal"&&E.raw.includes("\\")||E.type==="TemplateLiteral"&&(E.expressions.length||E.quasis.some(({value:{raw:L}})=>L.includes("\\")))?null:R.replaceText(E,N.replace(I,F)):R.replaceText(E,[N.slice(0,N.length-1),N.slice(N.length-1)].join(F))}return null}const P=o.getLastToken(b,{skip:1});return R.insertTextAfter(P,a.isCommaToken(P)?` "${F}",`:`, "${F}"`)},messageId:y==="v"?"addVFlag":"addUFlag"}]:null})}}}}},xy}var Oy,hT;function t8(){return hT||(hT=1,Oy={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(c){const s=[];function u(a){a.generator&&s.push(0)}function p(a){if(!a.generator)return;s.pop()===0&&a.body.body.length>0&&c.report({node:a,messageId:"missingYield"})}return{FunctionDeclaration:u,"FunctionDeclaration:exit":p,FunctionExpression:u,"FunctionExpression:exit":p,YieldExpression(){s.length>0&&(s[s.length-1]+=1)}}}}),Oy}var Sy,dT;function r8(){return dT||(dT=1,Sy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(c){const s=c.sourceCode,u=c.options[0]==="always";function p(a){const d=s.getFirstToken(a),v=s.getTokenAfter(d),m=s.isSpaceBetweenTokens(d,v);let o;switch(a.type){case"SpreadElement":o="spread",a.parent.type==="ObjectExpression"&&(o+=" property");break;case"RestElement":o="rest",a.parent.type==="ObjectPattern"&&(o+=" property");break;case"ExperimentalSpreadProperty":o="spread property";break;case"ExperimentalRestProperty":o="rest property";break;default:return}u&&!m?c.report({node:a,loc:d.loc,messageId:"expectedWhitespace",data:{type:o},fix(y){return y.replaceTextRange([d.range[1],v.range[0]]," ")}}):!u&&m&&c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpectedWhitespace",data:{type:o},fix(y){return y.removeRange([d.range[1],v.range[0]])}})}return{SpreadElement:p,RestElement:p,ExperimentalSpreadProperty:p,ExperimentalRestProperty:p}}}),Sy}var Ey,mT;function n8(){if(mT)return Ey;mT=1;const c=Oo(),s=Ze();return Ey={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(u){const p=/^[-[(/+`]/u,a=new Set(["get","set","static"]),d=new Set(["*","in","instanceof"]),v=u.options[1],m=u.options[0]==="never",o=!!(v&&v.omitLastInOneLineBlock),y=!!(v&&v.omitLastInOneLineClassBody),O=v&&v.beforeStatementContinuationChars||"any",x=u.sourceCode;function g(I,L){const j=x.getLastToken(I);let G,U,Q;L?(G="extraSemi",Q=j.loc,U=function($){return new c($,x).retainSurroundingTokens(j).remove(j)}):(G="missingSemi",Q={start:j.loc.end,end:s.getNextLocation(x,j.loc.end)},U=function($){return $.insertTextAfter(j,";")}),u.report({node:I,loc:Q,messageId:G,fix:U})}function f(I){const L=x.getTokenAfter(I);return!L||s.isClosingBraceToken(L)||s.isSemicolonToken(L)}function b(I){if(!s.isClosingBraceToken(I))return!1;const L=x.getNodeByRangeIndex(I.range[0]);return L.type==="BlockStatement"&&L.parent.type==="ArrowFunctionExpression"}function S(I){if(I.type!=="PropertyDefinition")return!1;if(!I.computed&&I.key.type==="Identifier"&&a.has(I.key.name)&&!(I.static&&I.key.name==="static")&&!I.value)return!0;const j=x.getTokenAfter(I);return d.has(j.value)}function E(I){const L=x.getLastToken(I,1),j=x.getTokenAfter(I);return!!j&&s.isTokenOnSameLine(L,j)}function k(I){const L=I.type;return L==="DoWhileStatement"||L==="BreakStatement"||L==="ContinueStatement"||L==="DebuggerStatement"||L==="ImportDeclaration"||L==="ExportAllDeclaration"?!1:L==="ReturnStatement"?!!I.argument:L==="ExportNamedDeclaration"?!!I.declaration:!b(x.getLastToken(I,1))}function D(I){return!!I&&p.test(I.value)&&I.value!=="++"&&I.value!=="--"}function T(I){return f(x.getLastToken(I))?!0:S(I)||E(I)?!1:I.type!=="PropertyDefinition"&&O==="never"&&!k(I)||!D(x.getTokenAfter(I))}function R(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="BlockStatement"?L.loc.start.line===L.loc.end.line:L.type==="StaticBlock"?x.getFirstToken(L,{skip:1}).loc.start.line===L.loc.end.line:!1}function F(I){const L=I.parent,j=x.getTokenAfter(I);return!j||j.value!=="}"?!1:L.type==="ClassBody"?L.loc.start.line===L.loc.end.line:!1}function P(I){const L=s.isSemicolonToken(x.getLastToken(I));if(m)L&&T(I)?g(I,!0):!L&&O==="always"&&I.type!=="PropertyDefinition"&&D(x.getTokenAfter(I))&&g(I);else{const j=o&&R(I),G=y&&F(I),U=j||G;L&&U?g(I,!0):!L&&!U&&g(I)}}function N(I){const L=I.parent;(L.type!=="ForStatement"||L.init!==I)&&(!/^For(?:In|Of)Statement/u.test(L.type)||L.left!==I)&&P(I)}return{VariableDeclaration:N,ExpressionStatement:P,ReturnStatement:P,ThrowStatement:P,DoWhileStatement:P,DebuggerStatement:P,BreakStatement:P,ContinueStatement:P,ImportDeclaration:P,ExportAllDeclaration:P,ExportNamedDeclaration(I){I.declaration||P(I)},ExportDefaultDeclaration(I){/(?:Class|Function)Declaration/u.test(I.declaration.type)||P(I)},PropertyDefinition:P}}},Ey}var Cy,gT;function s8(){if(gT)return Cy;gT=1;const c=Ze();return Cy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(s){const u=s.options[0],p=s.sourceCode;let a=!1,d=!0;typeof u=="object"&&(a=u.before,d=u.after);function v(f){const b=p.getTokenBefore(f);return b&&c.isTokenOnSameLine(b,f)&&p.isSpaceBetweenTokens(b,f)}function m(f){const b=p.getTokenAfter(f);return b&&c.isTokenOnSameLine(f,b)&&p.isSpaceBetweenTokens(f,b)}function o(f){const b=p.getTokenAfter(f);return!(b&&c.isTokenOnSameLine(f,b))}function y(f){const b=p.getTokenBefore(f);return!(b&&c.isTokenOnSameLine(f,b))}function O(f){const b=p.getTokenAfter(f);return b&&c.isClosingBraceToken(b)||c.isClosingParenToken(b)}function x(f,b){if(c.isSemicolonToken(f)){if(v(f)){if(!a){const S=p.getTokenBefore(f),E={start:S.loc.end,end:f.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceBefore",fix(k){return k.removeRange([S.range[1],f.range[0]])}})}}else if(a){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceBefore",fix(E){return E.insertTextBefore(f," ")}})}if(!y(f)&&!o(f)&&!O(f)){if(m(f)){if(!d){const S=p.getTokenAfter(f),E={start:f.loc.end,end:S.loc.start};s.report({node:b,loc:E,messageId:"unexpectedWhitespaceAfter",fix(k){return k.removeRange([f.range[1],S.range[0]])}})}}else if(d){const S=f.loc;s.report({node:b,loc:S,messageId:"missingWhitespaceAfter",fix(E){return E.insertTextAfter(f," ")}})}}}}function g(f){const b=p.getLastToken(f);x(b,f)}return{VariableDeclaration:g,ExpressionStatement:g,BreakStatement:g,ContinueStatement:g,DebuggerStatement:g,DoWhileStatement:g,ReturnStatement:g,ThrowStatement:g,ImportDeclaration:g,ExportNamedDeclaration:g,ExportAllDeclaration:g,ExportDefaultDeclaration:g,ForStatement(f){f.init&&x(p.getTokenAfter(f.init),f),f.test&&x(p.getTokenAfter(f.test),f)},PropertyDefinition:g}}},Cy}var wy,yT;function i8(){if(yT)return wy;yT=1;const c=Ze(),s=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");function u(a){const d=a.type;return d==="BlockStatement"||d==="StaticBlock"||d==="Program"||d==="ClassBody"?a.body:d==="SwitchCase"?a.consequent:null}function p(a){const d=a.parent.type;if(d==="IfStatement"&&a.parent.consequent===a&&a.parent.alternate||d==="DoWhileStatement")return!0;const v=u(a.parent);return v!==null&&v.at(-1)===a}return wy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(a){const d=a.sourceCode,v=a.options[0]||"last";function m(o,y){const O=d.getTokenBefore(o),x=d.getTokenAfter(o),g=!O||c.isTokenOnSameLine(O,o),f=!x||c.isTokenOnSameLine(o,x);(y==="last"&&!g||y==="first"&&!f)&&a.report({loc:o.loc,messageId:"expectedSemiColon",data:{pos:y==="last"?"the end of the previous line":"the beginning of the next line"},fix(b){if(O&&x&&d.commentsExistBetween(O,x))return null;const S=O?O.range[1]:o.range[0],E=x?x.range[0]:o.range[1],k=y==="last"?`; +`:` +;`;return b.replaceTextRange([S,E],k)}})}return{[s](o){if(v==="first"&&p(o))return;const y=d.getLastToken(o);c.isSemicolonToken(y)&&m(y,v)},ForStatement(o){const y=o.init&&d.getTokenAfter(o.init,c.isSemicolonToken),O=o.test&&d.getTokenAfter(o.test,c.isSemicolonToken);y&&m(y,"last"),O&&m(O,"last")}}}},wy}var ky,bT;function a8(){return bT||(bT=1,ky={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(c){const s=c.options[0]||{},u=s.ignoreCase||!1,p=s.ignoreDeclarationSort||!1,a=s.ignoreMemberSort||!1,d=s.memberSyntaxSortOrder||["none","all","multiple","single"],v=s.allowSeparatedGroups||!1,m=c.sourceCode;let o=null;function y(f){return f.specifiers.length===0?"none":f.specifiers[0].type==="ImportNamespaceSpecifier"?"all":f.specifiers.length===1?"single":"multiple"}function O(f){return d.indexOf(y(f))}function x(f){return f.specifiers[0]?f.specifiers[0].local.name:null}function g(f,b){return Math.max(b.loc.start.line-f.loc.end.line-1,0)}return{ImportDeclaration(f){if(!p){if(o&&v&&g(o,f)>0&&(o=null),o){const b=O(f),S=O(o);let E=x(f),k=x(o);u&&(k=k&&k.toLowerCase(),E=E&&E.toLowerCase()),b!==S?bk.type==="ImportSpecifier"),S=u?k=>k.local.name.toLowerCase():k=>k.local.name,E=b.map(S).findIndex((k,D,T)=>T[D-1]>k);E!==-1&&c.report({node:b[E],messageId:"sortMembersAlphabetically",data:{memberName:b[E].local.name},fix(k){return b.some(D=>m.getCommentsBefore(D).length||m.getCommentsAfter(D).length)?null:k.replaceTextRange([b[0].range[0],b.at(-1).range[1]],b.slice().sort((D,T)=>{const R=S(D),F=S(T);return R>F?1:-1}).reduce((D,T,R)=>{const F=R===b.length-1?"":m.getText().slice(b[R].range[1],b[R+1].range[0]);return D+m.getText(T)+F},""))}})}}}}}),ky}var Ay={exports:{}},vT;function o8(){if(vT)return Ay.exports;vT=1;/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var c=function(s,u){var p,a,d=1,v=0,m=0,o=String.alphabet;function y(O,x,g){if(g){for(p=x;g=y(O,p),g<76&&g>65;)++p;return+O.slice(x-1,p)}return g=o&&o.indexOf(O.charAt(x)),g>-1?g+76:(g=O.charCodeAt(x)||0,g<45||g>127?g:g<46?65:g<48?g-1:g<58?g+18:g<65?g-11:g<91?g+11:g<97?g-37:g<123?g+5:g-63)}if((s+="")!=(u+="")){for(;d;)if(a=y(s,v++),d=y(u,m++),a<76&&d<76&&a>66&&d>66&&(a=y(s,v,v),d=y(u,m,v=p),m=p),a!=d)return a{const P=D[F-1];P&&R.loc.start.line-P.loc.end.line>1&&(T=!0)}),!T&&b.loc.start.line-D.at(-1).loc.end.line>1&&(T=!0),!T&&D[0].loc.start.line-g.prevNode.loc.end.line>1&&(T=!0)),g.prevNode=b,k!==null&&(g.prevName=k),O&&T){g.prevBlankLine=k===null;return}S===null||k===null||Ey.id.type==="Identifier"),v=u?y=>y.id.name.toLowerCase():y=>y.id.name,m=d.some(y=>y.init!==null&&y.init.type!=="Literal");let o=!1;d.slice(1).reduce((y,O)=>{const x=v(y);return v(O){const E=v(b),k=v(S);return E>k?1:-1}).reduce((b,S,E)=>{const k=E===d.length-1?"":p.getText().slice(d[E].range[1],d[E+1].range[0]);return b+p.getText(S)+k},""))}}),o=!0,y):O},d[0])}}}}),Ty}var Dy,ST;function c8(){if(ST)return Dy;ST=1;const c=Ze();function s(u){const p=u.parent;return u.type==="BlockStatement"&&c.isFunction(p)&&p.body===u}return Dy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{keywords:{enum:["always","never","off"]},functions:{enum:["always","never","off"]},classes:{enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},create(u){const p=u.options[0],a=u.sourceCode;let d=!0,v=!0,m=!0,o=!1,y=!1,O=!1;typeof p=="object"?(d=p.functions==="always",v=p.keywords==="always",m=p.classes==="always",o=p.functions==="never",y=p.keywords==="never",O=p.classes==="never"):p==="never"&&(d=!1,v=!1,m=!1,o=!0,y=!0,O=!0);function x(b,S){return c.isArrowToken(b)||c.isKeywordToken(b)&&!s(S)||c.isColonToken(b)&&S.parent&&S.parent.type==="SwitchCase"&&b===c.getSwitchCaseColonToken(S.parent,a)}function g(b){const S=a.getTokenBefore(b);if(S&&!x(S,b)&&c.isTokenOnSameLine(S,b)){const E=a.isSpaceBetweenTokens(S,b);let k,D;s(b)?(k=d,D=o):b.type==="ClassBody"?(k=m,D=O):(k=v,D=y),k&&!E?u.report({node:b,messageId:"missingSpace",fix(T){return T.insertTextBefore(b," ")}}):D&&E&&u.report({node:b,messageId:"unexpectedSpace",fix(T){return T.removeRange([S.range[1],b.range[0]])}})}}function f(b){const S=b.cases;let E;S.length>0?E=a.getTokenBefore(S[0]):E=a.getLastToken(b,1),g(E)}return{BlockStatement:g,ClassBody:g,SwitchStatement:f}}},Dy}var Iy,ET;function f8(){if(ET)return Iy;ET=1;const c=Ze();return Iy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(s){const u=s.sourceCode,p=typeof s.options[0]=="string"?s.options[0]:"always",a=typeof s.options[0]=="object"?s.options[0]:{};function d(o){if(o.id)return!0;const y=o.parent;return y.type==="MethodDefinition"||y.type==="Property"&&(y.kind==="get"||y.kind==="set"||y.method)}function v(o){if(o.type==="ArrowFunctionExpression"){if(o.async&&c.isOpeningParenToken(u.getFirstToken(o,{skip:1})))return a.asyncArrow||p}else{if(d(o))return a.named||p;if(!o.generator)return a.anonymous||p}return"ignore"}function m(o){const y=v(o);if(y==="ignore")return;const O=u.getFirstToken(o,c.isOpeningParenToken),x=u.getTokenBefore(O),g=u.isSpaceBetweenTokens(x,O);g&&y==="never"?s.report({node:o,loc:{start:x.loc.end,end:O.loc.start},messageId:"unexpectedSpace",fix(f){const b=u.getCommentsBefore(O);return b.some(S=>S.type==="Line")?null:f.replaceTextRange([x.range[1],O.range[0]],b.reduce((S,E)=>S+u.getText(E),""))}}):!g&&y==="always"&&s.report({node:o,loc:O.loc,messageId:"missingSpace",fix:f=>f.insertTextAfter(x," ")})}return{ArrowFunctionExpression:m,FunctionDeclaration:m,FunctionExpression:m}}},Iy}var Ry,CT;function p8(){if(CT)return Ry;CT=1;const c=Ze();return Ry={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(s){const u=s.options[0]==="always",p=s.options[1]&&s.options[1].exceptions||[],a={};let d;p.length&&(a.braceException=p.includes("{}"),a.bracketException=p.includes("[]"),a.parenException=p.includes("()"),a.empty=p.includes("empty"));function v(){const b=[],S=[];return a.braceException&&(b.push("{"),S.push("}")),a.bracketException&&(b.push("["),S.push("]")),a.parenException&&(b.push("("),S.push(")")),a.empty&&(b.push(")"),S.push("(")),{openers:b,closers:S}}const m=s.sourceCode;function o(b){return d.openers.includes(b.value)}function y(b){return d.closers.includes(b.value)}function O(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isClosingParenToken(S)?!1:u?!o(S):o(S)}function x(b,S){return!c.isTokenOnSameLine(b,S)||S.type==="Line"||!m.isSpaceBetweenTokens(b,S)?!1:u?o(S):!o(S)}function g(b,S){return m.isSpaceBetweenTokens(b,S)||!a.empty&&c.isOpeningParenToken(b)?!1:u?!y(b):y(b)}function f(b,S){return!c.isTokenOnSameLine(b,S)||!m.isSpaceBetweenTokens(b,S)?!1:u?y(b):!y(b)}return{Program:function(S){d=v();const E=m.tokensAndComments;E.forEach((k,D)=>{const T=E[D-1],R=E[D+1];!c.isOpeningParenToken(k)&&!c.isClosingParenToken(k)||(k.value==="("&&O(k,R)&&s.report({node:S,loc:k.loc,messageId:"missingOpeningSpace",fix(F){return F.insertTextAfter(k," ")}}),k.value==="("&&x(k,R)&&s.report({node:S,loc:{start:k.loc.end,end:R.loc.start},messageId:"rejectedOpeningSpace",fix(F){return F.removeRange([k.range[1],R.range[0]])}}),k.value===")"&&g(T,k)&&s.report({node:S,loc:k.loc,messageId:"missingClosingSpace",fix(F){return F.insertTextBefore(k," ")}}),k.value===")"&&f(T,k)&&s.report({node:S,loc:{start:T.loc.end,end:k.loc.start},messageId:"rejectedClosingSpace",fix(F){return F.removeRange([T.range[1],k.range[0]])}}))})}}}},Ry}var Fy,wT;function h8(){if(wT)return Fy;wT=1;const{isEqToken:c}=Ze();return Fy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(s){const u=s.options[0]?s.options[0].int32Hint===!0:!1,p=s.sourceCode;function a(y,O,x){const g=p.getFirstTokenBetween(y,O,S=>S.value===x),f=p.getTokenBefore(g),b=p.getTokenAfter(g);return!p.isSpaceBetweenTokens(f,g)||!p.isSpaceBetweenTokens(g,b)?g:null}function d(y,O){s.report({node:y,loc:O.loc,messageId:"missingSpace",data:{operator:O.value},fix(x){const g=p.getTokenBefore(O),f=p.getTokenAfter(O);let b="";return O.range[0]-g.range[1]===0&&(b=" "),b+=O.value,f.range[0]-O.range[1]===0&&(b+=" "),x.replaceText(O,b)}})}function v(y){const O=y.left.typeAnnotation?y.left.typeAnnotation:y.left,x=y.right,g=y.operator||"=",f=a(O,x,g);f&&(u&&p.getText(y).endsWith("|0")||d(y,f))}function m(y){const O=a(y.test,y.consequent,"?"),x=a(y.consequent,y.alternate,":");O&&d(y,O),x&&d(y,x)}function o(y){const O=y.id.typeAnnotation?y.id.typeAnnotation:y.id,x=y.init;if(x){const g=a(O,x,"=");g&&d(y,g)}}return{AssignmentExpression:v,AssignmentPattern:v,BinaryExpression:v,LogicalExpression:v,ConditionalExpression:m,VariableDeclarator:o,PropertyDefinition(y){if(!y.value)return;const O=p.getTokenBefore(y.value,c),x=p.getTokenBefore(O),g=p.getTokenAfter(O);(!p.isSpaceBetweenTokens(x,O)||!p.isSpaceBetweenTokens(O,g))&&d(y,O)}}}},Fy}var _y,kT;function d8(){if(kT)return _y;kT=1;const c=Ze();return _y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(s){const u=s.options[0]||{words:!0,nonwords:!1},p=s.sourceCode;function a(S){return S&&S.type==="UnaryExpression"&&S.argument.operator==="!"&&S.argument&&S.argument.type==="UnaryExpression"&&S.argument.operator==="!"}function d(S){return u.overrides&&Object.hasOwn(u.overrides,S)}function v(S){return u.overrides[S]}function m(S,E,k,D){k.range[0]===E.range[1]&&s.report({node:S,messageId:"wordOperator",data:{word:D},fix(T){return T.insertTextAfter(E," ")}})}function o(S,E,k,D){c.canTokensBeAdjacent(E,k)&&k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfterWord",data:{word:D},fix(T){return T.removeRange([E.range[1],k.range[0]])}})}function y(S,E,k,D){d(D)?v(D)?m(S,E,k,D):o(S,E,k,D):u.words?m(S,E,k,D):o(S,E,k,D)}function O(S){const E=p.getFirstTokens(S,3),k="yield";!S.argument||S.delegate||y(S,E[0],E[1],k)}function x(S){const E=p.getFirstTokens(S,3);y(S,E[0],E[1],"await")}function g(S,E,k){if(S.prefix){if(a(S))return;E.range[1]===k.range[0]&&s.report({node:S,messageId:"operator",data:{operator:E.value},fix(D){return D.insertTextAfter(E," ")}})}else E.range[1]===k.range[0]&&s.report({node:S,messageId:"beforeUnaryExpressions",data:{token:k.value},fix(D){return D.insertTextBefore(k," ")}})}function f(S,E,k){S.prefix?k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedAfter",data:{operator:E.value},fix(D){return c.canTokensBeAdjacent(E,k)?D.removeRange([E.range[1],k.range[0]]):null}}):k.range[0]>E.range[1]&&s.report({node:S,messageId:"unexpectedBefore",data:{operator:k.value},fix(D){return D.removeRange([E.range[1],k.range[0]])}})}function b(S){const E=S.type==="UpdateExpression"&&!S.prefix?p.getLastTokens(S,2):p.getFirstTokens(S,2),k=E[0],D=E[1];if((S.type==="NewExpression"||S.prefix)&&k.type==="Keyword"){y(S,k,D,k.value);return}const T=S.prefix?E[0].value:E[1].value;d(T)?v(T)?g(S,k,D):f(S,k,D):u.nonwords?g(S,k,D):f(S,k,D)}return{UnaryExpression:b,UpdateExpression:b,NewExpression:b,YieldExpression:O,AwaitExpression:x}}},_y}var By,AT;function m8(){if(AT)return By;AT=1;const c=Zl(),s=Ze();function u(o){return`(?:${c(o)})`}function p(o){return`${u(o)}+`}function a(o){return o.includes("*")?o:o.concat("*")}function d(o){let y="";return o.length===0?y+="\\s":(y+="(?:\\s|",o.length===1?y+=p(o[0]):(y+="(?:",y+=o.map(p).join("|"),y+=")"),y+=`(?:$|[${Array.from(s.LINEBREAKS).join("")}]))`),y}function v(o,y){let O="^";return o.length===1?O+=u(o[0]):(O+="(?:",O+=o.map(u).join("|"),O+=")"),O+="?",O+=d(y),new RegExp(O,"u")}function m(o){const y=`^(${o.map(u).join("|")})?[ ]+`;return new RegExp(y,"u")}return By={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(o){const y=o.sourceCode,O=o.options[0]!=="never",x=o.options[1]||{},g=x.block&&x.block.balanced,f=["block","line"].reduce((k,D)=>{const T=a(x[D]&&x[D].markers||x.markers||[]),R=x[D]&&x[D].exceptions||x.exceptions||[],F="[ ]+$";return k[D]={beginRegex:O?v(T,R):m(T),endRegex:g&&O?new RegExp(`${d(R)}$`,"u"):new RegExp(F,"u"),hasExceptions:R.length>0,captureMarker:new RegExp(`^(${T.map(u).join("|")})`,"u"),markers:new Set(T)},k},{});function b(k,D,T,R){const F=k.type.toLowerCase(),P=F==="block"?"/*":"//";o.report({node:k,fix(N){const I=k.range[0];let L=I+2;return O?(T&&(L+=T[0].length),N.insertTextAfterRange([I,L]," ")):(L+=T[0].length,N.replaceTextRange([I,L],P+(T[1]?T[1]:"")))},messageId:D,data:{refChar:R}})}function S(k,D,T){o.report({node:k,fix(R){if(O)return R.insertTextAfterRange([k.range[0],k.range[1]-2]," ");const F=k.range[1]-2,P=F-T[0].length;return R.replaceTextRange([P,F],"")},messageId:D})}function E(k){const D=k.type.toLowerCase(),T=f[D],R=D==="block"?"/*":"//";if(k.value.length===0||T.markers.has(k.value))return;const F=T.beginRegex.exec(k.value),P=T.endRegex.exec(k.value);if(O){if(!F){const N=T.captureMarker.exec(k.value),I=N?R+N[0]:R;T.hasExceptions?b(k,"expectedExceptionAfter",N,I):b(k,"expectedSpaceAfter",N,I)}g&&D==="block"&&!P&&S(k,"expectedSpaceBefore")}else F&&(F[1]?b(k,"unexpectedSpaceAfterMarker",F,F[1]):b(k,"unexpectedSpaceAfter",F,R)),g&&D==="block"&&P&&S(k,"unexpectedSpaceBefore",P)}return{Program(){y.getAllComments().filter(D=>D.type!=="Shebang").forEach(E)}}}},By}var Ly,PT;function g8(){if(PT)return Ly;PT=1;const c=Ze();function s(a){const d=[];for(let v=0;vT.remove(D)}function x(D,T,R,F,P){D.slice(T,R).forEach(N=>{a.report({node:N,messageId:F,fix:P?O(N):null})})}function g(D,T,R){x(D,0,D.length,T,R)}function f(D,T,R){x(D,1,D.length,T,R)}function b(D,T){const R=m.length>0,F=v.length===0&&m.length===0,P=v.length>0&&v.at(-1),N=T.length>0;N?(p(D.params)?P?a.report({node:T[0],messageId:"unnecessary",fix:O(T[0])}):R&&a.report({node:T[0],messageId:"unnecessaryInClasses",fix:O(T[0])}):a.report({node:T[0],messageId:"nonSimpleParameterList"}),f(T,"multiple",!0)):F&&(p(D.params)?a.report({node:D,messageId:"function"}):a.report({node:D,messageId:"wrap",data:{name:c.getFunctionNameWithKind(D)}})),v.push(P||N)}function S(){v.pop()}function E(D){const T=D.body.type==="BlockStatement",R=T?s(D.body.body):[];o==="function"?b(D,R):R.length>0&&(p(D.params)?g(R,o,y(o)):(a.report({node:R[0],messageId:"nonSimpleParameterList"}),f(R,"multiple",!0)))}const k={Program(D){const T=s(D.body);D.sourceType==="module"&&(o="module"),o==="global"?(D.body.length>0&&T.length===0&&a.report({node:D,messageId:"global"}),f(T,"multiple",!0)):g(T,o,y(o))},FunctionDeclaration:E,FunctionExpression:E,ArrowFunctionExpression:E};return o==="function"&&Object.assign(k,{ClassBody(){m.push(!0)},"ClassBody:exit"(){m.pop()},"FunctionDeclaration:exit":S,"FunctionExpression:exit":S,"ArrowFunctionExpression:exit":S}),k}},Ly}var Ny,TT;function y8(){if(TT)return Ny;TT=1;const c=Ze();return Ny={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(s){const u=s.sourceCode,p=s.options[0]||{},a=p.before===!0,d=p.after!==!1;function v(y,O,x){return c.isClosingBraceToken(O)||!c.isTokenOnSameLine(y,O)||u.isSpaceBetweenTokens(y,O)===x}function m(y,O){return u.getFirstTokenBetween(y,O,{includeComments:!0,filter:c.isCommentToken})!==null}function o(y,O,x,g){return m(O,x)?null:g?y.insertTextAfter(O," "):y.removeRange([O.range[1],x.range[0]])}return{SwitchCase(y){const O=c.getSwitchCaseColonToken(y,u),x=u.getTokenBefore(O),g=u.getTokenAfter(O);v(x,O,a)||s.report({node:y,loc:O.loc,messageId:a?"expectedBefore":"unexpectedBefore",fix:f=>o(f,x,O,a)}),v(O,g,d)||s.report({node:y,loc:O.loc,messageId:d?"expectedAfter":"unexpectedAfter",fix:f=>o(f,O,g,d)})}}}},Ny}var My,DT;function b8(){if(DT)return My;DT=1;const c=Ze();return My={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(s){const u=s.sourceCode;function p(a){a.arguments.length===0&&s.report({node:a,messageId:"expected"})}return{"Program:exit"(a){const d=u.getScope(a),v=c.getVariableByName(d,"Symbol");v&&v.defs.length===0&&v.references.forEach(m=>{const o=m.identifier;c.isCallee(o)&&p(o.parent)})}}}},My}var $y,IT;function v8(){if(IT)return $y;IT=1;const c=Ze();return $y={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(s){const u=s.sourceCode,p=s.options[0]==="always";function a(v){if(!v.value.startsWith("}"))return;const m=u.getTokenBefore(v,{includeComments:!0}),o=u.isSpaceBetween(m,v);c.isTokenOnSameLine(m,v)&&(p&&!o&&s.report({loc:{start:v.loc.start,end:{line:v.loc.start.line,column:v.loc.start.column+1}},messageId:"expectedBefore",fix:y=>y.insertTextBefore(v," ")}),!p&&o&&s.report({loc:{start:m.loc.end,end:v.loc.start},messageId:"unexpectedBefore",fix:y=>y.removeRange([m.range[1],v.range[0]])}))}function d(v){if(!v.value.endsWith("${"))return;const m=u.getTokenAfter(v,{includeComments:!0}),o=u.isSpaceBetween(v,m);c.isTokenOnSameLine(v,m)&&(p&&!o&&s.report({loc:{start:{line:v.loc.end.line,column:v.loc.end.column-2},end:v.loc.end},messageId:"expectedAfter",fix:y=>y.insertTextAfter(v," ")}),!p&&o&&s.report({loc:{start:v.loc.end,end:m.loc.start},messageId:"unexpectedAfter",fix:y=>y.removeRange([v.range[1],m.range[0]])}))}return{TemplateElement(v){const m=u.getFirstToken(v);a(m),d(m)}}}},$y}var jy,RT;function x8(){return RT||(RT=1,jy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(c){const s=c.options[0]!=="always",u=c.sourceCode;function p(a){const d=u.getTokenBefore(a.quasi),v=u.getFirstToken(a.quasi),m=u.isSpaceBetweenTokens(d,v);s&&m?c.report({node:a,loc:{start:d.loc.end,end:v.loc.start},messageId:"unexpected",fix(o){const y=u.getCommentsBefore(a.quasi);return y.some(O=>O.type==="Line")?null:o.replaceTextRange([d.range[1],v.range[0]],y.reduce((O,x)=>O+u.getText(x),""))}}):!s&&!m&&c.report({node:a,loc:{start:a.loc.start,end:v.loc.start},messageId:"missing",fix(o){return o.insertTextAfter(d," ")}})}return{TaggedTemplateExpression:p}}}),jy}var qy,FT;function O8(){return FT||(FT=1,qy={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(c){return{Program:function(u){const p=c.sourceCode,a={column:0,line:1},d=c.options[0]||"never";!p.hasBOM&&d==="always"?c.report({node:u,loc:a,messageId:"expected",fix(v){return v.insertTextBeforeRange([0,1],"\uFEFF")}}):p.hasBOM&&d==="never"&&c.report({node:u,loc:a,messageId:"unexpected",fix(v){return v.removeRange([-1,0])}})}}}}),qy}var Qy,_T;function S8(){if(_T)return Qy;_T=1;const c=Ze();function s(u){if(!u)return!1;const p=u.type==="SequenceExpression"?u.expressions.at(-1):u;return c.isSpecificId(p,"NaN")||c.isSpecificMemberAccess(p,"Number","NaN")}return Qy={meta:{hasSuggestions:!0,type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN.",replaceWithIsNaN:"Replace with Number.isNaN.",replaceWithCastingAndIsNaN:"Replace with Number.isNaN and cast to a Number.",replaceWithFindIndex:"Replace with Array.prototype.{{ methodName }}."}},create(u){const p=!u.options[0]||u.options[0].enforceForSwitchCase,a=u.options[0]&&u.options[0].enforceForIndexOf,d=u.sourceCode,v=new Set(["==","===","!=","!=="]),m=new Set(["==","!="]);function o(f,b){return S=>{const E=s(f.left)?f.right:f.left,k=E.type==="SequenceExpression",T=f.operator[0]==="!"?"!":"";let R=d.getText(E);k&&(R=`(${R})`);const F=b(R);return S.replaceText(f,`${T}${F}`)}}function y(f){if(/^(?:[<>]|[!=]=)=?$/u.test(f.operator)&&(s(f.left)||s(f.right))){const b=[],E=(s(f.left)?f.left:f.right).type==="SequenceExpression",k=v.has(f.operator)&&!E,D=m.has(f.operator);k&&(b.push({messageId:"replaceWithIsNaN",fix:o(f,T=>`Number.isNaN(${T})`)}),D&&b.push({messageId:"replaceWithCastingAndIsNaN",fix:o(f,T=>`Number.isNaN(Number(${T}))`)})),u.report({node:f,messageId:"comparisonWithNaN",suggest:b})}}function O(f){s(f.discriminant)&&u.report({node:f,messageId:"switchNaN"});for(const b of f.cases)s(b.test)&&u.report({node:b,messageId:"caseNaN"})}function x(f){const b=c.skipChainExpression(f.callee);if(b.type==="MemberExpression"){const S=c.getStaticPropertyName(b);if((S==="indexOf"||S==="lastIndexOf")&&f.arguments.length<=2&&s(f.arguments[0])){const E=f.arguments[0].type!=="SequenceExpression"&&!f.arguments[1],k=[];if(E){const D=b.computed,T=S==="indexOf"?"findIndex":"findLastIndex",R=D?`"${T}"`:T;k.push({messageId:"replaceWithFindIndex",data:{methodName:T},fix:F=>[F.replaceText(b.property,R),F.replaceText(f.arguments[0],"Number.isNaN")]})}u.report({node:f,messageId:"indexOfNaN",data:{methodName:S},suggest:k})}}}const g={BinaryExpression:y};return p&&(g.SwitchStatement=O),a&&(g.CallExpression=x),g}},Qy}var Uy,BT;function E8(){if(BT)return Uy;BT=1;const c=Ze();return Uy={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(s){const u=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),p=new Set(["==","===","!=","!=="]),a=s.sourceCode,d=s.options[0]&&s.options[0].requireStringLiterals;let v;function m(y){const O=v.set.get(y.name);return O&&O.defs.length===0&&O.references.some(x=>x.identifier===y)}function o(y){return y.type==="UnaryExpression"&&y.operator==="typeof"}return{Program(y){v=a.getScope(y)},UnaryExpression(y){if(o(y)){const{parent:O}=y;if(O.type==="BinaryExpression"&&p.has(O.operator)){const x=O.left===y?O.right:O.left;if(x.type==="Literal"||c.isStaticTemplateLiteral(x)){const g=x.type==="Literal"?x.value:x.quasis[0].value.cooked;u.has(g)||s.report({node:x,messageId:"invalidValue"})}else x.type==="Identifier"&&x.name==="undefined"&&m(x)?s.report({node:x,messageId:d?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(g){return g.replaceText(x,'"undefined"')}}]}):d&&!o(x)&&s.report({node:x,messageId:"notString"})}}}}}},Uy}var Vy,LT;function C8(){return LT||(LT=1,Vy={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(c){function s(m){return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"}function u(m){return m.type==="ImportDeclaration"||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"}function p(m){return m.type==="VariableDeclaration"||m.type==="ExportNamedDeclaration"&&m.declaration&&m.declaration.type==="VariableDeclaration"}function a(m,o){const y=o.length;let O=0;if(m.parent.type!=="StaticBlock")for(;Oo.replaceText(u,`(${s.getText(u)})`)})}}}}}),Gy}var zy,$T;function A8(){return $T||($T=1,zy={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(c){const s=c.sourceCode,u=function(d){return!d||typeof d=="string"?{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[d||"after"]:d}(c.options[0]);function p(d,v,m){if(s.isSpaceBetweenTokens(v,m)!==u[d]){const o=v.value==="*",y=u[d],O=o?v:m;let x;y?x=d==="before"?"missingBefore":"missingAfter":x=d==="before"?"unexpectedBefore":"unexpectedAfter",c.report({node:O,messageId:x,fix(g){return y?o?g.insertTextAfter(O," "):g.insertTextBefore(O," "):g.removeRange([v.range[1],m.range[0]])}})}}function a(d){if(!d.delegate)return;const v=s.getFirstTokens(d,3),m=v[0],o=v[1],y=v[2];p("before",m,o),p("after",o,y)}return{YieldExpression:a}}}),zy}var Zy,jT;function P8(){if(jT)return Zy;jT=1;const c=Ze();function s(m){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(m)}function u(m){return/^(==|===)$/u.test(m)}function p(m){return["<","<="].includes(m)}function a(m){return m.type==="UnaryExpression"&&m.operator==="-"&&m.prefix&&c.isNumericLiteral(m.argument)}function d(m){return a(m)||c.isStaticTemplateLiteral(m)}function v(m){return m.type==="Literal"?m:a(m)?{type:"Literal",value:-m.argument.value,raw:`-${m.argument.value}`}:c.isStaticTemplateLiteral(m)?{type:"Literal",value:m.quasis[0].value.cooked,raw:m.quasis[0].value.raw}:null}return Zy={meta:{type:"suggestion",docs:{description:'Require or disallow "Yoda" conditions',recommended:!1,url:"https://eslint.org/docs/latest/rules/yoda"},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean",default:!1},onlyEquality:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{expected:"Expected literal to be on the {{expectedSide}} side of {{operator}}."}},create(m){const o=m.options[0]==="always",y=m.options[1]&&m.options[1].exceptRange,O=m.options[1]&&m.options[1].onlyEquality,x=m.sourceCode;function g(S){const E=S.left,k=S.right;function D(){if(S.operator==="&&"&&c.isSameReference(E.right,k.left)){const F=v(E.left),P=v(k.right);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function T(){if(S.operator==="||"&&c.isSameReference(E.left,k.right)){const F=v(E.right),P=v(k.left);if(F===null&&P===null)return!1;if(P===null||F===null||F.value<=P.value)return!0}return!1}function R(){return c.isParenthesised(x,S)}return S.type==="LogicalExpression"&&E.type==="BinaryExpression"&&k.type==="BinaryExpression"&&p(E.operator)&&p(k.operator)&&(D()||T())&&R()}const f={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};function b(S){const E=x.getFirstTokenBetween(S.left,S.right,U=>U.value===S.operator),k=x.getTokenBefore(E),D=x.getTokenAfter(E),T=x.getText(),R=T.slice(S.range[0],k.range[1]),F=T.slice(k.range[1],E.range[0]),P=T.slice(E.range[1],D.range[0]),N=T.slice(D.range[0],S.range[1]),I=x.getTokenBefore(S),L=x.getTokenAfter(S);let j="",G="";return I&&I.range[1]===S.range[0]&&!c.canTokensBeAdjacent(I,D)&&(j=" "),L&&S.range[1]===L.range[0]&&!c.canTokensBeAdjacent(k,L)&&(G=" "),j+N+F+f[E.value]+P+R+G}return{BinaryExpression(S){const E=o?S.left:S.right,k=o?S.right:S.left;(k.type==="Literal"||d(k))&&!(E.type==="Literal"||d(E))&&!(!u(S.operator)&&O)&&s(S.operator)&&!(y&&g(S.parent))&&m.report({node:S,messageId:"expected",data:{operator:S.operator,expectedSide:o?"left":"right"},fix:D=>D.replaceText(S,b(S))})}}}},Zy}var Xy,qT;function QT(){if(qT)return Xy;qT=1;const{LazyLoadingRuleMap:c}=J$();return Xy=new c(Object.entries({"accessor-pairs":()=>r3(),"array-bracket-newline":()=>n3(),"array-bracket-spacing":()=>s3(),"array-callback-return":()=>i3(),"array-element-newline":()=>a3(),"arrow-body-style":()=>o3(),"arrow-parens":()=>l3(),"arrow-spacing":()=>u3(),"block-scoped-var":()=>c3(),"block-spacing":()=>f3(),"brace-style":()=>p3(),"callback-return":()=>h3(),camelcase:()=>d3(),"capitalized-comments":()=>m3(),"class-methods-use-this":()=>g3(),"comma-dangle":()=>y3(),"comma-spacing":()=>b3(),"comma-style":()=>v3(),complexity:()=>x3(),"computed-property-spacing":()=>O3(),"consistent-return":()=>S3(),"consistent-this":()=>E3(),"constructor-super":()=>C3(),curly:()=>w3(),"default-case":()=>k3(),"default-case-last":()=>A3(),"default-param-last":()=>P3(),"dot-location":()=>T3(),"dot-notation":()=>D3(),"eol-last":()=>I3(),eqeqeq:()=>R3(),"for-direction":()=>F3(),"func-call-spacing":()=>_3(),"func-name-matching":()=>B3(),"func-names":()=>L3(),"func-style":()=>N3(),"function-call-argument-newline":()=>M3(),"function-paren-newline":()=>$3(),"generator-star-spacing":()=>j3(),"getter-return":()=>q3(),"global-require":()=>Q3(),"grouped-accessor-pairs":()=>U3(),"guard-for-in":()=>V3(),"handle-callback-err":()=>W3(),"id-blacklist":()=>G3(),"id-denylist":()=>z3(),"id-length":()=>Z3(),"id-match":()=>X3(),"implicit-arrow-linebreak":()=>Y3(),indent:()=>H3(),"indent-legacy":()=>K3(),"init-declarations":()=>J3(),"jsx-quotes":()=>e5(),"key-spacing":()=>t5(),"keyword-spacing":()=>r5(),"line-comment-position":()=>n5(),"linebreak-style":()=>s5(),"lines-around-comment":()=>i5(),"lines-around-directive":()=>a5(),"lines-between-class-members":()=>o5(),"logical-assignment-operators":()=>l5(),"max-classes-per-file":()=>u5(),"max-depth":()=>c5(),"max-len":()=>f5(),"max-lines":()=>p5(),"max-lines-per-function":()=>h5(),"max-nested-callbacks":()=>d5(),"max-params":()=>m5(),"max-statements":()=>g5(),"max-statements-per-line":()=>y5(),"multiline-comment-style":()=>b5(),"multiline-ternary":()=>v5(),"new-cap":()=>x5(),"new-parens":()=>O5(),"newline-after-var":()=>S5(),"newline-before-return":()=>E5(),"newline-per-chained-call":()=>C5(),"no-alert":()=>w5(),"no-array-constructor":()=>k5(),"no-async-promise-executor":()=>A5(),"no-await-in-loop":()=>P5(),"no-bitwise":()=>T5(),"no-buffer-constructor":()=>D5(),"no-caller":()=>I5(),"no-case-declarations":()=>R5(),"no-catch-shadow":()=>F5(),"no-class-assign":()=>_5(),"no-compare-neg-zero":()=>B5(),"no-cond-assign":()=>L5(),"no-confusing-arrow":()=>N5(),"no-console":()=>M5(),"no-const-assign":()=>$5(),"no-constant-binary-expression":()=>j5(),"no-constant-condition":()=>q5(),"no-constructor-return":()=>Q5(),"no-continue":()=>U5(),"no-control-regex":()=>V5(),"no-debugger":()=>W5(),"no-delete-var":()=>G5(),"no-div-regex":()=>z5(),"no-dupe-args":()=>Z5(),"no-dupe-class-members":()=>X5(),"no-dupe-else-if":()=>Y5(),"no-dupe-keys":()=>H5(),"no-duplicate-case":()=>K5(),"no-duplicate-imports":()=>J5(),"no-else-return":()=>ej(),"no-empty":()=>tj(),"no-empty-character-class":()=>rj(),"no-empty-function":()=>nj(),"no-empty-pattern":()=>sj(),"no-empty-static-block":()=>ij(),"no-eq-null":()=>aj(),"no-eval":()=>oj(),"no-ex-assign":()=>lj(),"no-extend-native":()=>uj(),"no-extra-bind":()=>cj(),"no-extra-boolean-cast":()=>fj(),"no-extra-label":()=>pj(),"no-extra-parens":()=>hj(),"no-extra-semi":()=>dj(),"no-fallthrough":()=>mj(),"no-floating-decimal":()=>gj(),"no-func-assign":()=>yj(),"no-global-assign":()=>bj(),"no-implicit-coercion":()=>vj(),"no-implicit-globals":()=>xj(),"no-implied-eval":()=>Oj(),"no-import-assign":()=>Sj(),"no-inline-comments":()=>Ej(),"no-inner-declarations":()=>Cj(),"no-invalid-regexp":()=>wj(),"no-invalid-this":()=>kj(),"no-irregular-whitespace":()=>Aj(),"no-iterator":()=>Pj(),"no-label-var":()=>Tj(),"no-labels":()=>Dj(),"no-lone-blocks":()=>Ij(),"no-lonely-if":()=>Rj(),"no-loop-func":()=>Fj(),"no-loss-of-precision":()=>_j(),"no-magic-numbers":()=>Bj(),"no-misleading-character-class":()=>Qj(),"no-mixed-operators":()=>Uj(),"no-mixed-requires":()=>Vj(),"no-mixed-spaces-and-tabs":()=>Wj(),"no-multi-assign":()=>Gj(),"no-multi-spaces":()=>zj(),"no-multi-str":()=>Zj(),"no-multiple-empty-lines":()=>Xj(),"no-native-reassign":()=>Yj(),"no-negated-condition":()=>Hj(),"no-negated-in-lhs":()=>Kj(),"no-nested-ternary":()=>Jj(),"no-new":()=>eq(),"no-new-func":()=>tq(),"no-new-native-nonconstructor":()=>rq(),"no-new-object":()=>nq(),"no-new-require":()=>sq(),"no-new-symbol":()=>iq(),"no-new-wrappers":()=>aq(),"no-nonoctal-decimal-escape":()=>oq(),"no-obj-calls":()=>lq(),"no-object-constructor":()=>uq(),"no-octal":()=>cq(),"no-octal-escape":()=>fq(),"no-param-reassign":()=>pq(),"no-path-concat":()=>hq(),"no-plusplus":()=>dq(),"no-process-env":()=>mq(),"no-process-exit":()=>gq(),"no-promise-executor-return":()=>yq(),"no-proto":()=>bq(),"no-prototype-builtins":()=>vq(),"no-redeclare":()=>xq(),"no-regex-spaces":()=>Oq(),"no-restricted-exports":()=>Sq(),"no-restricted-globals":()=>Eq(),"no-restricted-imports":()=>Cq(),"no-restricted-modules":()=>wq(),"no-restricted-properties":()=>kq(),"no-restricted-syntax":()=>Aq(),"no-return-assign":()=>Pq(),"no-return-await":()=>Tq(),"no-script-url":()=>Dq(),"no-self-assign":()=>Iq(),"no-self-compare":()=>Rq(),"no-sequences":()=>Fq(),"no-setter-return":()=>_q(),"no-shadow":()=>Bq(),"no-shadow-restricted-names":()=>Lq(),"no-spaced-func":()=>Nq(),"no-sparse-arrays":()=>Mq(),"no-sync":()=>$q(),"no-tabs":()=>jq(),"no-template-curly-in-string":()=>qq(),"no-ternary":()=>Qq(),"no-this-before-super":()=>Uq(),"no-throw-literal":()=>Vq(),"no-trailing-spaces":()=>Wq(),"no-undef":()=>Gq(),"no-undef-init":()=>zq(),"no-undefined":()=>Zq(),"no-underscore-dangle":()=>Xq(),"no-unexpected-multiline":()=>Yq(),"no-unmodified-loop-condition":()=>Hq(),"no-unneeded-ternary":()=>Kq(),"no-unreachable":()=>Jq(),"no-unreachable-loop":()=>e6(),"no-unsafe-finally":()=>t6(),"no-unsafe-negation":()=>r6(),"no-unsafe-optional-chaining":()=>n6(),"no-unused-expressions":()=>s6(),"no-unused-labels":()=>i6(),"no-unused-private-class-members":()=>a6(),"no-unused-vars":()=>o6(),"no-use-before-define":()=>l6(),"no-useless-assignment":()=>u6(),"no-useless-backreference":()=>c6(),"no-useless-call":()=>f6(),"no-useless-catch":()=>p6(),"no-useless-computed-key":()=>h6(),"no-useless-concat":()=>d6(),"no-useless-constructor":()=>m6(),"no-useless-escape":()=>g6(),"no-useless-rename":()=>y6(),"no-useless-return":()=>b6(),"no-var":()=>v6(),"no-void":()=>x6(),"no-warning-comments":()=>O6(),"no-whitespace-before-property":()=>S6(),"no-with":()=>E6(),"nonblock-statement-body-position":()=>C6(),"object-curly-newline":()=>w6(),"object-curly-spacing":()=>k6(),"object-property-newline":()=>A6(),"object-shorthand":()=>P6(),"one-var":()=>T6(),"one-var-declaration-per-line":()=>D6(),"operator-assignment":()=>I6(),"operator-linebreak":()=>R6(),"padded-blocks":()=>F6(),"padding-line-between-statements":()=>_6(),"prefer-arrow-callback":()=>B6(),"prefer-const":()=>L6(),"prefer-destructuring":()=>N6(),"prefer-exponentiation-operator":()=>M6(),"prefer-named-capture-group":()=>$6(),"prefer-numeric-literals":()=>j6(),"prefer-object-has-own":()=>q6(),"prefer-object-spread":()=>Q6(),"prefer-promise-reject-errors":()=>U6(),"prefer-reflect":()=>V6(),"prefer-regex-literals":()=>W6(),"prefer-rest-params":()=>G6(),"prefer-spread":()=>z6(),"prefer-template":()=>Z6(),"quote-props":()=>X6(),quotes:()=>Y6(),radix:()=>H6(),"require-atomic-updates":()=>K6(),"require-await":()=>J6(),"require-unicode-regexp":()=>e8(),"require-yield":()=>t8(),"rest-spread-spacing":()=>r8(),semi:()=>n8(),"semi-spacing":()=>s8(),"semi-style":()=>i8(),"sort-imports":()=>a8(),"sort-keys":()=>l8(),"sort-vars":()=>u8(),"space-before-blocks":()=>c8(),"space-before-function-paren":()=>f8(),"space-in-parens":()=>p8(),"space-infix-ops":()=>h8(),"space-unary-ops":()=>d8(),"spaced-comment":()=>m8(),strict:()=>g8(),"switch-colon-spacing":()=>y8(),"symbol-description":()=>b8(),"template-curly-spacing":()=>v8(),"template-tag-spacing":()=>x8(),"unicode-bom":()=>O8(),"use-isnan":()=>S8(),"valid-typeof":()=>E8(),"vars-on-top":()=>C8(),"wrap-iife":()=>w8(),"wrap-regex":()=>k8(),"yield-star-spacing":()=>A8(),yoda:()=>P8()})),Xy}var Yy,UT;function T8(){if(UT)return Yy;UT=1;const c=QT();class s{constructor(){this._rules=Object.create(null)}define(p,a){this._rules[p]=a}get(p){return typeof this._rules[p]=="string"&&this.define(p,K$(this._rules[p])),this._rules[p]?this._rules[p]:c.has(p)?c.get(p):null}*[Symbol.iterator](){yield*c;for(const p of Object.keys(this._rules))yield[p,this.get(p)]}}return Yy=s,Yy}var Hy,VT;function D8(){if(VT)return Hy;VT=1;const c=qi()("eslint:source-code-fixer"),s="\uFEFF";function u(d,v){return d.fix.range[0]-v.fix.range[0]||d.fix.range[1]-v.fix.range[1]}function p(d,v){return d.line-v.line||d.column-v.column}function a(){Object.freeze(this)}return a.applyFixes=function(d,v,m){if(c("Applying fixes"),m===!1)return c("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:v,output:d};const o=[],y=[],O=d.startsWith(s)?s:"",x=O?d.slice(1):d;let g=Number.NEGATIVE_INFINITY,f=O;function b(S){const E=S.fix,k=E.range[0],D=E.range[1];return g>=k||k>D?(o.push(S),!1):((k<0&&D>=0||k===0&&E.text.startsWith(s))&&(f=""),f+=x.slice(Math.max(0,g),Math.max(0,k)),f+=E.text,g=D,!0)}if(v.forEach(S=>{Object.hasOwn(S,"fix")?y.push(S):o.push(S)}),y.length){c("Found fixes to apply");let S=!1;for(const E of y.sort(u))typeof m!="function"||m(E)?(b(E),S=!0):o.push(E);return f+=x.slice(Math.max(0,g)),{fixed:S,messages:o.sort(p),output:f}}return c("No fixes to apply"),{fixed:!1,messages:v,output:O+x}},Hy=a,Hy}var Ky,WT;function GT(){if(WT)return Ky;WT=1;function c(){return xr.hrtime()}function s(u){const p=xr.hrtime(u);return p[0]*1e3+p[1]/1e6}return Ky={startTime:c,endTime:s},Ky}var Jy,zT;function I8(){if(zT)return Jy;zT=1;const{startTime:c,endTime:s}=GT();function u(y,O,x){return y+new Array(O-y.length+1).join(x||" ")}function p(y,O,x){return new Array(O-y.length+1).join(x||" ")+y}const a=!!xr.env.TIMING,d=["Rule","Time (ms)","Relative"],v=[u,p,p];function m(){if(typeof xr.env.TIMING!="string")return 10;if(xr.env.TIMING.toLowerCase()==="all")return Number.POSITIVE_INFINITY;const O=Number.parseInt(xr.env.TIMING,10);return O>10?O:10}function o(y){let O=0;const x=Object.keys(y).map(b=>{const S=y[b];return O+=S,[b,S]}).sort((b,S)=>S[1]-b[1]).slice(0,m());x.forEach(b=>{b.push(`${(b[1]*100/O).toFixed(1)}%`),b[1]=b[1].toFixed(3)}),x.unshift(d);const g=[];x.forEach(b=>{const S=b.length;for(let E=0;Eg[E])&&(g[E]=k)}});const f=x.map(b=>b.map((S,E)=>v[E](S,g[E])).join(" | "));f.splice(1,0,g.map((b,S)=>{const E=S!==0&&S!==g.length-1?2:1;return v[S](":",b+E,"-")}).join("|")),console.log(f.join(` +`))}return Jy=function(){const y=Object.create(null);function O(x,g,f){return function(...b){const S=c(),E=g(...b),k=s(S);return a&&(typeof y[x]>"u"&&(y[x]=0),y[x]+=k),f?{result:E,tdiff:k}:E}}return a&&xr.on("exit",()=>{o(y)}),{time:O,enabled:a,getListSize:m}}(),Jy}var R8={"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]},ZT={rules:R8},eb,XT;function YT(){if(XT)return eb;XT=1;const c=Object.freeze({type:"array",minItems:0,maxItems:0});function s(a){let d,v;return a.includes("/")?(a.startsWith("@")?d=a.slice(0,a.lastIndexOf("/")):d=a.slice(0,a.indexOf("/")),v=a.slice(d.length+1)):(d="@",v=a),{pluginName:d,ruleName:v}}function u(a,d){var o,y,O;const{pluginName:v,ruleName:m}=s(a);return(O=(y=(o=d.plugins)==null?void 0:o[v])==null?void 0:y.rules)==null?void 0:O[m]}function p(a){if(!a.meta)return{...c};const d=a.meta.schema;if(typeof d>"u")return{...c};if(d===!1)return null;if(typeof d!="object"||d===null)throw new TypeError("Rule's `meta.schema` must be an array or object");return Array.isArray(d)?d.length?{type:"array",items:d,minItems:0,maxItems:d.length}:{...c}:d}return eb={parseRuleId:s,getRuleFromConfig:u,getRuleOptionsSchema:p},eb}var tb={},rb={},nb,HT;function F8(){if(HT)return nb;HT=1,nb=function(s,u){for(var p=[],a=0;a=0&&g>0){for(v=[],o=d.length;f>=0&&!O;)f==x?(v.push(f),x=d.indexOf(p,f+1)):v.length==1?O=[v.pop(),g]:(m=v.pop(),m=0?x:g;v.length&&(O=[o,y])}return O}return sb}var ib,JT;function B8(){if(JT)return ib;JT=1;var c=F8(),s=_8();ib=x;var u="\0SLASH"+Math.random()+"\0",p="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0";function m(k){return parseInt(k,10)==k?parseInt(k,10):k.charCodeAt(0)}function o(k){return k.split("\\\\").join(u).split("\\{").join(p).split("\\}").join(a).split("\\,").join(d).split("\\.").join(v)}function y(k){return k.split(u).join("\\").split(p).join("{").split(a).join("}").split(d).join(",").split(v).join(".")}function O(k){if(!k)return[""];var D=[],T=s("{","}",k);if(!T)return k.split(",");var R=T.pre,F=T.body,P=T.post,N=R.split(",");N[N.length-1]+="{"+F+"}";var I=O(P);return P.length&&(N[N.length-1]+=I.shift(),N.push.apply(N,I)),D.push.apply(D,N),D}function x(k){return k?(k.substr(0,2)==="{}"&&(k="\\{\\}"+k.substr(2)),E(o(k),!0).map(y)):[]}function g(k){return"{"+k+"}"}function f(k){return/^-?0\d/.test(k)}function b(k,D){return k<=D}function S(k,D){return k>=D}function E(k,D){var T=[],R=s("{","}",k);if(!R||/\$$/.test(R.pre))return[k];var F=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(R.body),P=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(R.body),N=F||P,I=R.body.indexOf(",")>=0;if(!N&&!I)return R.post.match(/,.*\}/)?(k=R.pre+"{"+R.body+a+R.post,E(k)):[k];var L;if(N)L=R.body.split(/\.\./);else if(L=O(R.body),L.length===1&&(L=E(L[0],!1).map(g),L.length===1)){var G=R.post.length?E(R.post,!1):[""];return G.map(function(ge){return R.pre+L[0]+ge})}var j=R.pre,G=R.post.length?E(R.post,!1):[""],U;if(N){var Q=m(L[0]),$=m(L[1]),W=Math.max(L[0].length,L[1].length),K=L.length==3?Math.abs(m(L[2])):1,te=b,V=$0){var ce=new Array(ne+1).join("0");z<0?ue="-"+ce+ue.slice(1):ue=ce+ue}}U.push(ue)}}else U=c(L,function(Z){return E(Z,!1)});for(var pe=0;pe"u"?this.pattern:L,T(L),j.nobrace||!/\{(?:(?!\{).)*\}/.test(L)?[L]:u(L)}var D=1024*64,T=function(L){if(typeof L!="string")throw new TypeError("invalid pattern");if(L.length>D)throw new TypeError("pattern is too long")};b.prototype.parse=F;var R={};function F(L,j){T(L);var G=this.options;if(L==="**")if(G.noglobstar)L="*";else return s;if(L==="")return"";var U="",Q=!!G.nocase,$=!1,W=[],K=[],te,V=!1,ae=-1,z=-1,ue=L.charAt(0)==="."?"":G.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",ne=this;function ce(){if(te){switch(te){case"*":U+=d,Q=!0;break;case"?":U+=a,Q=!0;break;default:U+="\\"+te;break}ne.debug("clearStateChar %j %j",te,U),te=!1}}for(var pe=0,Be=L.length,oe;pe-1;it--){var pt=K[it],kt=U.slice(0,pt.reStart),qt=U.slice(pt.reStart,pt.reEnd-8),Ut=U.slice(pt.reEnd-8,pt.reEnd),tr=U.slice(pt.reEnd);Ut+=tr;var fe=kt.split("(").length-1,Ve=tr;for(pe=0;pe"u"&&(G=this.partial),this.debug("match",j,this.pattern),this.comment)return!1;if(this.empty)return j==="";if(j==="/"&&G)return!0;var U=this.options;c.sep!=="/"&&(j=j.split(c.sep).join("/")),j=j.split(O),this.debug(this.pattern,"split",j);var Q=this.set;this.debug(this.pattern,"set",Q);var $,W;for(W=j.length-1;W>=0&&($=j[W],!$);W--);for(W=0;W>> no match, partial?`,L,ae,j,z),ae===W))}var ne;if(typeof te=="string"?(ne=V===te,this.debug("string match",te,V,ne)):(ne=V.match(te),this.debug("pattern match",te,V,ne)),!ne)return!1}if(Q===W&&$===K)return!0;if(Q===W)return G;if($===K)return Q===W-1&&L[Q]==="";throw new Error("wtf?")};function N(L){return L.replace(/\\(.)/g,"$1")}function I(L){return L.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}return ab}var So={},tD;function N8(){var o,y;if(tD)return So;tD=1;class c{static overwrite(g,f){return f}static replace(g,f){return typeof f<"u"?f:g}static assign(g,f){return Object.assign({},g,f)}}class s{static array(g){if(!Array.isArray(g))throw new TypeError("Expected an array.")}static boolean(g){if(typeof g!="boolean")throw new TypeError("Expected a Boolean.")}static number(g){if(typeof g!="number")throw new TypeError("Expected a number.")}static object(g){if(!g||typeof g!="object")throw new TypeError("Expected an object.")}static"object?"(g){if(typeof g!="object")throw new TypeError("Expected an object or null.")}static string(g){if(typeof g!="string")throw new TypeError("Expected a string.")}static"string!"(g){if(typeof g!="string"||g.length===0)throw new TypeError("Expected a non-empty string.")}}function u(x,g){let f=!1;if(g.schema)if(typeof g.schema=="object")f=!0;else throw new TypeError("Schema must be an object.");if(typeof g.merge=="string"){if(!(g.merge in c))throw new TypeError(`Definition for key "${x}" missing valid merge strategy.`)}else if(!f&&typeof g.merge!="function")throw new TypeError(`Definition for key "${x}" must have a merge property.`);if(typeof g.validate=="string"){if(!(g.validate in s))throw new TypeError(`Definition for key "${x}" missing valid validation strategy.`)}else if(!f&&typeof g.validate!="function")throw new TypeError(`Definition for key "${x}" must have a validate() method.`)}class p extends Error{constructor(g){super(`Unexpected key "${g}" found.`)}}class a extends Error{constructor(g){super(`Missing required key "${g}".`)}}class d extends Error{constructor(g,f){super(`Key "${g}" requires keys "${f.join('", "')}".`)}}class v extends Error{constructor(g,f){super(`Key "${g}": ${f.message}`,{cause:f});for(const b of Object.keys(f))b in this||(this[b]=f[b])}}const O=class{constructor(g){An(this,o,new Map);An(this,y,new Map);if(!g)throw new Error("Schema definitions missing.");for(const f of Object.keys(g)){if(u(f,g[f]),typeof g[f].schema=="object"){const b=new O(g[f].schema);g[f]={...g[f],merge(S={},E={}){return b.merge(S,E)},validate(S){s.object(S),b.validate(S)}}}typeof g[f].merge=="string"&&(g[f]={...g[f],merge:c[g[f].merge]}),typeof g[f].validate=="string"&&(g[f]={...g[f],validate:s[g[f].validate]}),Cr(this,o).set(f,g[f]),g[f].required&&Cr(this,y).set(f,g[f])}}hasKey(g){return Cr(this,o).has(g)}merge(...g){if(g.length<2)throw new TypeError("merge() requires at least two arguments.");if(g.some(f=>f===null||typeof f!="object"))throw new TypeError("All arguments must be objects.");return g.reduce((f,b)=>{this.validate(b);for(const[S,E]of Cr(this,o))try{if(S in f||S in b){const D=E.merge.call(this,f[S],b[S]);D!==void 0&&(f[S]=D)}}catch(k){throw new v(S,k)}return f},{})}validate(g){for(const f of Object.keys(g)){if(!this.hasKey(f))throw new p(f);const b=Cr(this,o).get(f);if(Array.isArray(b.requires)&&!b.requires.every(S=>S in g))throw new d(f,b.requires);try{b.validate.call(b,g[f])}catch(S){throw new v(f,S)}}for(const[f]of Cr(this,y))if(!(f in g))throw new a(f)}};let m=O;return o=new WeakMap,y=new WeakMap,So.MergeStrategy=c,So.ObjectSchema=m,So.ValidationStrategy=s,So}var rD;function nD(){return rD||(rD=1,function(c){var s=ao,u=L8(),p=qi(),a=N8();const d={required:!1,merge(){},validate(){}},v=Object.freeze({name:{required:!1,merge(){},validate(ne){if(typeof ne!="string")throw new TypeError("Property must be a string.")}},files:d,ignores:d});function m(ne){if(!Array.isArray(ne))throw new TypeError("Expected value to be an array.")}function o(ne){if(m(ne),ne.some(ce=>typeof ce!="string"&&typeof ce!="function"))throw new TypeError("Expected array to only contain strings and functions.")}function y(ne){if(!Array.isArray(ne)||ne.length===0)throw new TypeError("Expected value to be a non-empty array.")}const O=Object.freeze({files:{required:!1,merge(){},validate(ne){y(ne),ne.forEach(ce=>{if(Array.isArray(ce))o(ce);else if(typeof ce!="string"&&typeof ce!="function")throw new TypeError("Items must be a string, a function, or an array of strings and functions.")})}},ignores:{required:!1,merge(){},validate:o}}),x=u.Minimatch,g=p("@eslint/config-array"),f=new Map,b=new Map,S={dot:!0,allowWindowsEscape:!0},E=new Set(["array","function"]),k=new Set(["name"]),D=new a.ObjectSchema(O),T=Object.freeze({status:"external"}),R=Object.freeze({status:"ignored"}),F=Object.freeze({status:"unconfigured"});class P extends Error{constructor(ce,pe,{cause:Be,message:oe}){const Z=oe||Be.message;if(super(`Config ${ce}: ${Z}`,{cause:Be}),Be)for(const ge of Object.keys(Be))ge in this||(this[ge]=Be[ge]);this.name="ConfigError",this.index=pe}}function N(ne){return ne&&typeof ne.name=="string"&&ne.name?`"${ne.name}"`:"(unnamed)"}function I(ne,ce,pe){const Be=N(ne);throw new P(Be,ce,{cause:pe})}function L(ne){return typeof ne=="string"}function j(ne,ce){if(ne===null)throw new P(N(ne),ce,{message:"Unexpected null config."});if(ne===void 0)throw new P(N(ne),ce,{message:"Unexpected undefined config."});if(typeof ne!="object")throw new P(N(ne),ce,{message:"Unexpected non-object config."});const pe={};"files"in ne&&(pe.files=ne.files),"ignores"in ne&&(pe.ignores=ne.ignores);try{D.validate(pe)}catch(Be){I(ne,ce,Be)}}function G(ne,ce,pe={}){let Be=f;pe.flipNegate&&(Be=b);let oe=Be.get(ce);return oe||(oe=new x(ce,Object.assign({},S,pe)),Be.set(ce,oe)),oe.match(ne)}async function U(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");async function*Z(Se){for(let we of Se){if(typeof we=="function"){if(!Be)throw new TypeError("Unexpected function.");we=we(ce),we.then&&(we=await we)}if(Array.isArray(we)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(we)}else{if(typeof we=="function")throw new TypeError("A config function can only return an object or array.");yield we}}}const ge=await Z(ne),Re=[];for await(const Se of ge)Re.push(Se);return Re}function Q(ne,ce,pe){const Be=pe.includes("function"),oe=pe.includes("array");function*Z(ge){for(let Re of ge){if(typeof Re=="function"){if(!Be)throw new TypeError("Unexpected function.");if(Re=Re(ce),Re.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(Re)){if(!oe)throw new TypeError("Unexpected array.");yield*Z(Re)}else{if(typeof Re=="function")throw new TypeError("A config function can only return an object or array.");yield Re}}}return[...Z(ne)]}function $(ne,ce,pe){return pe.startsWith("..")?!0:ne.reduce((Be,oe)=>Be?typeof oe=="string"&&oe.startsWith("!")?!G(pe,oe,{flipNegate:!0}):Be:typeof oe=="function"?oe(ce):oe.startsWith("!")?!1:G(pe,oe),!1)}function W(ne,ce,pe){const Be=s.relative(ce,ne);return Object.keys(pe).filter(oe=>!k.has(oe)).length>1&&!$(pe.ignores,ne,Be)}function K(ne,ce,pe){const Be=s.relative(ce,ne);function oe(ge){if(L(ge))return G(Be,ge);if(typeof ge=="function")return ge(ne);throw new TypeError(`Unexpected matcher type ${ge}.`)}let Z=pe.files.some(ge=>Array.isArray(ge)?ge.every(oe):oe(ge));return Z&&pe.ignores&&(Z=!$(pe.ignores,ne,Be)),Z}function te(ne){if(!ne.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}function V(ne){if(ne.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const ce of ne)if(!E.has(ce))throw new TypeError(`Unexpected config type "${ce}" found. Expected one of: "object", "array", "function".`)}const ae={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},z=new WeakMap;class ue extends Array{constructor(ce,{basePath:pe="",normalized:Be=!1,schema:oe,extraConfigTypes:Z=[]}={}){super(),this[ae.isNormalized]=Be,this[ae.schema]=new a.ObjectSchema(Object.assign({},oe,v)),this.basePath=pe,V(Z),this.extraConfigTypes=[...Z],Object.freeze(this.extraConfigTypes),this[ae.configCache]=new Map,z.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(ce)?this.push(...ce):this.push(ce)}static get[Symbol.species](){return Array}get files(){te(this);const ce=z.get(this);if(ce.files)return ce.files;const pe=[];for(const Be of this)Be.files&&Be.files.forEach(oe=>{pe.push(oe)});return ce.files=pe,z.set(this,ce),pe}get ignores(){te(this);const ce=z.get(this);if(ce.ignores)return ce.ignores;const pe=[];for(const Be of this)Be.ignores&&Object.keys(Be).filter(oe=>!k.has(oe)).length===1&&pe.push(...Be.ignores);return ce.ignores=pe,z.set(this,ce),pe}isNormalized(){return this[ae.isNormalized]}async normalize(ce={}){if(!this.isNormalized()){const pe=await U(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(ce={}){if(!this.isNormalized()){const pe=Q(this,ce,this.extraConfigTypes);this.length=0,this.push(...pe.map(this[ae.preprocessConfig].bind(this))),this.forEach(j),this[ae.isNormalized]=!0,Object.freeze(this)}return this}[ae.finalizeConfig](ce){return ce}[ae.preprocessConfig](ce){return ce}getConfigWithStatus(ce){te(this);const pe=this[ae.configCache];if(pe.has(ce))return pe.get(ce);const Be=s.relative(this.basePath,ce);if(Be.startsWith(".."))return g(`No config for file ${ce} outside of base path`),pe.set(ce,T),T;if(this.isDirectoryIgnored(s.dirname(ce)))return g(`Ignoring ${ce} based on directory pattern`),pe.set(ce,R),R;if($(this.ignores,ce,Be))return g(`Ignoring ${ce} based on file pattern`),pe.set(ce,R),R;const oe=[];let Z=!1;const ge=/^\*$|\/\*{1,2}$/u;if(this.forEach((Me,it)=>{if(!Me.files){if(!Me.ignores){g(`Anonymous universal config found for ${ce}`),oe.push(it);return}if(W(ce,this.basePath,Me)){g(`Matching config found for ${ce} (based on ignores: ${Me.ignores})`),oe.push(it);return}g(`Skipped config found for ${ce} (based on ignores: ${Me.ignores})`);return}const pt=Me.files.filter(kt=>ge.test(kt));if(pt.length){g("Universal files patterns found. Checking carefully.");const kt=Me.files.filter(qt=>!ge.test(qt));if(kt.length&&K(ce,this.basePath,{files:kt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it),Z=!0;return}if(pt.length&&K(ce,this.basePath,{files:pt,ignores:Me.ignores})){g(`Matching config found for ${ce}`),oe.push(it);return}return}K(ce,this.basePath,Me)&&(g(`Matching config found for ${ce}`),oe.push(it),Z=!0)}),!Z)return g(`No matching configs found for ${ce}`),pe.set(ce,F),F;const Re=oe.toString();let Se=pe.get(Re);if(Se)return pe.set(ce,Se),Se;let we=oe.reduce((Me,it)=>{try{return this[ae.schema].merge(Me,this[it])}catch(pt){I(this[it],it,pt)}},{});return we=this[ae.finalizeConfig](we),Se=Object.freeze({config:we,status:"matched"}),pe.set(ce,Se),pe.set(Re,Se),Se}getConfig(ce){return this.getConfigWithStatus(ce).config}getConfigStatus(ce){return this.getConfigWithStatus(ce).status}isIgnored(ce){return this.isFileIgnored(ce)}isFileIgnored(ce){return this.getConfigStatus(ce)==="ignored"}isDirectoryIgnored(ce){te(this);const pe=s.relative(this.basePath,ce).replace(/\\/gu,"/");if(pe==="")return!1;if(pe.startsWith(".."))return!0;const Be=z.get(this).directoryMatches;if(Be.has(pe))return Be.get(pe);const oe=pe.split("/");let Z="",ge;do Z+=`${oe.shift()}/`,ge=$(this.ignores,s.join(this.basePath,Z),Z),Be.set(Z,ge);while(!ge&&oe.length);return Be.set(pe,ge),ge}}Object.defineProperty(c,"ObjectSchema",{enumerable:!0,get:function(){return a.ObjectSchema}}),c.ConfigArray=ue,c.ConfigArraySymbol=ae}(rb)),rb}var ob,sD;function iD(){if(sD)return ob;sD=1;function c(u){if([2,"2","error"].includes(u))return"error";if([1,"1","warn"].includes(u))return"warn";if([0,"0","off"].includes(u))return"off";throw new Error(`Invalid severity value: ${u}`)}function s(u){if([2,"2","error"].includes(u))return 2;if([1,"1","warn"].includes(u))return 1;if([0,"0","off"].includes(u))return 0;throw new Error(`Invalid severity value: ${u}`)}return ob={normalizeSeverityToString:c,normalizeSeverityToNumber:s},ob}var lb,aD;function ub(){if(aD)return lb;aD=1;const{normalizeSeverityToNumber:c}=iD(),s=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]);function u(U){return typeof U=="object"&&U!==null}function p(U){return u(U)&&!Array.isArray(U)}function a(U){return typeof U>"u"}function d(U,Q,$=new Map){let W=$.get(U);if(W){const te=W.get(Q);if(te)return te}else W=new Map,$.set(U,W);const K={...U,...Q};delete K.__proto__,W.set(Q,K);for(const te of Object.keys(Q)){if(te==="__proto__"||!Object.prototype.propertyIsEnumerable.call(U,te))continue;const V=U[te],ae=Q[te];p(V)&&p(ae)?K[te]=d(V,ae,$):a(ae)&&(K[te]=V)}return K}function v(U){const Q=Array.isArray(U)?U.slice(0):[U];return Q[0]=s.get(Q[0]),structuredClone(Q)}function m(U){for(const Q of Object.keys(U))if(typeof U[Q]=="function")return!0;return!1}class o extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:Q,value:$}}}function y(U,Q){if(typeof Q!="string"&&typeof Q!="number"&&!Array.isArray(Q))throw new o(U,Q)}class O extends Error{constructor(Q,$){super(`Key "${Q}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:Q,value:$}}}function x(U,Q){if(typeof s.get(Q)>"u")throw new O(U,Q)}function g(U){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(U))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${U}".`)}function f(U){if(!u(U))throw new TypeError("Expected an object.")}class b extends Error{constructor(Q){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:Q}}}class S extends Error{constructor(Q){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:Q}}}const E={merge:"replace",validate:"boolean"},k=new Set(["error","warn","off",2,1,0]),D={merge(U,Q){const $=Q===void 0?U:Q;return typeof $=="boolean"?$?"warn":"off":c($)},validate(U){if(!(k.has(U)||typeof U=="boolean"))throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},T={merge(U={},Q={}){return d(U,Q)},validate:"object"},R={merge(U={},Q={}){const $=d(U,Q);for(const[W,K]of Object.entries($))if(p(K)){if(m(K)){$[W]=Q[W]??U[W];continue}$[W]={...$[W]};continue}return $},validate:"object"},F={merge:"replace",validate:g},P={merge(U={},Q={}){const $=new Set([...Object.keys(U),...Object.keys(Q)]),W={};for(const K of $)if(K!=="__proto__"){if(K in U&&K in Q&&U[K]!==Q[K])throw new TypeError(`Cannot redefine plugin "${K}".`);W[K]=Q[K]||U[K]}return W},validate(U){if(U===null||typeof U!="object")throw new TypeError("Expected an object.");if(Array.isArray(U))throw new S(U);for(const Q of Object.keys(U))if(Q!=="__proto__"&&(U[Q]===null||typeof U[Q]!="object"))throw new TypeError(`Key "${Q}": Expected an object.`)}},N={merge:"replace",validate(U){if(typeof U=="string")g(U);else if(U&&typeof U=="object"){if(typeof U.preprocess!="function"||typeof U.postprocess!="function")throw new TypeError("Object must have a preprocess() and a postprocess() method.")}else throw new TypeError("Expected an object or a string.")}},I={merge(U={},Q={}){const $={...U,...Q};for(const W of Object.keys($))try{if(W==="__proto__"){delete $.__proto__;continue}if($[W]=v($[W]),!(W in U)||!(W in Q))continue;const K=v(U[W]),te=v(Q[W]);if(te.length===1){$[W]=[te[0],...K.slice(1)];continue}}catch(K){throw new Error(`Key "${W}": ${K.message}`,{cause:K})}return $},validate(U){f(U);for(const Q of Object.keys(U)){if(Q==="__proto__")continue;const $=U[Q];y(Q,$),Array.isArray($)?x(Q,$[0]):x(Q,$)}}};function L(U){return{merge:"replace",validate(){throw new b(U)}}}return lb={flatConfigSchema:{...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map(U=>[U,L(U)])),settings:T,linterOptions:{schema:{noInlineConfig:E,reportUnusedDisableDirectives:D}},language:F,languageOptions:R,processor:N,plugins:P,rules:I},hasMethod:m,assertIsRuleSeverity:x},lb}var cb={},fb,oD;function M8(){if(oD)return fb;oD=1;const c=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function s(y){return typeof y=="object"&&y!==null}function u(y){return s(y)&&!Array.isArray(y)}function p(y){return typeof y>"u"}function a(y){if(p(y))throw new TypeError('Key "ecmaVersion": Expected an "ecmaVersion" property.');if(typeof y!="number"&&y!=="latest")throw new TypeError('Key "ecmaVersion": Expected a number or "latest".')}function d(y){if(typeof y!="string"||!/^(?:script|module|commonjs)$/u.test(y))throw new TypeError('Key "sourceType": Expected "script", "module", or "commonjs".')}function v(y){if(!u(y))throw new TypeError('Key "globals": Expected an object.');for(const O of Object.keys(y))if(O!=="__proto__"){if(O!==O.trim())throw new TypeError(`Key "globals": Global "${O}" has leading or trailing whitespace.`);if(!c.has(y[O]))throw new TypeError(`Key "globals": Key "${O}": Expected "readonly", "writable", or "off".`)}}function m(y){if(!y||typeof y!="object"||typeof y.parse!="function"&&typeof y.parseForESLint!="function")throw new TypeError('Key "parser": Expected object with parse() or parseForESLint() method.')}function o(y){if(!u(y))throw new TypeError("Expected an object.");const{ecmaVersion:O,sourceType:x,globals:g,parser:f,parserOptions:b,...S}=y;if("ecmaVersion"in y&&a(O),"sourceType"in y&&d(x),"globals"in y&&v(g),"parser"in y&&m(f),"parserOptions"in y&&!u(b))throw new TypeError('Key "parserOptions": Expected an object.');const E=Object.keys(S);if(E.length>0)throw new TypeError(`Unexpected key "${E[0]}" found.`)}return fb={validateLanguageOptions:o},fb}var pb,lD;function uD(){if(lD)return pb;lD=1;const{SourceCode:c}=BE(),s=qi(),u=zl(),p=jc(),a=kl(),{validateLanguageOptions:d}=M8(),v=s("eslint:languages:js"),m=5;function o(y,O,x){const f=O.parserOptions.ecmaFeatures||{},b=O.ecmaVersion||m;return p.analyze(y,{ignoreEval:!0,nodejsScope:f.globalReturn,impliedStrict:f.impliedStrict,ecmaVersion:typeof b=="number"?b:6,sourceType:O.sourceType||"script",childVisitorKeys:x||a.KEYS,fallback:a.getKeys})}return pb={fileType:"text",lineStart:1,columnStart:0,nodeTypeKey:"type",visitorKeys:a.KEYS,validateLanguageOptions:d,matchesSelectorClass(y,O,x){switch(y.toLowerCase()){case"statement":if(O.type.slice(-9)==="Statement")return!0;case"declaration":return O.type.slice(-11)==="Declaration";case"pattern":if(O.type.slice(-7)==="Pattern")return!0;case"expression":return O.type.slice(-10)==="Expression"||O.type.slice(-7)==="Literal"||O.type==="Identifier"&&(x.length===0||x[0].type!=="MetaProperty")||O.type==="MetaProperty";case"function":return O.type==="FunctionDeclaration"||O.type==="FunctionExpression"||O.type==="ArrowFunctionExpression";default:throw new Error(`Unknown class name: ${y}`)}},parse(y,{languageOptions:O}){const{body:x,path:g}=y,f=x.replace(u.shebangPattern,(D,T)=>`//${T}`),{ecmaVersion:b,sourceType:S,parser:E}=O,k=Object.assign({ecmaVersion:b,sourceType:S},O.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:g});try{v("Parsing:",g);const D=typeof E.parseForESLint=="function"?E.parseForESLint(f,k):{ast:E.parse(f,k)};v("Parsing successful:",g);const{ast:T,services:R={},visitorKeys:F=a.KEYS,scopeManager:P}=D;return{ok:!0,ast:T,parserServices:R,visitorKeys:F,scopeManager:P}}catch(D){const T=D.message.replace(/^line \d+:/iu,"").trim();return v(`%s +%s`,T,D.stack),{ok:!1,errors:[{message:T,line:D.lineNumber,column:D.column}]}}},createSourceCode(y,O,{languageOptions:x}){const{body:g,path:f,bom:b}=y,{ast:S,parserServices:E,visitorKeys:k}=O;v("Scope analysis:",f);const D=O.scopeManager||o(S,x,k);return v("Scope analysis successful:",f),new c({text:g,ast:S,hasBOM:b,parserServices:E,scopeManager:D,visitorKeys:k})}},pb}var cD;function $8(){if(cD)return cb;cD=1;const c=QT();return cb.defaultConfig=[{plugins:{"@":{languages:{js:uD()},rules:new Proxy({},{get(s,u){return c.get(u)},has(s,u){return c.has(u)}})}},language:"@/js",languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:Pl(),parserOptions:{}},linterOptions:{reportUnusedDisableDirectives:1}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],cb}var hb={},j8="http://json-schema.org/draft-04/schema#",q8="http://json-schema.org/draft-04/schema#",Q8="Core schema meta-schema",U8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},V8="object",W8={id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},G8={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},z8={id:j8,$schema:q8,description:Q8,definitions:U8,type:V8,properties:W8,dependencies:G8,default:{}},db,fD;function Z8(){if(fD)return db;fD=1;const c=f1(),s=z8;return db=(u={})=>{const p=new c({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...u});return p.addMetaSchema(s),p._opts.defaultMeta=s.id,p},db}var pD;function hD(){if(pD)return hb;pD=1;const s=Z8()(),{parseRuleId:u,getRuleFromConfig:p,getRuleOptionsSchema:a}=YT(),d=ZT;function v({pluginName:y,ruleName:O},x){const f=`Key "rules": Key "${y==="@"?O:`${y}/${O}`}"`;let b=`${f}: Could not find plugin "${y}".`;if(x.plugins&&x.plugins[y]){const S=d.rules[O];if(y==="@"&&S)b=`${f}: Rule "${O}" was removed and replaced by "${S}".`;else{b=`${f}: Could not find "${O}" in plugin "${y}".`;for(const[E,k]of Object.entries(x.plugins))if(k.rules&&k.rules[O]){b+=` Did you mean "${E}/${O}"?`;break}}}throw new TypeError(b)}class m extends Error{constructor(O,x){super(`Error while processing options validation schema of rule '${O}': ${x.message}`,{cause:x}),this.code="ESLINT_INVALID_RULE_OPTIONS_SCHEMA"}}class o{constructor(){this.validators=new WeakMap}validate(O){if(O.rules)for(const[x,g]of Object.entries(O.rules)){if(x==="__proto__"||g[0]===0)continue;const f=p(x,O);if(f||v(u(x),O),!this.validators.has(f))try{const S=a(f);S&&this.validators.set(f,s.compile(S))}catch(S){throw new m(x,S)}const b=this.validators.get(f);if(b&&(b(g.slice(1)),b.errors))throw new Error(`Key "rules": Key "${x}": +${b.errors.map(S=>{var E,k;if(S.keyword==="additionalProperties"&&S.schema===!1&&typeof((E=S.parentSchema)==null?void 0:E.properties)=="object"&&typeof((k=S.params)==null?void 0:k.additionalProperty)=="string"){const D=Object.keys(S.parentSchema.properties).map(T=>`"${T}"`);return` Value ${JSON.stringify(S.data)} ${S.message}. + Unexpected property "${S.params.additionalProperty}". Expected properties: ${D.join(", ")}. +`}return` Value ${JSON.stringify(S.data)} ${S.message}. +`}).join("")}`)}}}return hb.RuleValidator=o,hb}var mb,dD;function X8(){var x,g;if(dD)return mb;dD=1;const{RuleValidator:c}=hD(),{flatConfigSchema:s,hasMethod:u}=ub(),{ObjectSchema:p}=nD(),a=new c,d=new Map([[0,0],[1,1],[2,2],["off",0],["warn",1],["error",2]]);function v(f){const b=f.split("/");return{objectName:b.pop(),pluginName:b.join("/")}}function m(f){let b=f.name;if(!b&&(!f.meta||(b=f.meta.name,!b)))return null;let S=f.version;return S||(S=f.meta&&f.meta.version),S?`${b}@${S}`:b}function o(f,b="languageOptions"){const S={};for(const[E,k]of Object.entries(f)){if(k){if(typeof k=="object"){const D=m(k);D&&u(k)?S[E]=D:S[E]=o(k,E);continue}if(typeof k=="function")throw new TypeError(`Cannot serialize key "${E}" in ${b}: Function values are not supported.`)}S[E]=k}return S}function y(f){for(const[b,S]of Object.entries(f))Array.isArray(S)||(f[b]=[S]),f[b][0]=d.get(f[b][0])}class O{constructor(b){An(this,x,void 0);An(this,g,void 0);const{plugins:S,language:E,languageOptions:k,processor:D,...T}=b;if(new p(s).validate(b),Object.assign(this,T),!E)throw new TypeError("Key 'language' is required.");this.plugins=S,this.language=E,k&&(this.languageOptions=k);const{pluginName:F,objectName:P}=v(E);if(Zi(this,x,E),!S||!S[F]||!S[F].languages||!S[F].languages[P])throw new TypeError(`Key "language": Could not find "${P}" in plugin "${F}".`);if(this.language=S[F].languages[P],this.languageOptions)try{this.language.validateLanguageOptions(this.languageOptions)}catch(N){throw new TypeError(`Key "languageOptions": ${N.message}`,{cause:N})}if(D)if(this.processor=D,typeof D=="string"){const{pluginName:N,objectName:I}=v(D);if(Zi(this,g,D),!S||!S[N]||!S[N].processors||!S[N].processors[I])throw new TypeError(`Key "processor": Could not find "${I}" in plugin "${N}".`);this.processor=S[N].processors[I]}else if(typeof D=="object")Zi(this,g,m(D)),this.processor=D;else throw new TypeError("Key 'processor' must be a string or an object.");this.rules&&(y(this.rules),a.validate(this))}toJSON(){if(this.processor&&!Cr(this,g))throw new Error("Could not serialize processor object (missing 'meta' object).");if(!Cr(this,x))throw new Error("Could not serialize language object (missing 'meta' object).");return{...this,plugins:Object.entries(this.plugins).map(([b,S])=>{const E=m(S);return E?`${b}:${E}`:b}),language:Cr(this,x),languageOptions:o(this.languageOptions),processor:Cr(this,g)}}}return x=new WeakMap,g=new WeakMap,mb={Config:O},mb}var mD;function Y8(){if(mD)return tb;mD=1;const{ConfigArray:c,ConfigArraySymbol:s}=nD(),{flatConfigSchema:u}=ub(),{defaultConfig:p}=$8(),{Config:a}=X8(),d=new Set(["name"]);function v(x,g,f){let b="user-defined",S=x.index;return x.index{throw f.name==="ConfigError"?v(f,this[o],this[y]):f})}normalizeSync(g){try{return super.normalizeSync(g)}catch(f){throw f.name==="ConfigError"?v(f,this[o],this[y]):f}}[s.preprocessConfig](g){if(!this.shouldIgnore&&!this[m].includes(g)&&g.ignores&&Object.keys(g).filter(f=>!d.has(f)).length===1){const{ignores:f,...b}=g;return b}return g}[s.finalizeConfig](g){return new a(g)}}return tb.FlatConfigArray=O,tb}var gb,gD;function H8(){return gD||(gD=1,gb={activeFlags:new Map([["test_only","Used only for testing."],["unstable_config_lookup_from_file","Look up eslint.config.js from the file being linted."],["unstable_ts_config","Enable TypeScript configuration files."]]),inactiveFlags:new Map([["test_only_old","Used only for testing."]])}),gb}var yb,yD;function bD(){if(yD)return yb;yD=1;function c(p){return typeof p=="string"?p.charCodeAt(0)===65279:p[0]===239&&p[1]===187&&p[2]===191}function s(p){return c(p)?typeof p=="string"?p.slice(1):p.slice(3):p}class u{constructor(a,d,{physicalPath:v}={}){or(this,"path");or(this,"physicalPath");or(this,"body");or(this,"rawBody");or(this,"bom");this.path=a,this.physicalPath=v??a,this.bom=c(d),this.body=s(d),this.rawBody=d}}return yb={VFile:u},yb}var bb,vD;function K8(){if(vD)return bb;vD=1;class c{parseSync(u,p){const{language:a,languageOptions:d}=p,v=a.parse(u,{languageOptions:d});if(typeof v.then=="function")throw new Error("Unsupported: Language parser returned a promise.");return v.ok?{ok:!0,sourceCode:a.createSourceCode(u,v,{languageOptions:d})}:{ok:!1,errors:v.errors.map(m=>({ruleId:null,nodeType:null,fatal:!0,severity:2,message:`Parsing error: ${m.message}`,line:m.line,column:m.column}))}}}return bb={ParserService:c},bb}var vb={},xD;function J8(){if(xD)return vb;xD=1;class c{constructor({cwd:u,filename:p,physicalFilename:a,sourceCode:d,parserOptions:v,parserPath:m,languageOptions:o,settings:y}){or(this,"cwd");or(this,"filename");or(this,"physicalFilename");or(this,"sourceCode");or(this,"parserOptions");or(this,"parserPath");or(this,"languageOptions");or(this,"settings");this.cwd=u,this.filename=p,this.physicalFilename=a,this.sourceCode=d,this.parserOptions=v,this.parserPath=m,this.languageOptions=o,this.settings=y,Object.freeze(this)}getCwd(){return this.cwd}getFilename(){return this.filename}getPhysicalFilename(){return this.physicalFilename}getSourceCode(){return this.sourceCode}}return vb.FileContext=c,vb}var xb,OD;function e9(){if(OD)return xb;OD=1;const c=ao,{VFile:s}=bD();class u{preprocessSync(a,d){const{processor:v}=d;let m;try{m=v.preprocess(a.rawBody,a.path)}catch(o){return{ok:!1,errors:[{ruleId:null,fatal:!0,severity:2,message:`Preprocessing error: ${o.message.replace(/^line \d+:/iu,"").trim()}`,line:o.lineNumber,column:o.column,nodeType:null}]}}if(typeof m.then=="function")throw new Error("Unsupported: Preprocessor returned a promise.");return{ok:!0,files:m.map((o,y)=>{if(typeof o=="string")return o;const O=c.join(a.path,`${y}_${o.filename}`);return new s(O,o.text,{physicalPath:a.physicalPath})})}}postprocessSync(a,d,v){const{processor:m}=v;return m.postprocess(d,a.path)}}return xb={ProcessorService:u},xb}var Ob,SD;function t9(){var Ue,Sx,Oe,Ex;if(SD)return Ob;SD=1;const c=ao,s=jc(),u=kl(),p=Pl(),a=xL(),d=VL,{Legacy:{ConfigOps:v,ConfigValidator:m,environments:o}}=d1(),y=tp(),{SourceCode:O}=BE(),x=W$(),{ConfigCommentParser:g}=RE(),f=Z$(),b=H$(),S=T8(),E=gE(),k=D8(),D=I8(),T=ZT,{getRuleFromConfig:R}=YT(),{FlatConfigArray:F}=Y8(),{startTime:P,endTime:N}=GT(),{RuleValidator:I}=hD(),{assertIsRuleSeverity:L}=ub(),{normalizeSeverityToString:j}=iD(),G=uD(),{activeFlags:U,inactiveFlags:Q}=H8(),$=qi()("eslint:linter"),W=10,K="espree",te=5,V=new g,ae={start:{line:1,column:0},end:{line:1,column:1}},z=Symbol.for("eslint.RuleTester.parser"),{LATEST_ECMA_VERSION:ue}=iC(),{VFile:ne}=bD(),{ParserService:ce}=K8(),{FileContext:pe}=J8(),{ProcessorService:Be}=e9(),oe=1,Z=2;function ge(de){return de===p||de[z]===p}function Re(de,ye,{exportedVariables:Le,enabledGlobals:X}){for(const ee of new Set([...Object.keys(ye),...Object.keys(X)])){const be=ye[ee]===void 0?void 0:v.normalizeConfigGlobal(ye[ee]),ve=X[ee]&&X[ee].value||be,Ne=X[ee]&&X[ee].comments;if(ve==="off")continue;let Ke=de.set.get(ee);Ke||(Ke=new s.Variable(ee,de),de.variables.push(Ke),de.set.set(ee,Ke)),Ke.eslintImplicitGlobalSetting=be,Ke.eslintExplicitGlobal=Ne!==void 0,Ke.eslintExplicitGlobalComments=Ne,Ke.writeable=ve==="writable"}Object.keys(Le).forEach(ee=>{const be=de.set.get(ee);be&&(be.eslintUsed=!0,be.eslintExported=!0)}),de.through=de.through.filter(ee=>{const be=ee.identifier.name,Ee=de.set.get(be);return Ee?(ee.resolved=Ee,Ee.references.push(ee),!1):!0})}function Se(de){return Object.hasOwn(T.rules,de)?`Rule '${de}' was removed and replaced by: ${T.rules[de].join(", ")}`:`Definition for rule '${de}' was not found.`}function we({line:de,column:ye,endLine:Le,endColumn:X},ee){const be=ee.columnStart===1?0:1,Ee=ee.lineStart===1?0:1,ve=Le===void 0?Le:Le+Ee,Ne=X===void 0?X:X+be;return{line:de+Ee,column:ye+be,endLine:ve,endColumn:Ne}}function Me(de){const{ruleId:ye=null,loc:Le=ae,message:X=Se(de.ruleId),severity:ee=2,language:be={columnStart:0,lineStart:1}}=de;return{ruleId:ye,message:X,...we({line:Le.start.line,column:Le.start.column,endLine:Le.end.line,endColumn:Le.end.column},be),severity:ee,nodeType:null}}function it({type:de,value:ye,justification:Le,node:X},ee,be,Ee){const ve=Object.keys(V.parseListConfig(ye)),Ne=ve.length?ve:[null],Ke={directives:[],directiveProblems:[]},at={node:X,value:ye,ruleIds:ve};for(const dt of Ne){const ht=Ee.getLoc(X);if(dt===null||ee(dt))if(de==="disable-next-line"){const{line:Ce,column:xe}=we(ht.end,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else{const{line:Ce,column:xe}=we(ht.start,be);Ke.directives.push({parentDirective:at,type:de,line:Ce,column:xe,ruleId:dt,justification:Le})}else Ke.directiveProblems.push(Me({ruleId:dt,loc:ht,language:be}))}return Ke}function pt(de,ye,Le,X){const ee={},be=Object.create(null),Ee={},ve=[],Ne=[],Ke=new m({builtInRules:S});return de.getInlineConfigNodes().filter(at=>at.type!=="Shebang").forEach(at=>{const dt=V.parseDirective(at.value);if(!dt)return;const{label:ht,value:Ce,justification:xe}=dt,je=/^eslint-disable-(next-)?line$/u.test(ht);if(at.type==="Line"&&!je)return;const ze=de.getLoc(at);if(Le){const Ge=at.type==="Block"?`/*${ht}*/`:`//${ht}`;ve.push(Me({ruleId:null,message:`'${Ge}' has no effect because you have 'noInlineConfig' setting in ${Le}.`,loc:ze,severity:1}));return}if(ht==="eslint-disable-line"&&ze.start.line!==ze.end.line){const Ge=`${ht} comment should not span multiple lines.`;ve.push(Me({ruleId:null,message:Ge,loc:ze}));return}switch(ht){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const Ge=ht.slice(7),{directives:ut,directiveProblems:qe}=it({type:Ge,value:Ce,justification:xe,node:at},ye,G,de);Ne.push(...ut),ve.push(...qe);break}case"exported":Object.assign(Ee,V.parseListConfig(Ce));break;case"globals":case"global":for(const[Ge,ut]of Object.entries(V.parseStringConfig(Ce))){let qe;try{qe=v.normalizeConfigGlobal(ut)}catch(et){ve.push(Me({ruleId:null,loc:ze,message:et.message}));continue}be[Ge]?(be[Ge].comments.push(at),be[Ge].value=qe):be[Ge]={comments:[at],value:qe}}break;case"eslint":{const Ge=V.parseJSONLikeConfig(Ce);if(Ge.ok)Object.keys(Ge.config).forEach(ut=>{const qe=ye(ut),et=Ge.config[ut];if(!qe){ve.push(Me({ruleId:ut,loc:ze}));return}if(Object.hasOwn(ee,ut)){ve.push(Me({message:`Rule "${ut}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:ze}));return}let bt=Array.isArray(et)?et:[et];bt.length===1&&X.rules&&Object.hasOwn(X.rules,ut)&&(bt=[bt[0],...Array.isArray(X.rules[ut])?X.rules[ut].slice(1):[]]);try{Ke.validateRuleOptions(qe,ut,bt)}catch(rt){if(rt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw rt;ve.push(Me({ruleId:ut,message:rt.message,loc:ze}));return}ee[ut]=bt});else{const ut=Me({ruleId:null,loc:ze,message:Ge.error.message});ut.fatal=!0,ve.push(ut)}break}}}),{configuredRules:ee,enabledGlobals:be,exportedVariables:Ee,problems:ve,disableDirectives:Ne}}function kt(de,ye,Le){const X=[],ee=[];if(de.getDisableDirectives){const{directives:be,problems:Ee}=de.getDisableDirectives();ee.push(...Ee.map(ve=>Me({...ve,language:Le}))),be.forEach(ve=>{const{directives:Ne,directiveProblems:Ke}=it(ve,ye,Le,de);X.push(...Ne),ee.push(...Ke)})}return{problems:ee,disableDirectives:X}}function qt(de,ye){return ge(de)&&ye==="latest"?p.latestEcmaVersion:ye>=2015?ye-2009:ye}function Ut(de){switch(de){case 3:return 3;case 5:case void 0:return 5;default:if(typeof de=="number")return de>=2015?de:de+2009}return ue}const tr=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function fe(de){let ye,Le;for(tr.lastIndex=0;(ye=tr.exec(de))!==null;)ye[0].endsWith("*/")&&(Le=Object.assign(Le||{},V.parseListConfig(V.parseDirective(ye[0].slice(2,-2)).value)));return Le}function Ve(de){const ye=de.split(c.sep),Le=ye.lastIndexOf("");return Le===-1?de:ye.slice(Le).join(c.sep)}function mt(de,ye){const Le=ye.linterOptions||ye,X=Le.noInlineConfig===!0,ee=de.allowInlineConfig===!1,be=ye.configNameOfNoInlineConfig?` (${ye.configNameOfNoInlineConfig})`:"";let Ee=de.reportUnusedDisableDirectives;typeof Ee=="boolean"&&(Ee=Ee?"error":"off"),typeof Ee!="string"&&(typeof Le.reportUnusedDisableDirectives=="boolean"?Ee=Le.reportUnusedDisableDirectives?"warn":"off":Ee=Le.reportUnusedDisableDirectives===void 0?"off":j(Le.reportUnusedDisableDirectives));let ve=de.ruleFilter;return typeof ve!="function"&&(ve=()=>!0),{filename:Ve(de.filename||""),allowInlineConfig:!ee,warnInlineConfig:X&&!ee?`your config${be}`:null,reportUnusedDisableDirectives:Ee,disableFixes:!!de.disableFixes,stats:de.stats,ruleFilter:ve}}function Pt(de,ye,Le){const X=Le.filter(Ee=>Ee.parserOptions).reduce((Ee,ve)=>a(Ee,ve.parserOptions),{}),ee=a(X,ye||{});return ee.sourceType==="module"&&(ee.ecmaFeatures=Object.assign({},ee.ecmaFeatures,{globalReturn:!1})),ee.ecmaVersion=qt(de,ee.ecmaVersion),ee}function Bt({globals:de,parser:ye,parserOptions:Le}){const{ecmaVersion:X,sourceType:ee}=Le;return{globals:de,ecmaVersion:Ut(X),sourceType:ee,parser:ye,parserOptions:Le}}function se(de,ye){return Object.assign(Object.create(null),...ye.filter(Le=>Le.globals).map(Le=>Le.globals),de)}function Kt(de,ye,Le){var Ee,ve,Ne;const{type:X,key:ee}=ye;Le.times||(Le.times={passes:[{}]});const be=Le.fixPasses;be>Le.times.passes.length-1&&Le.times.passes.push({}),ee?((Ee=Le.times.passes[be])[X]??(Ee[X]={}),(ve=Le.times.passes[be][X])[ee]??(ve[ee]={total:0}),Le.times.passes[be][X][ee].total+=de):((Ne=Le.times.passes[be])[X]??(Ne[X]={total:0}),Le.times.passes[be][X].total+=de)}function Vt(de){return Array.isArray(de)?de.slice(1):[]}function ir(de,ye,Le){const ee=ye.parserOptions.ecmaFeatures||{},be=ye.ecmaVersion||te;return s.analyze(de,{ignoreEval:!0,nodejsScope:ee.globalReturn,impliedStrict:ee.impliedStrict,ecmaVersion:typeof be=="number"?be:6,sourceType:ye.sourceType||"script",childVisitorKeys:u.KEYS,fallback:y.getKeys})}function Ot(de,ye){if(!de||typeof de!="object"||typeof de.create!="function")throw new TypeError(`Error while loading rule '${ye.id}': Rule must be an object with a \`create\` method`);try{return de.create(ye)}catch(Le){throw Le.message=`Error while loading rule '${ye.id}': ${Le.message}`,Le}}function Zt(de,ye,Le,X,ee,be,Ee,ve,Ne,Ke,at,dt,ht,Ce){const xe=E(),je=de.traverse(),ze=new pe({cwd:Ke,filename:ve,physicalFilename:at||ve,sourceCode:de,parserOptions:{...be.parserOptions},parserPath:X,languageOptions:be,settings:Ee}),Ge=[];Object.keys(ye).forEach(qe=>{const et=v.getRuleSeverity(ye[qe]);if(et===0||dt&&!dt({ruleId:qe,severity:et}))return;const bt=Le(qe);if(!bt){Ge.push(Me({ruleId:qe,language:ee}));return}const rt=bt.meta&&bt.meta.messages;let St=null;const jt=Object.freeze(Object.assign(Object.create(ze),{id:qe,options:Vt(ye[qe]),report(...ar){St===null&&(St=b({ruleId:qe,severity:et,sourceCode:de,messageIds:rt,disableFixes:Ne,language:ee}));const nr=St(...ar);if(nr.fix&&!(bt.meta&&bt.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(nr.suggestions&&!(bt.meta&&bt.meta.hasSuggestions===!0))throw bt.meta&&bt.meta.docs&&typeof bt.meta.docs.suggestion<"u"?new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."):new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");Ge.push(nr)}})),Wt=D.enabled||ht?D.time(qe,Ot,ht)(bt,jt):Ot(bt,jt),Lt=ht?Wt.result:Wt;ht&&Kt(Wt.tdiff,{type:"rules",key:qe},Ce);function rr(ar){return function(...Lr){try{const wr=ar(...Lr),Nr=ht?wr.result:wr;return ht&&Kt(wr.tdiff,{type:"rules",key:qe},Ce),Nr}catch(wr){throw wr.ruleId=qe,wr}}}if(typeof Lt>"u"||Lt===null)throw new Error(`The create() function for rule '${qe}' did not return an object.`);Object.keys(Lt).forEach(ar=>{const nr=D.enabled||ht?D.time(qe,Lt[ar],ht):Lt[ar];xe.on(ar,rr(nr))})});const ut=new f(xe,{visitorKeys:de.visitorKeys??ee.visitorKeys,fallback:y.getKeys,matchClass:ee.matchesSelectorClass??(()=>!1),nodeTypeKey:ee.nodeTypeKey});for(const qe of je)switch(qe.kind){case oe:{try{qe.phase===1?ut.enterNode(qe.target):ut.leaveNode(qe.target)}catch(et){throw et.currentNode=qe.target,et}break}case Z:{xe.emit(qe.target,...qe.args);break}default:throw new Error(`Invalid traversal step found: "${qe.type}".`)}return Ge}function hr(de){if(typeof de=="object"){const{hasBOM:ye,text:Le}=de;return(ye?"\uFEFF":"")+Le}return String(de)}function Dt(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginEnvironments.get(ye)||o.get(ye)||null}function Dr(de,ye){return de.lastConfigArray&&de.lastConfigArray.pluginRules.get(ye)||de.ruleMap.get(ye)}function Et(de){if(de)return de;if(typeof xr=="object")return xr.cwd()}const Ie=new WeakMap;function ke(de){const{configType:ye}=Ie.get(de);if(ye==="flat")throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}class Te{constructor({cwd:ye,configType:Le="flat",flags:X=[]}={}){An(this,Ue);An(this,Oe);X.forEach(ee=>{if(Q.has(ee))throw new Error(`The flag '${ee}' is inactive: ${Q.get(ee)}`);if(!U.has(ee))throw new Error(`Unknown flag '${ee}'.`)}),Ie.set(this,{cwd:Et(ye),flags:X,lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:Le,parserMap:new Map([["espree",p]]),ruleMap:new S}),this.version=d.version}static get version(){return d.version}hasFlag(ye){return Ie.get(this).flags.includes(ye)}_verifyWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Ue,Sx).call(this,ve,Le,X)}verify(ye,Le,X){$("Verify");const{configType:ee,cwd:be}=Ie.get(this),Ee=typeof X=="string"?{filename:X}:X||{},ve=Le??{};if(ee!=="eslintrc"){let Ne=ve;return(!Array.isArray(ve)||typeof ve.getConfig!="function")&&(Ne=new F(ve,{basePath:be}),Ne.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(ye,Ne,Ee,!0))}return typeof ve.extractConfig=="function"?this._distinguishSuppressedMessages(this._verifyWithConfigArray(ye,ve,Ee)):Ee.preprocess||Ee.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(ye,ve,Ee)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(ye,ve,Ee))}_verifyWithFlatConfigArrayAndProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path||"(unnamed)"),typeof qe=="string"?this._verifyWithFlatConfigArrayAndWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Oe,Ex).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_verifyWithFlatConfigArrayAndWithoutProcessors(ye,Le,X){const ee=Ie.get(this),be=Ve(X.filename||"");let Ee;typeof ye=="string"?(ee.lastSourceCode=null,Ee=ye):(ee.lastSourceCode=ye,Ee=ye.text);const ve=new ne(be,Ee,{physicalPath:X.physicalFilename});return xa(this,Oe,Ex).call(this,ve,Le,X)}_verifyWithConfigArray(ye,Le,X){$("With ConfigArray: %s",X.filename),Ie.get(this).lastConfigArray=Le;const ee=Le.extractConfig(X.filename),be=ee.processor&&Le.pluginProcessors.get(ee.processor);if(be){$("Apply the processor: %o",ee.processor);const{preprocess:Ee,postprocess:ve,supportsAutofix:Ne}=be,Ke=X.disableFixes||!Ne;return this._verifyWithProcessor(ye,ee,{...X,disableFixes:Ke,postprocess:ve,preprocess:Ee},Le)}return this._verifyWithoutProcessors(ye,ee,X)}_verifyWithFlatConfigArray(ye,Le,X,ee=!1){$("With flat config: %s",X.filename);const be=X.filename||"__placeholder__.js";Ie.get(this).lastConfigArray=Le;const Ee=Le.getConfig(be);if(!Ee)return[{ruleId:null,severity:1,message:`No matching configuration found for ${be}.`,line:0,column:0,nodeType:null}];if(Ee.processor){$("Apply the processor: %o",Ee.processor);const{preprocess:ve,postprocess:Ne,supportsAutofix:Ke}=Ee.processor,at=X.disableFixes||!Ke;return this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,{...X,filename:be,disableFixes:at,postprocess:Ne,preprocess:ve},Le)}return ee&&(X.preprocess||X.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(ye,Ee,X):this._verifyWithFlatConfigArrayAndWithoutProcessors(ye,Ee,X)}_verifyWithProcessor(ye,Le,X,ee){const be=Ie.get(this),Ee=X.filename||"",ve=Ve(Ee),Ne=X.physicalFilename||ve,Ke=hr(ye),at=new ne(ve,Ke,{physicalPath:Ne}),dt=X.preprocess||(qe=>[qe]),ht=X.postprocess||(qe=>qe.flat()),Ce=new Be,xe=Ce.preprocessSync(at,{processor:{preprocess:dt,postprocess:ht}});if(!xe.ok)return xe.errors;const je=X.filterCodeBlock||(qe=>qe.endsWith(".js")),ze=c.extname(Ee),{files:Ge}=xe,ut=Ge.map(qe=>($("A code block was found: %o",qe.path??"(unnamed)"),typeof qe=="string"?this._verifyWithoutProcessors(qe,Le,X):je(qe.path,qe.body)?ee&&(Ke!==qe.rawBody||c.extname(qe.path)!==ze)?($("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(qe.rawBody,ee,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):(be.lastSourceCode=null,xa(this,Ue,Sx).call(this,qe,Le,{...X,filename:qe.path,physicalFilename:qe.physicalPath})):($("This code block was skipped."),[])));return Ce.postprocessSync(at,ut,{processor:{preprocess:dt,postprocess:ht}})}_distinguishSuppressedMessages(ye){const Le=[],X=[],ee=Ie.get(this);for(const be of ye)be.suppressions?X.push(be):Le.push(be);return ee.lastSuppressedMessages=X,Le}getSourceCode(){return Ie.get(this).lastSourceCode}getTimes(){return Ie.get(this).times??{passes:[]}}getFixPassCount(){return Ie.get(this).fixPasses??0}getSuppressedMessages(){return Ie.get(this).lastSuppressedMessages}defineRule(ye,Le){ke(this),Ie.get(this).ruleMap.define(ye,Le)}defineRules(ye){ke(this),Object.getOwnPropertyNames(ye).forEach(Le=>{this.defineRule(Le,ye[Le])})}getRules(){ke(this);const{lastConfigArray:ye,ruleMap:Le}=Ie.get(this);return new Map(function*(){yield*Le,ye&&(yield*ye.pluginRules)}())}defineParser(ye,Le){ke(this),Ie.get(this).parserMap.set(ye,Le)}verifyAndFix(ye,Le,X){let ee,be,Ee=!1,ve=0,Ne=ye;const Ke=X&&X.filename||`${ye.slice(0,10)}...`,at=X&&typeof X.fix<"u"?X.fix:!0,dt=X==null?void 0:X.stats,ht=Ie.get(this);dt&&(delete ht.times,ht.fixPasses=0);do{ve++;let Ce;dt&&(Ce=P()),$(`Linting code for ${Ke} (pass ${ve})`),ee=this.verify(Ne,Le,X),$(`Generating fixed text for ${Ke} (pass ${ve})`);let xe;if(dt&&(xe=P()),be=k.applyFixes(Ne,ee,at),dt)if(be.fixed){const je=N(xe);Kt(je,{type:"fix"},ht),ht.fixPasses++}else Kt(0,{type:"fix"},ht);if(ee.length===1&&ee[0].fatal)break;if(Ee=Ee||be.fixed,Ne=be.output,dt){Ce=N(Ce);const je=ht.times.passes.length-1;ht.times.passes[je].total=Ce}}while(be.fixed&&veat[et]).map(et=>Dt(ee,et)).filter(et=>et),ht=Pt(Ne,be.parserOptions||{},dt),Ce=se(be.globals||{},dt),xe=be.settings||{},je=Bt({globals:be.globals,parser:Ne,parserOptions:ht});if(ee.lastSourceCode)ee.lastSourceCode.scopeManager||(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,je)}));else{let et;Ee.stats&&(et=P());const rt=new ce().parseSync(ye,{language:G,languageOptions:je});if(Ee.stats){const St=N(et);Kt(St,{type:"parse"},ee)}if(!rt.ok)return rt.errors;ee.lastSourceCode=rt.sourceCode}const ze=ee.lastSourceCode,Ge=Ee.allowInlineConfig?pt(ze,et=>Dr(ee,et),Ee.warnInlineConfig,be):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};Re(ze.scopeManager.scopes[0],Ce,{exportedVariables:Ge.exportedVariables,enabledGlobals:Ge.enabledGlobals});const ut=Object.assign({},be.rules,Ge.configuredRules);let qe;try{qe=Zt(ze,ut,et=>Dr(ee,et),ve,G,je,xe,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,null,Ee.stats,ee)}catch(et){if(et.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),et.currentNode){const{line:bt}=ze.getLoc(et.currentNode).start;$("Line:",bt),et.message+=`:${bt}`}throw $("Parser Options:",ht),$("Parser Path:",ve),$("Settings:",xe),et.ruleId&&(et.message+=` +Rule: "${et.ruleId}"`),et}return x({language:G,sourceCode:ze,directives:Ge.disableDirectives,disableFixes:Ee.disableFixes,problems:qe.concat(Ge.problems).sort((et,bt)=>et.line-bt.line||et.column-bt.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives})},Oe=new WeakSet,Ex=function(ye,Le,X){var je,ze,Ge;const ee=Ie.get(this),be=Le||{},Ee=mt(X,be),ve=be.languageOptions;if(ve.ecmaVersion=Ut(ve.ecmaVersion),!ve.parser)throw new TypeError(`No parser specified for ${Ee.filename}`);if(ge(ve.parser)){const ut=ve.parserOptions;ve.sourceType&&(ut.sourceType=ve.sourceType,ut.sourceType==="module"&&ut.ecmaFeatures&&ut.ecmaFeatures.globalReturn&&(ut.ecmaFeatures.globalReturn=!1))}const Ne=be.settings||{};if(ee.lastSourceCode)ee.lastSourceCode.scopeManager===null&&(ee.lastSourceCode=new O({text:ee.lastSourceCode.text,ast:ee.lastSourceCode.ast,hasBOM:ee.lastSourceCode.hasBOM,parserServices:ee.lastSourceCode.parserServices,visitorKeys:ee.lastSourceCode.visitorKeys,scopeManager:ir(ee.lastSourceCode.ast,ve)}));else{let ut;Ee.stats&&(ut=P());const et=new ce().parseSync(ye,be);if(Ee.stats){const bt=N(ut);Kt(bt,{type:"parse"},ee)}if(!et.ok)return et.errors;ee.lastSourceCode=et.sourceCode}const Ke=ee.lastSourceCode;(je=Ke.applyLanguageOptions)==null||je.call(Ke,ve);const at={rules:{}},dt=[];if(Ee.allowInlineConfig)if(Ee.warnInlineConfig)Ke.getInlineConfigNodes&&Ke.getInlineConfigNodes().forEach(ut=>{const qe=Ke.getLoc(ut),et=Ke.getRange(ut);dt.push(Me({ruleId:null,message:`'${Ke.text.slice(et[0],et[1])}' has no effect because you have 'noInlineConfig' setting in ${Ee.warnInlineConfig}.`,loc:qe,severity:1,language:be.language}))});else{const ut=(ze=Ke.applyInlineConfig)==null?void 0:ze.call(Ke);if(ut){dt.push(...ut.problems.map(et=>Me({...et,language:be.language})).map(et=>(et.fatal=!0,et)));const qe=new I;for(const{config:et,loc:bt}of ut.configs)Object.keys(et.rules).forEach(rt=>{const St=R(rt,be),jt=et.rules[rt];if(!St){dt.push(Me({ruleId:rt,loc:bt,language:be.language}));return}if(Object.hasOwn(at.rules,rt)){dt.push(Me({message:`Rule "${rt}" is already configured by another configuration comment in the preceding code. This configuration is ignored.`,loc:bt,language:be.language}));return}try{let Wt=Array.isArray(jt)?jt:[jt];L(rt,Wt[0]);let Lt=!0;Wt.length===1&&be.rules&&Object.hasOwn(be.rules,rt)&&(Wt=[Wt[0],...be.rules[rt].slice(1)],be.rules[rt][0]>0&&(Lt=!1)),Lt&&qe.validate({plugins:be.plugins,rules:{[rt]:Wt}}),at.rules[rt]=Wt}catch(Wt){if(Wt.code==="ESLINT_INVALID_RULE_OPTIONS_SCHEMA")throw Wt;let Lt=Wt.message.slice(Wt.message.startsWith('Key "rules":')?Wt.message.indexOf(":",12)+1:Wt.message.indexOf(":")+1).trim();Wt.messageTemplate&&(Lt+=` You passed "${jt}".`),dt.push(Me({ruleId:rt,message:`Inline configuration for rule "${rt}" is invalid: + ${Lt} +`,loc:bt,language:be.language}))}})}}const ht=Ee.allowInlineConfig&&!Ee.warnInlineConfig?kt(Ke,ut=>R(ut,be),be.language):{problems:[],disableDirectives:[]},Ce=Object.assign({},be.rules,at.rules);let xe;(Ge=Ke.finalize)==null||Ge.call(Ke);try{xe=Zt(Ke,Ce,ut=>R(ut,be),void 0,be.language,ve,Ne,Ee.filename,Ee.disableFixes,ee.cwd,X.physicalFilename,Ee.ruleFilter,Ee.stats,ee)}catch(ut){if(ut.message+=` +Occurred while linting ${Ee.filename}`,$("An error occurred while traversing"),$("Filename:",Ee.filename),ut.currentNode){const{line:qe}=Ke.getLoc(ut.currentNode).start;$("Line:",qe),ut.message+=`:${qe}`}throw $("Parser Options:",ve.parserOptions),$("Settings:",Ne),ut.ruleId&&(ut.message+=` +Rule: "${ut.ruleId}"`),ut}return x({language:be.language,sourceCode:Ke,directives:ht.disableDirectives,disableFixes:Ee.disableFixes,problems:xe.concat(ht.problems).concat(dt).sort((ut,qe)=>ut.line-qe.line||ut.column-qe.column),reportUnusedDisableDirectives:Ee.reportUnusedDisableDirectives,ruleFilter:Ee.ruleFilter,configuredRules:Ce})},Ob={Linter:Te,getLinterInternalSlots(de){return Ie.get(de)}},Ob}function r9(){return t9().Linter}var n9=l.Linter=r9();t.Linter=n9,t.default=l,Object.defineProperty(t,"__esModule",{value:!0})})})(mH,dc);const xn=({variant:n,settings:e,styles:t})=>{const r=Mt.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),i=vl.define(t);return[r,C_(i)]};xn({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:re.comment,color:"#404080"},{tag:[re.string,re.regexp],color:"#999999"},{tag:re.number,color:"#7090B0"},{tag:[re.bool,re.null],color:"#8080A0"},{tag:[re.punctuation,re.derefOperator],color:"#805080"},{tag:re.keyword,color:"#60B0FF"},{tag:re.definitionKeyword,color:"#B0FFF0"},{tag:re.moduleKeyword,color:"#60B0FF"},{tag:re.operator,color:"#A0A0FF"},{tag:[re.variableName,re.self],color:"#008080"},{tag:re.operatorKeyword,color:"#A0A0FF"},{tag:re.controlKeyword,color:"#80A0FF"},{tag:re.className,color:"#70E080"},{tag:[re.function(re.propertyName),re.propertyName],color:"#50A0A0"},{tag:re.tagName,color:"#009090"},{tag:re.modifier,color:"#B0FFF0"},{tag:[re.squareBracket,re.attributeName],color:"#D0D0FF"}]});xn({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:re.comment,color:"#787b8099"},{tag:re.string,color:"#86b300"},{tag:re.regexp,color:"#4cbf99"},{tag:[re.number,re.bool,re.null],color:"#ffaa33"},{tag:re.variableName,color:"#5c6166"},{tag:[re.definitionKeyword,re.modifier],color:"#fa8d3e"},{tag:[re.keyword,re.special(re.brace)],color:"#fa8d3e"},{tag:re.operator,color:"#ed9366"},{tag:re.separator,color:"#5c6166b3"},{tag:re.punctuation,color:"#5c6166"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#f2ae49"},{tag:[re.className,re.definition(re.typeName)],color:"#22a4e6"},{tag:[re.tagName,re.typeName,re.self,re.labelName],color:"#55b4d4"},{tag:re.angleBracket,color:"#55b4d480"},{tag:re.attributeName,color:"#f2ae49"}]});xn({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:re.comment,color:"#6E6E6E"},{tag:[re.string,re.regexp,re.special(re.brace)],color:"#5C81B3"},{tag:re.number,color:"#C1E1B8"},{tag:re.bool,color:"#53667D"},{tag:[re.definitionKeyword,re.modifier,re.function(re.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[re.keyword,re.moduleKeyword,re.operatorKeyword,re.operator],color:"#697A8E",fontWeight:"bold"},{tag:[re.variableName,re.attributeName],color:"#708E67"},{tag:[re.function(re.variableName),re.definition(re.propertyName),re.derefOperator],color:"#fff"},{tag:re.tagName,color:"#A3D295"}]});xn({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:re.comment,color:"#666666"},{tag:[re.string,re.special(re.brace)],color:"#54BE0D"},{tag:re.regexp,color:"#E9C062"},{tag:re.number,color:"#CF6A4C"},{tag:[re.keyword,re.operator],color:"#5EA6EA"},{tag:re.variableName,color:"#7587A6"},{tag:[re.definitionKeyword,re.modifier],color:"#F9EE98"},{tag:[re.propertyName,re.function(re.variableName)],color:"#937121"},{tag:[re.typeName,re.angleBracket,re.tagName],color:"#9B859D"}]});xn({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:re.comment,color:"#6B4E32"},{tag:[re.keyword,re.operator,re.derefOperator],color:"#EF5D32"},{tag:re.className,color:"#EFAC32",fontWeight:"bold"},{tag:[re.typeName,re.propertyName,re.function(re.variableName),re.definition(re.variableName)],color:"#EFAC32"},{tag:re.definition(re.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:re.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[re.number,re.bool],color:"#6C99BB"},{tag:[re.variableName,re.self],color:"#7DAF9C"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#D9D762"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#EFCB43"}]});xn({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:re.comment,color:"#404040"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#00D8FF"},{tag:re.number,color:"#E62286"},{tag:[re.variableName,re.attributeName,re.self],color:"#E62286",fontWeight:"bold"},{tag:re.function(re.variableName),color:"#fff",fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:re.comment,color:"#BCC8BA"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#5D90CD"},{tag:[re.number,re.bool,re.null],color:"#46A609"},{tag:re.keyword,color:"#AF956F"},{tag:[re.definitionKeyword,re.modifier],color:"#C52727"},{tag:[re.angleBracket,re.tagName,re.attributeName],color:"#606060"},{tag:re.self,color:"#000"}]});xn({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:re.comment,color:"#0088FF"},{tag:re.string,color:"#3AD900"},{tag:re.regexp,color:"#80FFC2"},{tag:[re.number,re.bool,re.null],color:"#FF628C"},{tag:[re.definitionKeyword,re.modifier],color:"#FFEE80"},{tag:re.variableName,color:"#CCCCCC"},{tag:re.self,color:"#FF80E1"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.definition(re.typeName),re.labelName],color:"#FFDD00"},{tag:[re.keyword,re.operator],color:"#FF9D00"},{tag:[re.propertyName,re.typeName],color:"#80FFBB"},{tag:re.special(re.brace),color:"#EDEF7D"},{tag:re.attributeName,color:"#9EFFFF"},{tag:re.derefOperator,color:"#fff"}]});xn({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:re.comment,color:"#AEAEAE"},{tag:[re.string,re.special(re.brace),re.regexp],color:"#8DFF8E"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.function(re.definition(re.variableName)),re.definition(re.typeName)],color:"#A3EBFF"},{tag:[re.number,re.bool,re.null],color:"#62E9BD"},{tag:[re.keyword,re.operator],color:"#2BF1DC"},{tag:[re.definitionKeyword,re.modifier],color:"#F8FBB1"},{tag:[re.variableName,re.self],color:"#B683CA"},{tag:[re.angleBracket,re.tagName,re.typeName,re.propertyName],color:"#60A4F1"},{tag:re.derefOperator,color:"#E0E0E0"},{tag:re.attributeName,color:"#7BACCA"}]});const yH=xn({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:re.comment,color:"#6272a4"},{tag:[re.string,re.special(re.brace)],color:"#f1fa8c"},{tag:[re.number,re.self,re.bool,re.null],color:"#bd93f9"},{tag:[re.keyword,re.operator],color:"#ff79c6"},{tag:[re.definitionKeyword,re.typeName],color:"#8be9fd"},{tag:re.definition(re.typeName),color:"#f8f8f2"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.attributeName],color:"#50fa7b"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:re.comment,color:"#AAAAAA"},{tag:[re.keyword,re.operator,re.typeName,re.tagName,re.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[re.attributeName,re.definition(re.propertyName)],color:"#4F9FD0"},{tag:[re.className,re.string,re.special(re.brace)],color:"#CF4F5F"},{tag:re.number,color:"#CF4F5F",fontWeight:"bold"},{tag:re.variableName,fontWeight:"bold"}]});xn({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:re.comment,color:"#9995b7"},{tag:re.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#ff5792"},{tag:[re.className,re.tagName,re.definition(re.typeName)],color:"#0094f0"},{tag:[re.number,re.bool,re.null,re.special(re.brace)],color:"#5842ff"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#0095a8"},{tag:re.typeName,color:"#b3694d"},{tag:[re.propertyName,re.variableName],color:"#fa8900"},{tag:re.operator,color:"#ff5792"},{tag:re.self,color:"#e64100"},{tag:[re.string,re.regexp],color:"#00b368"},{tag:[re.paren,re.bracket],color:"#0431fa"},{tag:re.labelName,color:"#00bdd6"},{tag:re.attributeName,color:"#e64100"},{tag:re.angleBracket,color:"#9995b7"}]});xn({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:re.comment,color:"#9893a5"},{tag:[re.bool,re.null],color:"#286983"},{tag:re.number,color:"#d7827e"},{tag:re.className,color:"#d7827e"},{tag:[re.angleBracket,re.tagName,re.typeName],color:"#56949f"},{tag:re.attributeName,color:"#907aa9"},{tag:re.punctuation,color:"#797593"},{tag:[re.keyword,re.modifier],color:"#286983"},{tag:[re.string,re.regexp],color:"#ea9d34"},{tag:re.variableName,color:"#d7827e"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:re.comment,color:"#CFCFCF"},{tag:[re.number,re.bool,re.null],color:"#E66C29"},{tag:[re.className,re.definition(re.propertyName),re.function(re.variableName),re.labelName,re.definition(re.typeName)],color:"#2EB43B"},{tag:re.keyword,color:"#D8B229"},{tag:re.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[re.definitionKeyword,re.modifier],color:"#925A47"},{tag:re.string,color:"#704D3D"},{tag:re.typeName,color:"#2F8996"},{tag:[re.variableName,re.propertyName],color:"#77ACB0"},{tag:re.self,color:"#77ACB0",fontWeight:"bold"},{tag:re.regexp,color:"#E3965E"},{tag:[re.tagName,re.angleBracket],color:"#BAA827"},{tag:re.attributeName,color:"#B06520"},{tag:re.derefOperator,color:"#000"}]});xn({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:re.comment,color:"#93A1A1"},{tag:re.string,color:"#2AA198"},{tag:re.regexp,color:"#D30102"},{tag:re.number,color:"#D33682"},{tag:re.variableName,color:"#268BD2"},{tag:[re.keyword,re.operator,re.punctuation],color:"#859900"},{tag:[re.definitionKeyword,re.modifier],color:"#073642",fontWeight:"bold"},{tag:[re.className,re.self,re.definition(re.propertyName)],color:"#268BD2"},{tag:re.function(re.variableName),color:"#268BD2"},{tag:[re.bool,re.null],color:"#B58900"},{tag:re.tagName,color:"#268BD2",fontWeight:"bold"},{tag:re.angleBracket,color:"#93A1A1"},{tag:re.attributeName,color:"#93A1A1"},{tag:re.typeName,color:"#859900"}]});xn({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:re.comment,color:"#8E908C"},{tag:[re.variableName,re.self,re.propertyName,re.attributeName,re.regexp],color:"#C82829"},{tag:[re.number,re.bool,re.null],color:"#F5871F"},{tag:[re.className,re.typeName,re.definition(re.typeName)],color:"#C99E00"},{tag:[re.string,re.special(re.brace)],color:"#718C00"},{tag:re.operator,color:"#3E999F"},{tag:[re.definition(re.propertyName),re.function(re.variableName)],color:"#4271AE"},{tag:re.keyword,color:"#8959A8"},{tag:re.derefOperator,color:"#4D4D4C"}]});class VI extends qs{beforeRender(e){this.state={content:vr(cr)(e.content,"")}}template(e){return zt("section",{class:["editor",...Array.isArray(e.class)?e.class:[e.class]]},zt("div",{class:"editor__view",ref:this.ref("view")}))}afterRender(e){this.refs.editor=new Mt({doc:this.state.content.get(),extensions:[OX,gl.of([Fz]),gY(),xX(),pX(xY(new dc.Linter,{languageOptions:{globals:{...dH.browser,...(e.globals??[]).reduce((t,r)=>(t[r]="readonly",t),{})}},rules:{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"warn","no-unused-private-class-members":"warn","no-unused-vars":"warn","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"}})),yH,Mt.updateListener.of(t=>{t.docChanged&&this.state.content.set(t.state.doc.toString())})],parent:this.refs.view})}clear(e=this.state.content.initial){this.refs.editor.dispatch({changes:{insert:e,from:0,to:this.refs.editor.state.doc.length}})}beforeDestroy(){var e;(e=this.refs.editor)==null||e.destroy()}}var Na;class bH extends qs{constructor(){super(...arguments);An(this,Na,()=>{this.base.width=this.state.width.get(),this.base.height=this.state.height.get()})}beforeRender(t){this.state={width:vr(cr)(t.width),height:vr(cr)(t.height)}}template(t){return zt("canvas",{class:"canvas"})}get width(){return this.base.width}get height(){return this.base.height}afterRender(){this.context=this.base.getContext("2d"),this.state.width.subscribe(Cr(this,Na)),this.state.height.subscribe(Cr(this,Na)),Cr(this,Na).call(this)}clear(){this.context.clearRect(0,0,this.width,this.height)}}Na=new WeakMap;class vH extends qs{constructor(){super(...arguments);or(this,"state",{zoomed:cr(!0)})}template(t){return zt("section",{class:["scene",{"is-zoomed":this.state.zoomed}],"event-click":this.state.zoomed.toggle},zt(bH,{ref:this.ref("canvas"),width:1}))}update(t){this.refs.canvas.clear(),this.refs.canvas.state.height.set(t.ledCount),t.render(this.refs.canvas.context)}}const Eu="workshop-data-light@0.5.1__";function pi(n,e,{encode:t=JSON.stringify,decode:r=i=>{try{return JSON.parse(i)}catch{return i}}}={}){const i=localStorage.getItem(Eu+e),l=cr(i?r(i):n);return i===null&&localStorage.setItem(Eu+e,t(l.current)),l.persist=h=>localStorage.setItem(Eu+e,t(h)),l.subscribe(l.persist),l.clear=()=>localStorage.removeItem(Eu+e),l}class xH extends qs{beforeRender(){this.handleConfirm=this.handleConfirm.bind(this),this.handleCancel=this.handleCancel.bind(this)}template(e,t){var r,i,l,h;return zt(ZI,{locked:e.locked,title:e.title??"Confirmer l’action",class:"confirm-modal","event-close":()=>(e["event-close"]??Ds)(null,this)},zt("div",{class:"confirm-modal__content"},e.children),zt(Lo,{class:"confirm-modal__toolbar"},zt(Ks,{icon:((r=e.cancel)==null?void 0:r.icon)??H9,label:((i=e.cancel)==null?void 0:i.label)??"annuler","event-click":this.handleCancel}),zt(Ks,{active:!0,icon:((l=e.confirm)==null?void 0:l.icon)??t4,label:((h=e.confirm)==null?void 0:h.label)??"valider","event-click":this.handleConfirm})))}handleConfirm(){(this.props["event-input"]??Ds)(!0,this),this.destroy()}handleCancel(){(this.props["event-input"]??Ds)(!1,this),this.destroy()}}const OH=async(n,e={})=>{if(await new Promise(r=>{Cx(zt(xH,{"event-close":r,"event-input":r,...e},typeof e.message=="string"?zt("div",{innerHTML:e.message}):e.message))}))return n()};var pl,na,Ma;class SH extends qs{constructor(){super(...arguments);or(this,"state",{error:cr(null),running:cr(!1),frameCount:cr(0),dataMode:cr(!1)});or(this,"store",{code:pi(_D.toString(),"code"),data:pi("export default {}","data"),title:pi("Sans titre","title"),author:pi("Inconnu","author"),description:pi("","description"),credits:pi("","credits"),frames:pi(300,"frames"),frameRate:pi(30,"frameRate"),ledCount:cr(+"300")});or(this,"tick",Ds);or(this,"context",new yU);or(this,"__module",Ds);An(this,pl,async()=>{const t=this.store.data.get(),r=await TD(()=>import("data:text/javascript,"+t),[]);try{this.context.data=r.default}catch(i){this.state.dataMode.set(!0),Cr(this,Ma).call(this,i)}});An(this,na,async()=>{const t=this.store.code.get();this.stop();try{this._module=await TD(()=>import("data:text/javascript,"+t),[]),this.tick=w9(this.context.frameRate,r=>{if(this.state.frameCount.set(this.context.frameCount),this.context.frameCount>=this.context.frames)return this.stop();try{(this._module.draw??this._module.default)(r),this.context.frameCount++,this.refs.scene.update(this.context)}catch(i){Cr(this,Ma).call(this,i)}}),console.clear(),(this._module.setup??Ds)(),this.start()}catch(r){Cr(this,Ma).call(this,r)}});An(this,Ma,t=>{this.stop(),console.clear(),this.state.error.set(t),console.error(t)})}template(){return zt("main",{class:["app",{"is-running":this.state.running,"has-error":this.state.error}]},zt("header",{class:"app__header"},zt("h1",{class:"app__title"},zt("span",{class:"app__logo",innerHTML:i4}),zt("span",null,document.title)),zt("a",{innerHTML:r4,href:"https://github.com/chevalvert/workshop-data-light",target:"_blank",rel:"noreferrer"})),zt(VI,{class:["editor-code",{"is-active":B9(this.state.dataMode)}],ref:this.ref("editor"),lint:!0,globals:Object.keys(this.context.PROPERTIES),content:this.store.code}),zt(VI,{class:["editor-data",{"is-active":this.state.dataMode}],ref:this.ref("data"),content:this.store.data}),zt(vH,{ref:this.ref("scene")}),zt("footer",{class:"app__footer"},zt(Lo,null,zt(Ks,{class:"data-code-toggler",icon:Cu(this.state.dataMode,t=>t?s4:n4),label:Cu(this.state.dataMode,t=>t?"data":"code"),"event-click":this.state.dataMode.toggle}),zt(Lo,null,zt(Lo,{compact:!0},zt(Ks,{icon:Cu(this.state.running,t=>t?e4:J9),"event-click":t=>{this.state.running.get()?this.stop():this.start()},active:this.state.running}),zt(Ao,{class:"readonly",type:"number",value:this.state.frameCount,active:this.state.running}),zt(Ao,{type:"number",label:"/",titles:"frames",value:this.store.frames,active:this.state.running})),zt(Ao,{type:"number",label:"fps",value:this.store.frameRate,min:0,max:30}))),zt(Lo,null,zt(Ks,{icon:K9,title:"Commencer un nouveau programme","event-click":t=>OH(()=>{this.refs.data.clear("export default {}"),this.refs.editor.clear(_D.toString())},{title:"Commencer un nouveau programme ?",message:"Tout votre programme et toutes vos données seront perdues.",confirm:{label:"effacer"}})}),zt(Ks,{icon:FD,"event-click":this.export.bind(this)}))))}afterRender(){for(const t of["ledCount","frames","frameRate"]){const r=this.createContextPropHandler(t);this.store[t].subscribe(r),r(this.store[t].get())}this.store.frames.subscribe(Cr(this,na)),this.store.frameRate.subscribe(Cr(this,na)),this.store.code.subscribe(Cr(this,na)),this.store.data.subscribe(Cr(this,pl)),Cr(this,pl).call(this),Cr(this,na).call(this)}createContextPropHandler(t){return r=>{this.context[t]=r,this.context.reset()}}start(){this.state.error.set(null),this.context.reset(),DD.add(this.tick),this.state.running.set(!0)}stop(){DD.remove(this.tick),this.state.running.set(!1)}export(){let t;this.render(zt(ZI,{title:"Exporter l’animation",class:"app__export",ref:r=>{t=r}},zt("fieldset",null,zt(Ao,{type:"text",label:"titre",value:this.store.title}),zt(Ao,{type:"text",label:"auteur·ice",value:this.store.author}),zt("textarea",{value:this.store.description,"event-input":r=>this.store.description.set(r.target.value),rows:"4",placeholder:"description"}),zt("textarea",{value:this.store.credits,"event-input":r=>this.store.credits.set(r.target.value),rows:"2",placeholder:"crédits"})),zt("footer",null,zt(Ks,{icon:FD,label:"exporter","event-click":async()=>{await SU({context:this.context,setup:this._module.setup??Ds,draw:this._module.draw??this._module.default??Ds,title:this.store.title.get(),author:this.store.author.get(),description:this.store.description.get(),credits:this.store.credits.get(),filename:mv(this.store.title.get())+".png"}),t==null||t.destroy()}}))),document.body)}}pl=new WeakMap,na=new WeakMap,Ma=new WeakMap;Cx(zt(SH,null)); diff --git a/assets/index-ea4cb48d.css b/assets/index-ea4cb48d.css new file mode 100644 index 0000000..a752a9a --- /dev/null +++ b/assets/index-ea4cb48d.css @@ -0,0 +1 @@ +@keyframes ui-loader-spin-1l3kn1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-backdrop-1l3kn107{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;-webkit-backdrop-filter:blur(var(--ui-backdrop-blur));backdrop-filter:blur(var(--ui-backdrop-blur));background:var(--ui-backdrop-background)}@keyframes ui-loader-spin-1urez1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-button-1urez107{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-button-1urez107::-moz-focus-inner{padding:0;border:0}.ui-button-1urez107:focus{outline:none}.ui-button-1urez107.is-hidden{display:none}.ui-button-1urez107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-button-1urez107.has-click,.ui-button-1urez107.has-click .ui-button__label-1urez161{cursor:pointer}.ui-button-1urez107.has-click:hover,.ui-button-1urez107.has-click:focus:not(.is-disabled),.ui-button-1urez107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-button-1urez107.is-waiting{cursor:wait}.ui-button__icon-1urez171{animation:var(--ui-button-animation)}.ui-button__icon-1urez171 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-button-1urez107:not(.has-icon) .ui-button__icon-1urez171{display:none}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-button-1urez107.is-waiting .ui-button__icon-1urez171:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-1urez1 1s linear infinite}.ui-button__label-1urez161{white-space:nowrap}.ui-button-1urez107:has(label:empty) .ui-button__label-1urez161{display:none}@keyframes ui-loader-spin-4vhi21{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-file-dropper-4vhi2107{transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:all;position:absolute;z-index:999;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none}.ui-file-dropper-4vhi2107:not(.is-dragged-over){opacity:0}.ui-file-dropper-4vhi2107:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--ui-color-accent);opacity:.9}@keyframes ui-loader-spin-ada4i1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-input-ada4i107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-input-ada4i107.is-hidden{display:none}.ui-input-ada4i107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-input-ada4i107:hover,.ui-input-ada4i107:focus,.ui-input-ada4i107.is-active{color:var(--ui-color-accent-contrast);background:var(--ui-color-accent)}.ui-input-ada4i107.is-waiting{cursor:wait}.ui-input-ada4i107.is-edited-on-dblclick input:not(:focus){pointer-events:none}.ui-input__icon-ada4i150{animation:var(--ui-button-animation)}.ui-input__icon-ada4i150 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-input-ada4i107:not(.has-icon) .ui-input__icon-ada4i150{display:none}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150{position:relative;color:transparent;animation:var(--ui-button-animation)}.ui-input-ada4i107.is-waiting .ui-input__icon-ada4i150:before{content:"";position:absolute;top:50%;left:50%;width:1em;height:1em;pointer-events:none;border:2px solid transparent;border-top:2px solid var(--ui-color-text);border-left:2px solid var(--ui-color-text);border-radius:50%;animation:ui-loader-spin-ada4i1 1s linear infinite}.ui-input-ada4i107 label{white-space:nowrap}.ui-input-ada4i107 label:empty{display:none}.ui-input-ada4i107 input{width:auto;padding:0;margin:-.1em 0 0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1}.ui-input-ada4i107 input::-moz-focus-inner{padding:0;border:0}.ui-input-ada4i107 input:focus{outline:none}.ui-input-ada4i107 input+label{padding-left:.125em;margin-left:calc(-1 * var(--ui-gap))}.ui-input-ada4i107 input[type=number]{width:4ch;text-align:right;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.ui-input-ada4i107 input[type=number]::-webkit-outer-spin-button,.ui-input-ada4i107 input[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-input-ada4i107[data-type=file],.ui-input-ada4i107[data-type=file] *{cursor:pointer}.ui-input-ada4i107[data-type=file] input[type=file]{display:none}@keyframes ui-loader-spin-1ng3s1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-modal-1ng3s107{font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;position:relative;max-width:var(--ui-modal-width);overflow:hidden;border:var(--ui-border);border-radius:var(--ui-border-radius)}.ui-modal__header-1ng3s119{display:flex;padding:var(--ui-gap);justify-content:space-between;background:var(--ui-color-background)}.ui-modal__header-1ng3s119 .ui-modal__title-1ng3s125{font-weight:700;pointer-events:none}.ui-modal__content-1ng3s129{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);line-height:var(--ui-line-height);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-]){max-height:unset;padding:0;overflow:visible;background:var(--ui-color-background)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]{width:unset;margin:0;border:var(--border, 1px solid var(--ui-color-background-dim));border-bottom:0;border-radius:0}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]{flex:1;min-width:fit-content;justify-content:center}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-toggles-]>[class^=ui-button-]:not(:first-child){border-left:var(--border, 1px solid var(--ui-color-background-dim))}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll;max-height:var(--ui-modal-height);padding:var(--ui-padding-content);background:var(--ui-color-background-dim)}.ui-modal__content-1ng3s129:has(> [class^=ui-tabs-])>[class^=ui-tabs-]>[class^=ui-tabs__panels-]>[class^=ui-tabs__panel-]::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-modal__content-1ng3s129>footer{display:flex;padding:var(--ui-gap);justify-content:flex-end;gap:var(--ui-gap);background:var(--ui-color-background-dim)}@keyframes ui-loader-spin-1psed1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-picker-1psed107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;background:var(--ui-color-background);border-radius:var(--ui-border-radius)}.ui-picker-1psed107.is-hidden{display:none}.ui-picker-1psed107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-picker__toolbar-1psed128{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.ui-picker-1psed107:not(.is-open) .ui-picker__toolbar-1psed128>*:not(.is-active){display:none}.ui-picker-1psed107.has-auto-order .ui-picker__toolbar-1psed128 .is-active{order:-1}.ui-picker__toggle-1psed138{flex-direction:row-reverse}.ui-picker-1psed107>*{border-radius:0!important}@keyframes ui-loader-spin-1r0eh1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-toolbar-1r0eh107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;overflow-x:scroll;overflow-y:hidden}.ui-toolbar-1r0eh107.is-hidden{display:none}.ui-toolbar-1r0eh107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toolbar-1r0eh107::-webkit-scrollbar{display:none;height:0;background:transparent}.ui-toolbar-1r0eh107>*{flex-shrink:0}.ui-toolbar-1r0eh107 hr{border:0;border-left:1px solid var(--ui-color-background-dim)}.ui-toolbar-1r0eh107:not(.is-compact)>hr{display:none}.ui-toolbar-1r0eh107:not(.is-compact)>hr+*{margin-left:var(--ui-gap)}.ui-toolbar-1r0eh107.is-compact{gap:0;overflow:hidden;border-radius:var(--ui-border-radius)}.ui-toolbar-1r0eh107.is-compact>*{border-radius:0}.ui-toolbar-1r0eh107.is-compact>.ui-toolbar-1r0eh107{border-right:1px solid var(--ui-color-background-dim);border-left:1px solid var(--ui-color-background-dim)}@keyframes ui-loader-spin-t5m5l1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-range-t5m5l107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums}.ui-range-t5m5l107.is-hidden{display:none}.ui-range-t5m5l107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-range-t5m5l107:focus-within,.ui-range-t5m5l107:hover{background:var(--ui-color-accent)}.ui-range__icon-t5m5l140{animation:var(--ui-button-animation)}.ui-range__icon-t5m5l140 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-range__inputs-t5m5l150{position:relative;display:flex;align-items:center;flex:1}.ui-range-t5m5l107 input{flex:1;display:block;cursor:pointer;background:none;accent-color:var(--ui-color-text);outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-webkit-slider-runnable-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-webkit-slider-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-1 * (var(--ui-gap) - 2px) / 2);background:var(--ui-color-background);border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107 input::-moz-range-track{height:2px;background:var(--ui-color-text)}.ui-range-t5m5l107 input::-moz-range-thumb{width:var(--ui-gap);height:var(--ui-gap);margin-top:calc(-.5*(1em - 2px));background:var(--ui-color-background);border:none;border-radius:100%;outline:2px solid var(--ui-color-text);-webkit-appearance:none;-moz-appearance:none;appearance:none}.ui-range-t5m5l107.is-dual input{pointer-events:none}.ui-range-t5m5l107.is-dual input::-webkit-slider-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input::-moz-range-thumb{pointer-events:all}.ui-range-t5m5l107.is-dual input:nth-child(2){position:absolute}.ui-range-t5m5l107.is-dual input:nth-child(2)::-webkit-slider-runnable-track{background:transparent}.ui-range-t5m5l107.is-dual input:nth-child(2)::-moz-range-track{background:transparent}.ui-range__label-t5m5l210{font-variant-numeric:tabular-nums}.ui-range-t5m5l107:has(label:empty) .ui-range__label-t5m5l210{display:none}@keyframes ui-loader-spin-iov4x1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-select-iov4x107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;height:var(--ui-height);padding:var(--ui-padding-container);background:var(--ui-color-background);border:var(--ui-border);border-radius:var(--ui-border-radius);font-family:var(--ui-font-family);font-size:var(--ui-font-size);line-height:var(--ui-line-height);color:var(--ui-color-text);font-variant-numeric:tabular-nums;transition-duration:var(--ui-easing-duration);transition-timing-function:var(--ui-easing-timing-function);transition-property:background,color}.ui-select-iov4x107.is-hidden{display:none}.ui-select-iov4x107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity);color:var(--ui-disabled-color-text);background:var(--ui-disabled-color-background)}.ui-select-iov4x107:focus-within,.ui-select-iov4x107:has(select:hover){background:var(--ui-color-accent)}.ui-select__icon-iov4x143{animation:var(--ui-button-animation)}.ui-select__icon-iov4x143 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}.ui-select__label-iov4x153{padding-right:calc(1.5em + var(--ui-gap));white-space:nowrap;pointer-events:none}.ui-select__label-iov4x153:empty{display:none}.ui-select__label-iov4x153:not(:empty)+select{position:absolute;right:0;opacity:0}.ui-select__icon-iov4x143+.ui-select__label-iov4x153+select{left:calc(var(--ui-icon-size) + 1.5em + 1px)}.ui-select-iov4x107 select{width:auto;padding:0;margin:0;overflow:visible;font:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;line-height:inherit;color:inherit;background:transparent;border:none;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);flex:1;padding-right:calc(1.5em + var(--ui-gap));cursor:pointer}.ui-select-iov4x107 select::-moz-focus-inner{padding:0;border:0}.ui-select-iov4x107 select:focus{outline:none}.ui-select__arrow-iov4x195{animation:var(--ui-button-animation);position:absolute;right:0;padding:var(--ui-padding-container);padding-top:0;pointer-events:none}.ui-select__arrow-iov4x195 svg{width:var(--ui-icon-size);height:var(--ui-icon-size);min-width:var(--ui-icon-size);min-height:var(--ui-icon-size);color:inherit}@keyframes ui-loader-spin-4t0pe1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ui-tabs-4t0pe107,.ui-tabs__toggles-4t0pe110,.ui-tabs__panels-4t0pe113{box-sizing:inherit}.ui-tabs__panel-4t0pe113.is-hidden{display:none}@keyframes ui-loader-spin-1rg9m1{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}:root{--ui-font-family: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--ui-font-size: 1.4rem;--ui-line-height: 1.3;--ui-color-text: #222;--ui-color-text-dim: #C1C1C1;--ui-color-background: #FFF;--ui-color-background-dim: #F2F2F2;--ui-color-accent: #F9EB0B;--ui-color-accent-contrast: var(--ui-color);--ui-gap: 1rem;--ui-height: 4rem;--ui-padding-container: 1rem 1.2rem;--ui-padding-content: 2rem;--ui-icon-size: 2rem;--ui-border: 0;--ui-border-radius: 1rem;--ui-easing-duration: .12s;--ui-easing-timing-function: cubic-bezier(.25, .1, .25, 1);--ui-disabled-color-text: var(--ui-color-text);--ui-disabled-color-background: var(--ui-color-background);--ui-disabled-opacity: .3;--ui-backdrop-background: rgba(0 0 0 / 90%);--ui-backdrop-blur: 10px;--ui-button-animation: none;--ui-modal-width: 70ch;--ui-modal-height: 400px}.ui-toggles-1rg9m107{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;position:relative;display:flex;width:fit-content;overflow:hidden;gap:var(--ui-gap);justify-content:center safe;box-sizing:border-box;gap:0;border-radius:var(--ui-border-radius)}.ui-toggles-1rg9m107.is-hidden{display:none}.ui-toggles-1rg9m107.is-disabled{pointer-events:none;opacity:var(--ui-disabled-opacity)}.ui-toggles-1rg9m107>*{border-radius:0!important}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box}html{height:100%;font-size:62.5%;text-size-adjust:100%}body{height:100%;font-size:1.2rem;-webkit-font-smoothing:antialiased;line-height:1;text-rendering:optimizelegibility}img,picture,video,canvas,svg{display:block;max-width:100%;vertical-align:bottom;border:0}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{vertical-align:baseline;border:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}a:hover,a:active{outline:none}table{border-collapse:collapse;border-spacing:0}body{font-family:var(--font-family-sans);font-size:var(--font-size);line-height:var(--line-height);color:var(--color-text);background:var(--color-background)}main{isolation:isolate}:root{--color-text: #222;--color-background: #EFEFEF;--font-family-sans: system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;--font-family-mono: ui-monospace, "Cascadia Code", "Source Code Pro", menlo, consolas, "DejaVu Sans Mono", monospace;--font-size: 1.3rem;--line-height: 1.3}.speed-range{--ui-border-radius: 0;--ui-color-text: var(--color-text);--ui-color-background: var(--color-background);position:fixed;bottom:0;width:100%} diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..6a557ce Binary files /dev/null and b/favicon.ico differ diff --git a/favicons/apple-touch-icon.png b/favicons/apple-touch-icon.png new file mode 100644 index 0000000..8523c4c Binary files /dev/null and b/favicons/apple-touch-icon.png differ diff --git a/favicons/icon-192.png b/favicons/icon-192.png new file mode 100644 index 0000000..66fa87a Binary files /dev/null and b/favicons/icon-192.png differ diff --git a/favicons/icon-512.png b/favicons/icon-512.png new file mode 100644 index 0000000..be14c1f Binary files /dev/null and b/favicons/icon-512.png differ diff --git a/favicons/icon.svg b/favicons/icon.svg new file mode 100644 index 0000000..a773ef9 --- /dev/null +++ b/favicons/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..39a134d --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + DATA × LIGHT + + + + + + + + + + + + diff --git a/site.webmanifest b/site.webmanifest new file mode 100644 index 0000000..eea1c98 --- /dev/null +++ b/site.webmanifest @@ -0,0 +1,6 @@ +{ + "icons": [ + { "src": "/favicons/icon-192.png", "type": "image/png", "sizes": "192x192" }, + { "src": "/favicons/icon-512.png", "type": "image/png", "sizes": "512x512" } + ] +}